Though there has been much debate about allowing such markupdriven
configuration (with me being in favor for allowing it to some extend),
configuring components like that is not 'the Wicket way'. Rather, you
would do any configuration in your code. Contrairy to most alternative
frameworks, Wicket is largely unmanaged, hence you are in charge of
component and initialization yourself. Thus, you would do:
MyComponent c = new MyComponent();
c.setParam1(...)
c.setXX(..
add(c);
To get a better idea, please take a look at Wicket's examples.
Eelco
On 11/3/05, David Leangen <[EMAIL PROTECTED]> wrote:
>
> Hello!
>
> I have read the doc and looked at the examples, but there are still a
> few things that I don't "get". Probably, I have the Tapestry approach
> stuck too much in my head...
>
>
> How do I write a component that takes parameters?
>
> This is an example of what I'd like to do:
>
> <span wicket:id="myComponent" param1="someValue"
> param2="ognl:com.package.SomeClass"/>
>
>
> public class MyPanel
> extends Panel
> {
> private String m_param1;
> private SomeClass m_someClass;
>
> public MyPanel( final String id )
> {
> super( id );
> }
>
> public void setParam1( final String param1 )
> {
> m_param1 = param1;
> }
>
> public String getParam1()
> {
> return m_param1;
> }
>
> public void setSomeClass( final SomeClass someClass )
> {
> m_someClass = someClass;
> }
>
> public SomeClass getSomeClass()
> {
> return m_someClass;
> }
> }
>
>
> Thanks for any advice you can give!
>
>
>
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by:
> Tame your development challenges with Apache's Geronimo App Server. Download
> it for free - -and be entered to win a 42" plasma tv or your very own
> Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user