well normally you would just do

class monitorpage extends webpage {
  public monitorpage(string deviceid) {
     .. do whatever with deviceid
  }
}

if you need your pages to be bookmarkable then just use

class monitorpage extends webpage {
  public monitorpage(pageparameters params) {
    string deviceid=params.get("0");
   }
}

and mount the page with mount("/device",new
indexedurlcodingstrategy(monitorpage.class));
then the urls are /device/deviceid

-igor

On Wed, Aug 6, 2008 at 10:48 AM, Lorenzo Bolzani <[EMAIL PROTECTED]> wrote:
> Hi all, I have a page to monitor the status of a remote device.
> The page just stay there and refresh automatically to display the actual 
> state.
>
> The problem is that I need to have to distinct pages to monitor two
> distinct devices.
>
> My ideal approach would be to define two pages in spring, something like this
>
> <bean class="DeviceMonitorPage" name="monitor1">
>    <property name="device" ref="device1"/>
>    <property name="mountUrl" value="deviceMonitor1"/>
> </bean>
>
> <bean class="DeviceMonitorPage" name="monitor2">
>    <property name="device" ref="device2"/>
>    <property name="mountUrl" value="deviceMonitor2"/>
> </bean>
>
> but I know that Wicket is not going to look for this pages in my
> spring-config file.
>
> In other words I need two instances of the same page configured in two
> different ways.
> Is this possibile? How can I pass in the parameters (with or without
> spring)? I found nothing about this in the docs.
> In this way I could pass in the ref name (device1 or device2) and make
> it work with an explicit spring context lookup (no injection).
>
> The @SpringBean annotation works but in this specific case it is not
> usable because of the two different parameters.
>
> Thanks for any suggestions.
>
>
> Bye
>
> Lorenzo
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to