[Wicket-user] Use attribute value to modify markup
Hi, I have a Panel and I want to change it's markup according to values specified at the tag using the panel: div wicket:id=myPanel myValues=showLeft showRight The class MyPanel should read the attribute myValues and use the values as model inside the panel, for instance show/hide some components inside that panel. How can I get the value of the attribute *inside* my Panel component? Thanks, Jan - 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.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Use attribute value to modify markup
Override onComponentTag in your component and get the values with tag.getAttributes(). In Wicket 2.0, you can even do getMarkupAttributes right in your component's constructor. Eelco On 7/24/06, jan_bar [EMAIL PROTECTED] wrote: Hi, I have a Panel and I want to change it's markup according to values specified at the tag using the panel: div wicket:id=myPanel myValues=showLeft showRight The class MyPanel should read the attribute myValues and use the values as model inside the panel, for instance show/hide some components inside that panel. How can I get the value of the attribute *inside* my Panel component? Thanks, Jan - 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.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net 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.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Use attribute value to modify markup
Thanks Eelco for you quick support. Jan Eelco Hillenius [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Override onComponentTag in your component and get the values with tag.getAttributes(). In Wicket 2.0, you can even do getMarkupAttributes right in your component's constructor. Eelco On 7/24/06, jan_bar [EMAIL PROTECTED] wrote: Hi, I have a Panel and I want to change it's markup according to values specified at the tag using the panel: div wicket:id=myPanel myValues=showLeft showRight The class MyPanel should read the attribute myValues and use the values as model inside the panel, for instance show/hide some components inside that panel. How can I get the value of the attribute *inside* my Panel component? Thanks, Jan - 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.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net 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.phpp=sourceforgeCID=DEVDEV - 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.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user