Re: partially update with another page or component

2012-07-20 Thread Thiago H de Paula Figueiredo
On Thu, 19 Jul 2012 23:49:52 -0300, mu wrote: :) thanks You're welcome! :) By the way, the Tapestry BeanModel-based components (BeanEditor, BeanEditForm, Grid and BeanDisplay) use this exact same solution. On Fri, Jul 20, 2012 at 10:20 AM, Thiago H de Paula Figueiredo wrote: On Thu,

Re: partially update with another page or component

2012-07-19 Thread mu
:) thanks On Fri, Jul 20, 2012 at 10:20 AM, Thiago H de Paula Figueiredo wrote: > On Thu, 19 Jul 2012 22:00:04 -0300, mu wrote: > >>> You can @Inject ComponentResource, use getPage() to retrive the page >>> instance as a Component and use Component.getBlock(). >> >> >> it works, thanks. Does thi

Re: partially update with another page or component

2012-07-19 Thread Thiago H de Paula Figueiredo
On Thu, 19 Jul 2012 22:00:04 -0300, mu wrote: You can @Inject ComponentResource, use getPage() to retrive the page instance as a Component and use Component.getBlock(). it works, thanks. Does this pattern i used here against Tapestry's philosophy and architecture? Nope. I'd never suggested

Re: partially update with another page or component

2012-07-19 Thread mu
> You can @Inject ComponentResource, use getPage() to retrive the page > instance as a Component and use Component.getBlock(). it works, thanks. Does this pattern i used here against Tapestry's philosophy and architecture? - To u

Re: partially update with another page or component

2012-07-19 Thread Thiago H de Paula Figueiredo
On Thu, 19 Jul 2012 20:40:47 -0300, mu wrote: The question is that the quantity of block is so much, about 100. Wow, 100? Can we ask why so many different outputs? so i want to split them into different page, and dynamic load them on runtime. You can @Inject ComponentResource, use getPage

Re: partially update with another page or component

2012-07-19 Thread Thiago H de Paula Figueiredo
On Thu, 19 Jul 2012 20:37:24 -0300, mu wrote: Exactly. Otherwise, you'd need to access part of a page's template in another page, and that's something completely against Tapestry's philosophy and architecture. The content of the zone depends on what the user selected on runtime, what is th

Re: partially update with another page or component

2012-07-19 Thread mu
The question is that the quantity of block is so much, about 100. so i want to split them into different page, and dynamic load them on runtime. On Thu, Jul 19, 2012 at 9:46 PM, Alex Kotchnev wrote: > You can probably use Blocks to return the partial page updates, e.g. > in your template > > S

Re: partially update with another page or component

2012-07-19 Thread mu
> Exactly. Otherwise, you'd need to access part of a page's template in > another page, and that's something completely against Tapestry's philosophy > and architecture. The content of the zone depends on what the user selected on runtime, what is the best practice to do this? ---

Re: partially update with another page or component

2012-07-19 Thread Alex Kotchnev
You can probably use Blocks to return the partial page updates, e.g. in your template Some content here In your page class @Inject private Block fooBlock Object onSomeEvent() { return fooBlock } Technically, it's the easiest if your blocks are defined on the same page (as described above).

Re: partially update with another page or component

2012-07-19 Thread Thiago H de Paula Figueiredo
On Thu, 19 Jul 2012 06:02:34 -0300, Lance Java wrote: Returning a Page class tells tapestry to redirect to that page. I think that you want to extract the page logic / tml into a component and then use the component in two places. Exactly. Otherwise, you'd need to access part of a page's

Re: partially update with another page or component

2012-07-19 Thread Lance Java
Returning a Page class tells tapestry to redirect to that page. I think that you want to extract the page logic / tml into a component and then use the component in two places. -- View this message in context: http://tapestry.1045711.n5.nabble.com/partially-update-with-another-page-or-component