Howard Lewis Ship wrote: > This is very easy in Tapestry; just put the components on another page, > inject the page, and choose the component from that page. And how to deal with actionlink's inside the component/block from another page? All actions will go to the page the component/block belongs to, not to the page that rendered the component/block.
Of course, I could place all required components on first page inside a block, as described earlier, but in this case to add a new fruit type (for example, "orange") I have to modify Page1 template. And I want the ability to add new view type ("lemon", "grapefruit") by adding additional .jar inside my application. Currently it looks like the following: I have several pages like ViewLemon, ViewGrapeFruit with required blocks inside them and page ViewFruit. The ViewFruit page determines the fruit type, requests the certain page from the RequestPageCache service (although it's internal, so it is not good idea to use it), retrieves block from the page and renders it. I could add new fruit types dynamically (by adding additional .jar file to WEB-INF/lib with new fruit type and View<fruit type> page). It works OK, besides the actionlink's inside the block. Do you have any idea how can I deal with this situation? I need the ability to add new "fruit types" (application plugins) without modification of page templates. > > This same approach is what drives BeanEditForm and Grid: the ability to > choose components or blocks to render at any particular time. > -- WBR, Ivan S. Dubrov
signature.asc
Description: OpenPGP digital signature