Hi, On Sep 30, 2013, at 3:06 PM, Edo Beutler <[email protected]> wrote:
> Hi > > I have a problem with a URL containing a parameter of the form > action_...=... The page does not load with this parameter. For an example > see the xwiki.org start page ( > http://www.xwiki.org/xwiki/bin/view/Main/WebHome?action_xyz). > The parameter action_... seems to be used for something, but I couldn't > find anything on what exactly and on how I can work around that. > Unfortunately this URL is created by an external source (Facebook), so I > can't change it. > > Can somebody point me in the right direction? I've just grepped the whole source code and I've found this: In ActionFilter.java: ... if (parameter.startsWith(ACTION_PREFIX)) { … where: /** The query property name prefix that indicates the target action. */ private static final String ACTION_PREFIX = "action_"; This code is in a Filter. FTR here's its javadoc: * A filter that dispatches requests to the right action, depending on the button that was pressed in the editing form. * This is needed since the browser cannot send the form data to different URLs depending on the button pressed, and an * XHTML form has only one target URL. In previous versions of XWiki this was accomplished using javascript code, with a * fall-back on a pseudo-dispatcher inside the {@link PreviewAction}, which was on obvious case of bad code design. * </p> * <p> * The filter dispatches requests based on the presence of a request parameter starting with <tt>action_</tt> followed * by the name of the struts action that should actually process the request. For example, the button that does * <tt>Save and Continue</tt> looks like: * * <pre> * <input type="submit" name="action_saveandcontinue" value="..."/> * </pre> * * As a result, when clicking the button, the request is not sent to the form's target (<tt>preview</tt>), but is * actually forwarded internally to <tt>/bin/saveandcontinue/The/Document</tt>. * </p> Hope it helps, -Vincent _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
