Put simply, no.  In Wicket, this is considered code.  And code goes in Java
files.  Configure it in the YourPage.java file - where you have access to
data sources, session attributes, the user, etc....

--
Jeremy Thomerson
http://www.wickettraining.com



On Mon, Sep 7, 2009 at 5:09 PM, Chris Colman
<chr...@stepaheadsoftware.com>wrote:

> I apologize in advance if there is a completely obvious solution to this
> that I have missed...
>
> Is it possible to "pass in" parameters to a panel via the markup?
>
> Eg., Let's say that there are number of different ways that a particular
> panel could be rendered and that these ways are largely determined by
> the choice of data source or perhaps even the amount of data to display
> (from a collection for example).
>
> Now let's say that I wanted to provide some level of control over which
> data source is chosen by allowing the user to pass in an extra
> 'parameter' in the markup when declaring the panel in the source markup
> like:
>
> <span wicket:id="myPanel" wicket:attribute="value" /span>
>
> So for example we might have a panel that displays the 'top 10 songs' or
> the 'top 50 songs' on a music site. The panel is exactly the same in
> each instance but the markup container that uses that panel can control
> how many songs are displayed via specification of an extra parameter
> ('count' in the following example).
>
> Eg.,
>
> One page could have a lot of space and so decide to show the top 50:
>
> <span wicket:id="songChart" wicket:count="50" /span>
>
> However another page that is more dense might only have room to display
> the top 10 songs
>
> <span wicket:id="songChart" wicket:count="10" /span>
>
> But in each case the markup and code for the panel itself does not need
> to change.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

Reply via email to