Re: [xwiki-users] Adding objects to pages in inline mode
Sergiu Dumitriu wrote ..
Try this:
{{html clean="false"}} <fieldset> <input type="hidden" name="classname" value="XWiki.XWikiComments" /> <textarea name="XWiki.XWikiComments_comment" rows="5" cols="80"></textarea> <input type="submit" name="action_objectadd" value="Send comment"/> </fieldset> {{/html}}
Fantastic. Thanks. I should have thought to look at the comments...
The trick is the name of the submit button. action_objectadd instructs the server to ignore the action specified in the URL where the form was submitted, and instead to use the action that's specified after the "action_" part, in this case "objectadd". This special form parameter gets submitted only when clicking the "Send comment" button.
Out of interest where is that caught, I'd like to take a look at the processing. If you're pretty busy don't worry - I'll probably grep around in the files or code till I find it anyway! Cheers, Adam
On 01/31/2011 11:19 AM, xwikiadmin@lazypapertiger.org wrote:
Sergiu Dumitriu wrote ..
Try this:
{{html clean="false"}} <fieldset> <input type="hidden" name="classname" value="XWiki.XWikiComments" /> <textarea name="XWiki.XWikiComments_comment" rows="5" cols="80"></textarea> <input type="submit" name="action_objectadd" value="Send comment"/> </fieldset> {{/html}}
Fantastic. Thanks. I should have thought to look at the comments...
The trick is the name of the submit button. action_objectadd instructs the server to ignore the action specified in the URL where the form was submitted, and instead to use the action that's specified after the "action_" part, in this case "objectadd". This special form parameter gets submitted only when clicking the "Send comment" button.
Out of interest where is that caught, I'd like to take a look at the processing. If you're pretty busy don't worry - I'll probably grep around in the files or code till I find it anyway!
I believe this is the place http://svn.xwiki.org/svnroot/xwiki/platform/core/trunk/xwiki-core/src/main/j... Hope this helps, Marius
Cheers,
Adam
_______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
On 01/31/2011 10:19 AM, xwikiadmin@lazypapertiger.org wrote:
Sergiu Dumitriu wrote ..
Try this:
{{html clean="false"}} <fieldset> <input type="hidden" name="classname" value="XWiki.XWikiComments" /> <textarea name="XWiki.XWikiComments_comment" rows="5" cols="80"></textarea> <input type="submit" name="action_objectadd" value="Send comment"/> </fieldset> {{/html}}
Fantastic. Thanks. I should have thought to look at the comments...
The trick is the name of the submit button. action_objectadd instructs the server to ignore the action specified in the URL where the form was submitted, and instead to use the action that's specified after the "action_" part, in this case "objectadd". This special form parameter gets submitted only when clicking the "Send comment" button.
Out of interest where is that caught, I'd like to take a look at the processing. If you're pretty busy don't worry - I'll probably grep around in the files or code till I find it anyway!
core/xwiki-core/src/main/java/com/xpn/xwiki/web/ActionFilter.java -- Sergiu Dumitriu http://purl.org/net/sergiu/
participants (3)
-
Marius Dumitru Florea -
Sergiu Dumitriu -
xwikiadmin@lazypapertiger.org