The label must be inside of a WebMarkupContainer (which will always be
visible), because if the label is not rendered at the first render
then wicket will not find the markup when you try to change the
visibility to true.
And of course your target.addComponent must add the container, not the label.
2007/8/16, Edi <[EMAIL PROTECTED]>:
>
> I am using wicket1.2.3. I think this method is not available in that API
>
>
> Gerolf Seitz wrote:
> >
> > if you want to initially hide components and show them later via ajax,
> > you have to call .setOutputMarkupPlaceHolderTrag(true) for the component.
> >
> > gerolf
> >
> > On 8/16/07, Edi <[EMAIL PROTECTED]> wrote:
> >>
> >>
> >> Hi,
> >>
> >> I have combo box with 3 items, String, Number, Date
> >>
> >> If I select String, Maximum character label with one textbox should
> >> display.
> >>
> >> some code :
> >>
> >> Initially I have hide Maximum character label and textbox using
> >> setVisible(false);
> >>
> >> In AjaxFormComponentUpdatingBehavior("onchange"), protected void
> >> onUpdate(AjaxRequestTarget target)
> >>
> >> inside this method,
> >> I wrote:
> >>
> >> maxLength.setVisible(true);
> >> target.addComponent(maxLength);
> >> setOutputMarkupId(true);
> >>
> >> But in onchange combo, that text box not displaying.... When I click the
> >> same page tabs, that textbox is displaying.
> >>
> >> Please send your suggestions.
> >>
> >> Thanking You,
> >> Regards
> >> Edi
> >> --
> >> View this message in context:
> >> http://www.nabble.com/How-to-Hide-View-Fields-at-run-time-combo-selection-tf4278782.html#a12178803
> >> Sent from the Wicket - User mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/How-to-Hide-View-Fields-at-run-time-combo-selection-tf4278782.html#a12179458
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]