Hi,
 I tried this . 

public class MyContainer extends WebMarkupContainer{
public MyContainer(String id, MyVO myVO) {
                super(id);
if(myVO.getName()!=null)
  add( new Label("fName",  myVO.getName()));
else
 add( new Label("fName", " ")).setVisible(false);
}
public MyContainer(String id){
super(id);
 add(new Label("message", "Testing Label");
}

}


Calling from my Class 

add( new MyContainer("test"));
add( new MyContainer("test1", VO);


In html

<div wicket:id="test">

</div>

<div wicket:id="test1">

</div>




But the problem is I am getting the first markup which is "test" and not the
"test1" even though the getName is not null. 

PLease advise 



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/enabling-and-disabling-the-components-tp4651107p4651112.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to