You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Elad Messing <El...@sphera.com> on 2004/01/25 18:39:41 UTC

Reference to a .jwc 's component in its .html

Hi all
	In my application I am using the "Border" strategy to define 1
template.

**************Border.jwc *********************************
<component-specification 
	class="com.sphera.rd.layout.Border"
allow-informal-parameters="no">
	
    <parameter name="cache" type="java.lang.String" required="yes" />

<component id="insertPageCache" type="Insert">
	<inherited-binding name="value" parameter-name="cache" />
</component>

	The "cache" is being used in the border's .html page in the
"Pragma" meta.
**********************************************************
Now - what I want to do is reference this value inside the Border .html
file - in the "Pragma" tag.
So what I get is each page that uses the "Border" needs to define its
cache - to whatever time it needs (some pages need not to be cached).

I tried this  - but it doesn't work :

*******************Border.html **************************** <html
jwcid="shell"> <span jwcid="shellBlock">
	<META jwcid="@Any" http-equiv="Pragma"
content="ognl:insertPageCache" /> </span>
****************************************************************

1. How is it Done ? How can I reference the Border parameter in ognl
statement. 
2. How can I define a default property for the "cache" parameter in the
"Border" component ?
3. Is this the right way to do it ?

Thank you !!




Elad Messing

Sphera Tech. LTD
 
<http://www.sphera.com/demosite/index.htm>



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


Re: Reference to a .jwc 's component in its .html

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
 From a quick glance, it all looks fine to me.  When you say "it doesn't 
work" could you be more explicit?  Is there an exception thrown?  Or 
what gets generated in the HTML pages for that meta tag?

One enhancement would be to use a java.util.Date for the value, allow 
it to be optional, and specify a reasonable default or eliminate the 
meta tag if no cache parameter is provided (sorry, just thinking 
fancier things with it).

On Jan 25, 2004, at 12:39 PM, Elad Messing wrote:

> Hi all
> 	In my application I am using the "Border" strategy to define 1
> template.
>
> **************Border.jwc *********************************
> <component-specification
> 	class="com.sphera.rd.layout.Border"
> allow-informal-parameters="no">
> 	
>     <parameter name="cache" type="java.lang.String" required="yes" />
>
> <component id="insertPageCache" type="Insert">
> 	<inherited-binding name="value" parameter-name="cache" />
> </component>
>
> 	The "cache" is being used in the border's .html page in the
> "Pragma" meta.
> **********************************************************
> Now - what I want to do is reference this value inside the Border .html
> file - in the "Pragma" tag.
> So what I get is each page that uses the "Border" needs to define its
> cache - to whatever time it needs (some pages need not to be cached).
>
> I tried this  - but it doesn't work :
>
> *******************Border.html **************************** <html
> jwcid="shell"> <span jwcid="shellBlock">
> 	<META jwcid="@Any" http-equiv="Pragma"
> content="ognl:insertPageCache" /> </span>
> ****************************************************************
>
> 1. How is it Done ? How can I reference the Border parameter in ognl
> statement.
> 2. How can I define a default property for the "cache" parameter in the
> "Border" component ?
> 3. Is this the right way to do it ?
>
> Thank you !!
>
>
>
>
> Elad Messing
>
> Sphera Tech. LTD
>
> <http://www.sphera.com/demosite/index.htm>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


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