RE: replace content of div with generated html

2013-08-06 Thread Paul Bors
Grab a wicket handler to the parent and then call
ParentComponent.repaceWith(ChildComponent) method:
http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/Compone
nt.html#replaceWith(org.apache.wicket.Component)

~ Thank you,
  Paul Bors

-Original Message-
From: Boris Brinza [mailto:boris.bri...@htsolution.sk] 
Sent: Monday, August 05, 2013 11:18 AM
To: users@wicket.apache.org
Subject: replace content of div with generated html

hello
is it possible to replace content of div with content of WebMarkupContainer
when user clicks on ajaxLink?

I have DataView enclosed in WebMarkupContainer, java seems like this:
WebMarkupContainet tableContainer = new
WebMarkupContainer(tableContainer);
tableContainer.add(dataview)

html:
div wicket id=tableContainer
...
tabletr wicket:id=dataview.../tr/table
/div



And i want to replace the content of another div in another page with
content of tableContainer



For clarification: i have table of Users used in UserListPage, but same 
table should be accessible as subtable of Company table in CompanyListPage.




-- 

S pozdravom

Boris Brinza
HT Solution s.r.o.
Digital Park II
Einsteinova 25
851 01 Bratislava
Slovakia

Phone: +421 2 3500 2512,  Mobile: +421 903 602 126
E-mail: boris.bri...@htsolution.sk | www.htsolution.sk


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



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



Re: replace content of div with generated html

2013-08-05 Thread Martin Grigorov
Hi,

Extract the code in a Panel component and reuse it in different pages.


On Mon, Aug 5, 2013 at 5:18 PM, Boris Brinza boris.bri...@htsolution.skwrote:

 hello
 is it possible to replace content of div with content of
 WebMarkupContainer when user clicks on ajaxLink?

 I have DataView enclosed in WebMarkupContainer, java seems like this:
 WebMarkupContainet tableContainer = new WebMarkupContainer(**
 tableContainer);
 tableContainer.add(**dataview)

 html:
 div wicket id=tableContainer
 ...
 tabletr wicket:id=dataview.../tr**/table
 /div



 And i want to replace the content of another div in another page with
 content of tableContainer



 For clarification: i have table of Users used in UserListPage, but same
 table should be accessible as subtable of Company table in CompanyListPage.




 --

 S pozdravom

 Boris Brinza
 HT Solution s.r.o.
 Digital Park II
 Einsteinova 25
 851 01 Bratislava
 Slovakia

 Phone: +421 2 3500 2512,  Mobile: +421 903 602 126
 E-mail: boris.bri...@htsolution.sk | www.htsolution.sk


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