You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Steven Haines <ly...@yahoo.com> on 2010/03/15 20:00:35 UTC

Wicket Renames my Form id

Hi,

I've noticed that wicket is renaming my form id, which has become problematic when our JavaScript developer makes use of the id for some of his behaviors. Is there a way to tell Wicket to preserve the form id in the HTML page?

Here's what I'm doing:

HTML:
          <form wicket:id="step_1" id="step_1">
          ...
          </form>

Java:
        final Form<Quote> form = new Form<Quote>( "step_1", new CompoundPropertyModel<Quote>( quote ) );


And the resultant HTML file reads as follows:
<form wicket:id="step_1" id="step__15" method="post" action="?wicket:interface=:2:step_1::IFormSubmitListener::"><div style="display:none"><input type="hidden" name="step__15_hf_0" id="step__15_hf_0" /></div>
          ....

Thanks in advance for your help!
Steve

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wicket Renames my Form id

Posted by Major Péter <ma...@sch.bme.hu>.
override
http://wicket.apache.org/docs/1.4/org/apache/wicket/Component.html#getMarkupId()

2010-03-15 20:00 keltezéssel, Steven Haines írta:
> Hi,
> 
> I've noticed that wicket is renaming my form id, which has become problematic when our JavaScript developer makes use of the id for some of his behaviors. Is there a way to tell Wicket to preserve the form id in the HTML page?
> 
> Here's what I'm doing:
> 
> HTML:
>           <form wicket:id="step_1" id="step_1">
>           ...
>           </form>
> 
> Java:
>         final Form<Quote> form = new Form<Quote>( "step_1", new CompoundPropertyModel<Quote>( quote ) );
> 
> 
> And the resultant HTML file reads as follows:
> <form wicket:id="step_1" id="step__15" method="post" action="?wicket:interface=:2:step_1::IFormSubmitListener::"><div style="display:none"><input type="hidden" name="step__15_hf_0" id="step__15_hf_0" /></div>
>           ....
> 
> Thanks in advance for your help!
> Steve

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wicket Renames my Form id

Posted by Igor Vaynberg <ig...@gmail.com>.
call form.setmarkupid()

-igor

On Mon, Mar 15, 2010 at 11:00 AM, Steven Haines <ly...@yahoo.com> wrote:
> Hi,
>
> I've noticed that wicket is renaming my form id, which has become problematic when our JavaScript developer makes use of the id for some of his behaviors. Is there a way to tell Wicket to preserve the form id in the HTML page?
>
> Here's what I'm doing:
>
> HTML:
>          <form wicket:id="step_1" id="step_1">
>          ...
>          </form>
>
> Java:
>        final Form<Quote> form = new Form<Quote>( "step_1", new CompoundPropertyModel<Quote>( quote ) );
>
>
> And the resultant HTML file reads as follows:
> <form wicket:id="step_1" id="step__15" method="post" action="?wicket:interface=:2:step_1::IFormSubmitListener::"><div style="display:none"><input type="hidden" name="step__15_hf_0" id="step__15_hf_0" /></div>
>          ....
>
> Thanks in advance for your help!
> Steve
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org