You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by phillip rhodes <rh...@yahoo.com> on 2004/12/01 18:58:05 UTC

Layout component that reads template from a db?

I am working on a "portal" like application.
You can see what I have at
http://dev.rhoderunner.com:8080/portal/
It is written on top of jsso, which is a tapestry
based user authentication/authorization engine.

I have a design issue that I wanted to bounce off the
list.  

I want the portal admin to be able to set the layout
for a particular page.  The "layout" would be a string
stored in a database that would be a component
template.  Currently, there is only one static
"Layout"  component that I use in my Tapestry page. 
That is how my current application is working now.

Any thoughts on how to implement Layout functionality
in tapestry?
Thanks.



Here is an example of Layout.html:
<span jwcid="$content$">
	<table border="0">
		<tr>
			<td valign="top" width="20%">
				<span jwcid="@RenderBlock"
block="ognl:getBlockByName('left')">
					Page content goes here</span>
			</td>
			<td valign="top" >
				<span jwcid="@RenderBlock" 
					block="ognl:getBlockByName('middle')">Page
content goes 
					here</span>
			</td>
			<td valign="top" width="30%">
				<span jwcid="@RenderBlock"
block="ognl:getBlockByName('right')">
					Page content goes here</span>
			</td>
		</tr>
	</table>
</span>



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


Re: Layout component that reads template from a db?

Posted by Kris Rasmussen <kr...@yahoo.com>.
Michael,
This is actually exactly what I needed! I'll see what I can do with it when I finish finals.
 
Thanks!
 
Kris

Michael Henderson <mh...@mac.com> wrote:
Hi

Check out DynamicBlock:

http://www.behindthesite.com/blog/C1931765677/E1630021481/

It's not packaged but it might help out, write logic to generate a 
component name at runtime for DynamicBlock and implement the template 
resolver delegate to load and return a template from the database.


Mike


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


		
---------------------------------
Do you Yahoo!?
 Read only the mail you want - Yahoo! Mail SpamGuard.

Re: Layout component that reads template from a db?

Posted by Michael Henderson <mh...@mac.com>.
Hi

Check out DynamicBlock:

http://www.behindthesite.com/blog/C1931765677/E1630021481/

It's not packaged but it might help out, write logic to generate a 
component name at runtime for DynamicBlock and implement the template 
resolver delegate 	to load and return a template from the database.


Mike


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


Re: Layout component that reads template from a db?

Posted by Kris Rasmussen <kr...@yahoo.com>.
Hey Phillip,
I have been trying to figure out how best to accomplish the same thing for a while now. I have considered writting a new component that parses a new template format and inserts components the same way tapestry does with pages, but this seems like too much work and not making the best use of what tapestry is already capable of. It would be really cool if instead it was possible to associate multiple standard tapestry templates with the same page. I have not had a chance to dive to deep into the tapestry source yet but I can't imagine that it would be too difficult, but I'm sure it would take some time.
 
Let me know if you have any better ideas.
 
Thanks,
Kris Rasmussen

phillip rhodes <rh...@yahoo.com> wrote:

I am working on a "portal" like application.
You can see what I have at
http://dev.rhoderunner.com:8080/portal/
It is written on top of jsso, which is a tapestry
based user authentication/authorization engine.

I have a design issue that I wanted to bounce off the
list. 

I want the portal admin to be able to set the layout
for a particular page. The "layout" would be a string
stored in a database that would be a component
template. Currently, there is only one static
"Layout" component that I use in my Tapestry page. 
That is how my current application is working now.

Any thoughts on how to implement Layout functionality
in tapestry?
Thanks.



Here is an example of Layout.html:




block="ognl:getBlockByName('left')">
Page content goes here


block="ognl:getBlockByName('middle')">Page
content goes 
here


block="ognl:getBlockByName('right')">
Page content goes here







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


		
---------------------------------
Do you Yahoo!?
 The all-new My Yahoo! � Get yours free!