I've copied BoxBorderTestPage_3 into BoxBorderTestPage_7 and made the
change you suggested. It is working properly. The textield is no
longer printed.
Juergen
On 10/6/06, Alberto Bueno <[EMAIL PROTECTED]> wrote:
> you have the the test case:
>
> public class BoxBorderTestPage_3 extends WebPage
> {
> private static final long serialVersionUID = 1L;
>
> private final ValueMap properties = new ValueMap();
>
> /**
> * Construct.
> *
> *
> */
> public BoxBorderTestPage_3()
> {
> Border formBorder = new FormBorder(this, "border");
>
> new TextField<String>(formBorder, "name", new
> PropertyModel<String>(properties, "name"));
> }
> }
>
> That runs correctly.
>
> But if you change TextField component to setVisible(false):
>
> TextField textfield = new TextField<String>(formBorder, "name",
> new PropertyModel<String>(properties, "name"));
> textfield.setVisible(false);
>
> Then the case has an error, because in the
> DiffUtil.validatePage(document, this.getClass(), filename) the component
> doesn't exists.
> (Because has been removed by the page when it check if the autocomponent
> contain not visible component to remove).
>
>
>
>
>
> > This is V2 svn trunk? Could you please create a test case (see
> > src/test) for me which makes is much easier to follow up. Thanks
> >
> > Juergen
> >
> > On 10/6/06, Alberto Bueno <[EMAIL PROTECTED]> wrote:
> >
> >> Hi,
> >>
> >> the problem is when I want to add in a FormBorder a component with
> >> setVisible(false), because this component
> >> is removed in the first rendering, and in the next rendering the
> >> component is not found.
> >> This is a simple example:
> >>
> >> MyBorderPage.html
> >>
> >> <div wicket:id="border">
> >> <label wicket:id="span">
> >> test
> >> </label>
> >> </div>
> >> <a wicket:id="link">link</a>
> >>
> >>
> >> MyBorderPage.java
> >>
> >> FormBorder border = new FormBorder(this, "border");
> >>
> >> Label span = new Label(border, "span","testt");
> >> span.setVisible(false);
> >>
> >> new Link(this, "link"){
> >>
> >> @Override
> >> public void onClick() {
> >> String p ="";
> >>
> >> }
> >>
> >> };
> >>
> >> When I click the link, I have the error:
> >>
> >> Unable to find component with id 'span' in [MarkupContainer
> >> [Component id = <auto>-body, page = com.isencia.paging.wicket.MyBorderPage,
> >> path = 8:border:myForm:<auto>-body.Border$BorderBody, isVisible = true,
> >> isVersioned = true]].
> >>
> >>
> >> Do you know any solution to solve this problem, or is a bug?
> >>
> >> Thanks
> >>
> >>
> >>
> >>
> >> -------------------------------------------------------------------------
> >> Take Surveys. Earn Cash. Influence the Future of IT
> >> Join SourceForge.net's Techsay panel and you'll get the chance to share
> >> your
> >> opinions on IT & business topics through brief surveys -- and earn cash
> >> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> >> _______________________________________________
> >> Wicket-user mailing list
> >> [email protected]
> >> https://lists.sourceforge.net/lists/listinfo/wicket-user
> >>
> >>
> >
> > -------------------------------------------------------------------------
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to share your
> > opinions on IT & business topics through brief surveys -- and earn cash
> > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > _______________________________________________
> > Wicket-user mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user