Why don't you want to pass the page's context to the tab component? Isn't the 
content of the tabs dependent on the value of the page's context?

On 09/12/2009, at 4:46 AM, kamiseq wrote:

> ok one more thing, my tabs are working great but let examine such a usecase
> 
> 1)I have user page with a grid of a user list
> 2)when user is selected I rerender the page with context specified by grid
> element
> 3)my url then is something like myapp/user/1 and the tab control is
> displayed with 3 tabs (for example)
> 4)when I click a tab event is triggered to component and then it redirects
> back to the page to rerender its context and here where the problem occurs
> cos the link is incorrect and the initial selection is lost
> 
> I figured out something like in tab component
> 
> @Inject
> private PageRenderLinkSource pagerender;
> @Inject
> private ComponentResources resources;
> 
> @OnEvent(component = "tabSelect")
> Object onTabActivated(String panelId) {
>    this.activeTabInfo = new TabInfo(panelId);
> *    return
> pagerender.createPageRenderLinkWithContext(this.resources.getPage().getClass(),
> ??);*
> }
> 
> and if I replace "??" with the initial context value (let say "1" everything
> works fine - the question is where to get the initial page's context from.
> 
> maybe I can aquire it as well from ComponentResources as it seams that
> framework knows about it
> [INFO] AppModule.TimingFilter Request time: 3 ms
> 127.0.0.1 -  -  [08/gru/2009:17:15:06 +0000]
> "GET*/myapp/user/index.tabnavigation.tabselect/tabVersions HTTP/1.1"
> *302 0 *"http://localhost:8080/myapp/user/1";
> ..
> *127.0.0.1 -  -  [08/gru/2009:17:15:06 +0000]* "GET /myapp/user
> HTTP/1.1"*200 1954
> * "http://localhost:8080/myapp/user/1"*
> 
> the page's Long onPasivate() doesn't help so I am a bit stuck here, and I
> dont want to pass page's context value to tab component
> 
> pozdrawiam
> Paweł Kamiński
> 
> kami...@gmail.com
> pkaminski....@gmail.com
> ______________________


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

Reply via email to