>From: ÁÖ Ã÷ <[EMAIL PROTECTED]> 
>
> thanks for your explaination and let me know more about clay details. 
> here, I borrow the clay template parser code to expand the my advice of 
> where and how merge verbatim component children. 
> 
> because the template parsing usually runs only once and then generated meta 
> bean tree will be placed in cache for latter using, the performance of 
> template parsing isn't bottleneck and not important. so , parsing work is 
> inclined to hava an clear and extendable structured design. however, the 
> parsed results (that meta bean tree) are used over and over again, so, 
> optimizing results is meaningful. 
> 
> the following code are from ClayTemplateParser.java, comments inserted 
> between lines. 
> 
[snippet]
> //verify there is not a duplicate component id within a naming 
> //container. 
> config.checkTree(root); 
> 
> // here, you can merge those adjacent verbatim elements 
> config.optimizeTree(root); 
> // in optimizeTree, you can traverse elementbean tree, and 
> iterate children treeset of every element. 
> // while meeting continuous HtmlOutputText and it's value is not 
> valuebinding reference, you can merge them into one 
> // HtmlOutputText. Further, in fact , JSF EL can evaluate value 
> binding string like " abcd#{bean.value}efg#{bean2.value2}hi", 
> // so, you probably can merge more verbatim elementbean into 
> one. 
> 
> return root; 
> } 
> 

I think this is a good idea and you have some good points about the 
reuse.  Please create a new ticket http://issues.apache.org/struts.  I'll
start thinking about a patch if you don't beat me to it. 

Gary


> --------------------------------------------------------------------- 
> To unsubscribe, e-mail: [EMAIL PROTECTED] 
> For additional commands, e-mail: [EMAIL PROTECTED] 
> 

Reply via email to