You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mark P Ashworth <in...@connext.co.za> on 2007/06/20 14:20:16 UTC

[S2] FreeMarker template and custom tag

Good Day,

I have a custom tag that I am developing and I am trying to figure out where
the parameter.id values come from. For example, 

&lt;#if parameters.align?exists&gt;
align="${parameters.align?html}"
&lt;/#if&gt;

This is used in the graph.ftl that is in template.simple.

My tag has those parameters and my tld has those parameters. What do I need
to do to get it to work?

Regards,
Mark P Ashworth
http://www.connext.co.za
-- 
View this message in context: http://www.nabble.com/-S2--FreeMarker-template-and-custom-tag-tf3952011.html#a11212172
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: [S2] FreeMarker template and custom tag

Posted by Mark P Ashworth <in...@connext.co.za>.
Good Day,

I thought I would post a reply in case anyone needs to find the answer.

Well it seems that the UIBean has an evaluateParams and so to get my
parameters visible in the template is to do something like...

public void evaluateParams() {
	super.evaluateParams();
	
if(width != null)
    addParameter("width", findString(width));
if(height != null)
    addParameter("height", findString(height));
if(align != null)
    addParameter("align", findString(align));
if(chartUrl != null)
    addParameter("chart", findString(chartUrl));
if(dataUrl != null)
    addParameter("url", findString(dataUrl));
if(dataAction != null)
    addParameter("action", findString(dataAction));
if(bgColor != null)
    addParameter("bgcolor", findString(bgColor));
}

Regards,
Mark P Ashworth
http://www.connext.co.za




Mark P Ashworth wrote:
> 
> Good Day,
> 
> I have a custom tag that I am developing and I am trying to figure out
> where the parameter.id values come from. For example, 
> 
> &lt;#if parameters.align?exists&gt;
> align="${parameters.align?html}"
> &lt;/#if&gt;
> 
> This is used in the graph.ftl that is in template.simple.
> 
> My tag has those parameters and my tld has those parameters. What do I
> need to do to get it to work?
> 
> Regards,
> Mark P Ashworth
> http://www.connext.co.za
> 

-- 
View this message in context: http://www.nabble.com/-S2--FreeMarker-template-and-custom-tag-tf3952011.html#a11221801
Sent from the Struts - User mailing list archive at Nabble.com.


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