2008/7/18 Brad Fritz <[EMAIL PROTECTED]>:
>
> I am trying to rewrite an HTML form "action" attribute (for a
> non-Wicket form) inside a Wicket Panel and could use some help.
>
> While converting a large webapp to Wicket, I created a Panel to wrap a
> search form.  The form processing is not handled by Wicket yet.  So in
> my SearchPanel.html, I have something like this:
>
>  <wicket:panel>
>    <form method="get" action="search.do">
>      [..]
>    </form>
>    <a href="search.do">Advanced Search</a>
>  </wicket:panel>
>
> The "Advanced Search" href is automatically prefixed with the correct
> number of "../" strings by RelativePathPrefixHandler, but the form
> action is not rewritten.
>
> Is adding a new IMarkupFilter (based on RelativePathPrefixHandler) to
> handle the "action" attribute rewriting a good option?  Or is there a
> better way?

You could make the form into a wicket component (use a
WebMarkupContainer), and then add an AttributeModifier which does what
you want from code.

> Any ideas on how to best handle this scenario would be much
> appreciated.  Thanks!

However, this seems like a bug to me. Obviously non-Wicket <form> tags
should have their action attributes rewritten like everything else
does. Feel free to open a JIRA issue and assign it to me and I'll get
it fixed for the next 1.3.x release.

Alastair

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to