Re: [Wicket-user] Associating one java file with 2 different markups

2006-12-12 Thread Nino Wael
I see two options for you either use models to employ your different rules or 
build two entirely different components. I would go for using models since it's 
good practice...

Somewhere I have a component that's basicly the palette component with an 
dropdown(either ajax based or standard postback), this component needs to call 
different methods depending where I use it. So I looked towards reflection 
package and this is probally what you are interested in.

I use reflection to setup a method which I give to my component. I use models 
which I use for parameters on that method code snip:

Heres a Snip where I use it:

http://pastebin.ca/276505


Regards Nino



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: 11. december 2006 23:31
To: wicket-user@lists.sourceforge.net
Subject: [Wicket-user] Associating one java file with 2 different markups






Hello all,
I have an issue where on the same page I have to use the same component. My
application is datadriven, and those components need to have different
names and different business rules that are loaded on the runtime per
component. At the end of the day I want to have different htmls to be
attached to be associated to the same java component. How do I do it.
THank you
Gennadiy


-
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] Associating one java file with 2 different markups

2006-12-11 Thread Igor Vaynberg

you can use what is called a variation, see javadoc for
Component.getVariation() - you can override it and return a different
string. there is also a wiki page on variations.

-igor


On 12/11/06, [EMAIL PROTECTED] [EMAIL PROTECTED]
wrote:







Hello all,
I have an issue where on the same page I have to use the same component.
My
application is datadriven, and those components need to have different
names and different business rules that are loaded on the runtime per
component. At the end of the day I want to have different htmls to be
attached to be associated to the same java component. How do I do it.
THank you
Gennadiy


-
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