[
https://issues.apache.org/jira/browse/WICKET-365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12480447
]
vincent Demay commented on WICKET-365:
--------------------------------------
I try with placeholder under safari, ff and ie, the problem comes from ff. When
you try to put a non html tag in a table tag, firefox remove it to put it
before the first table tag. So we can not to this kind of stuff with a
wicket:placeholder.
Now I've done an other version putting the componentTag without its content but
with its id and a style="display:none". It works like a charm under IE, FF and
safari. Have a look at the second attached file.
Here is the test I used :
private final TextField field;
private final WebMarkupContainer markupContainer;
public TestPlaceHolder(PageParameters parameters)
{
markupContainer = new WebMarkupContainer("markupContainer");
markupContainer.setVisible(false);
markupContainer.setOutputMarkupId(true);
add(markupContainer);
field = new TextField("text", new Model("foo"));
field.setVisible(false);
field.setOutputMarkupId(true);
add(field);
add(new AjaxLink("showField"){
@Override
public void onClick(AjaxRequestTarget target) {
field.setVisible(true);
markupContainer.setVisible(true);
target.addComponent(markupContainer);
target.addComponent(field);
}
});
}
And Html file :
<input wicket:id="text"></input>
<table>
<tr>
<td>test0</td>
</tr>
<tr wicket:id="markupContainer">
<td>test1</td>
</tr>
<tr>
<td>test2</td>
</tr>
</table>
<a wicket:id="showField">ShowField</a>
> Go from setVisible(false) to setVisible(true) on a component in ajax does not
> work
> ----------------------------------------------------------------------------------
>
> Key: WICKET-365
> URL: https://issues.apache.org/jira/browse/WICKET-365
> Project: Wicket
> Issue Type: Bug
> Reporter: vincent Demay
> Assigned To: Igor Vaynberg
> Fix For: 1.3, 2.0
>
> Attachments: Component.patch.txt, Component.patch.txt
>
>
> Because no tag is generated by RenderComponent when a component is not
> visible. The attach patch simply generates a <span
> id="ComponentMarkupId"></span> when component is not visible and
> OuputMarkupId true. So we can now use ajax on setVisible(false component)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.