Hi,

first thanks for reply.
Well, it's not possible to add it to a visible component.
Let me explain.
I have 2 custom panels and depending on the selection in a dropdownchoice the 
corresponding panel gets visible or hidden. Because one of these panels need to 
be invisible on page construction (so not both are showing up) i need to set it 
invisible. If i then select it in the dropdownchoice i gets visible.
And now the problem begins. Cause of the initial invisibility the needed 
javascript code for validation of the panel fields isn't injected. How can i 
workaround this?

Thanks in advance
chris


-----Ursprüngliche Nachricht-----
Von: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]
Gesendet: Mi 23.09.2009 19:20
An: users@wicket.apache.org
Betreff: Re: FXValidationAjaxHandler - Javascript not added if component is set 
visible(false) in page constructor
 
javascript contributions do not show up for components that are not
visible, add it to a visible component instead.

-igor

On Wed, Sep 23, 2009 at 7:15 AM, Giambalvo, Christian
<christian.giamba...@excelsisnet.com> wrote:
> Hi all,
>
> ich have a component (textfield) with an FXValidationAjaxHandler. If i
> set this component in pageconstructor to visible(false) then the needed
> javascript code for validation is not contributed to pageheader. if set
> to visible(true) all is fine.
> does anyone had the same problem and if so, is there a workaround
> available?
>
> greets chris
>
> snippet:
> ...
> pComponent.add(new FXValidationAjaxHandler(pFXJavascriptEvent));
> this.pComponent.setOutputMarkupPlaceholderTag(true);
> this.pComponent.setOutputMarkupId(true)
> this.pComponent.setVisible(false); // no javascript is added
> //this.pComponent.setVisible(true); // javascript is added
> form.add(this.pComponent);
> ...
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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


Reply via email to