Hi,
I have the following markup for MyPanel.html:
<wicket:panel>
<wicket:enclosure child="mylabel">
<h3> <span class="title"><img src="images/title-ico.gif"
border="0"> My page
</span> </h3>
<div class="content">
<div class="selectdown">
<p><img src="images/asterisk.jpg">Label</p>
<select wicket:id="mylabel" name="ddl"
onfocus="this.className='';">
<option class="option">Please Select</option>
<option class="option">This is a very very long
long text that goes here</option>
<option class="option">2</option>
<option class="option">3</option>
</select>
</div>
<span wicket:id="fragment">fragments contents come here</span>
<wicket:fragment wicket:id="fragmentid">
<div class="multiselectdown">
<p><img
src="images/asterisk.jpg"> Reason</p>
<select wicket:id="reason" name="ddl"
onfocus="this.className='';">
<option class="option">Please
Select</option>
<option class="option">This is a
very very
long long text that goes here</option>
<option class="option">2</option>
<option class="option">3</option>
</select>
</div>
</wicket:fragment>
</div>
<div class="submitarea"><a href="#" wicket:id="submit"
class="button submitarea">SUBMIT</a></div>
</wicket:enclosure>
<wicket:enclosure child="decisionLabel">
<h3> <span class="title"><img src="images/title-ico.gif"
border="0"> Mypage
</span> </h3>
<!-- Content Starts Here -->
<div class="content">
<div class="popdatacontainer">
<div class="poptitle">Label</div>
<div wicket:id="label" class="poptitle"></div>
</div>
<div wicket:id="codePanel">
<div wicket:id="rows_6" class="popdatacontainer">
<span class="poptitle">code</span>
<span wicket:id="code" class="poptitle"></span>
</div>
</div>
</div>
</wicket:enclosure>
</wicket:panel>
In onSubmit of submit button of MyPanel, I try to do the following:
AjaxSubmitLink submitbutton = new AjaxSubmitLink("submit") {
private static final long serialVersionUID = 1L;
protected void onSubmit(AjaxRequestTarget target, Form<?> form)
{
processData();
target.addComponent(MyPanel.this);
This should show the second wicket:enclosure, and hide the first enclosure.
But I get an error message:
The component(s) below failed to render. A common problem is that you
have added a component in code but forgot to reference it in the
markup (thus the component will never be rendered).
1. [MarkupContainer [Component id = fragment]]
2. [MarkupContainer [Component id = reason]]
3. [MarkupContainer [Component id = submit]]
I have no idea why it is missing from the markup.
Thanks
Anna
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]