[prev in list] [next in list] [prev in thread] [next in thread] 

List:       tapestry-user
Subject:    Re: Dynamic pages (or: arguments to pages)
From:       Ulrich_Stärk <uli () spielviel ! de>
Date:       2007-11-26 19:34:34
Message-ID: 474B1FCA.8020601 () spielviel ! de
[Download RAW message or body]

With Tapestry 4.1 you would inject the WebRequest object and call 
getParameterValue() on it (see 
http://tapestry.apache.org/tapestry4.1/apidocs/org/apache/tapestry/web/WebRequest.html).
To inject the WebRequest use

@InjectObject("infrastructure:request")
public abstract WebRequest getRequest();

in your page class.

Cheers,

Uli

Kaspar Fischer schrieb:
> Hi All,
> 
> I am new to Tapestry and would be glad to receive a hint on how to realize
> "dynamic pages", i.e., pages whose content depends on GET arguments.
> 
> I have a database full of articles, each having an Id, and I want to
> show each article on its own page. In PHP, I would have used URLs like
> 
>   http://my.organization.org/app?page=article&id=2832
> 
> to display article with Id 2832.
> 
> I am not quite sure what the Tapestry way for such a problem is. I've
> coded a page ArticlePage that extends BasePage and now need a way to
> learn the Id from the URL. How can I do this?
> 
> Many thanks,
> Kaspar
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic