On Tue, Nov 9, 2010 at 4:27 AM, Martin Makundi < martin.maku...@koodaripalvelut.com> wrote:
> Hi! > > Does <wicket:enclosure> have capability to "setOutputMarkupPlaceholderTag" > ? > > What I mean is that when I have: > <wicket:enclosure child="optional-field"> > <tr> > <td>optional content</td> > <td><input type="text" wicket:id="optional-field"/></td> > </tr> > </wicket> > > If I set it invisible via ajax I cannot set it visible again. > > Instead, is there a way to do something like: > > > <tr wicket:enclosure="child:optional-field"> > <td>optional content</td> > <td><input type="text" wicket:id="optional-field"/></td> > </tr> > > So that it would automatically handle visible/hidden > "setOutputMarkupPlaceholderTag" flavour so that I can repaint a hidden > element via ajax? > Not currently. wicket:enclosure is an auto-added component, which means it goes away after the rendering cycle. Since you didn't add it in your code, you can't access it to call setOutputMarkupPlaceholderTag on it. You could probably extend it so that it adds a behavior to the child component that changes the ajax markup ID of the component. See IAjaxRegionMarkupIdProvider Provide a patch on JIRA and we'll review it. -- Jeremy Thomerson http://wickettraining.com *Need a CMS for Wicket? Use Brix! http://brixcms.org*