myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Delbecq <>
Subject Re: Recursive tag evaluation
Date Tue, 15 Jan 2008 14:54:02 GMT
It's not possible, mainly because the notion of tag is independant to 
JSF. JSF is a component handler. JSP tags are used to create the 
component tree. When your bean evaluation is done, the component tree is 
already build and the notion of tag is then irrelevant. However, if you 
have alternatives. One for example, would be to use at that point 
FacesContext.getCurrentInstace(). From it, you create a component and 
ask it to do it's rendering. However this is best done in a custom 
component (component delegating work to another component). Another 
solution could be to use servlet api to get another page to render to an 
internal string, and have that string returned by your component.

En l'instant précis du 15/01/08 15:14, AMIR-TAHMASSEB Marc s'exprimait 
en ces termes:
> Hi everybody,
> Does anybody know how I can evaluate the result of a tag evaluation ?
> Here is my problem : 
> In my jsp I do this :
> <h:outputText value="#{myForm.myText}" escape="false" />
> In myForm bean i have :
> public String getMyText() {
>     return "<myTag:display/>";
> }
> And myTag.display refer to a tag that i wrote and that for example
> return a string like "something"
> My problem is that the second tag is not evaluated and that i have the
> string '<myTag:display/>' in my JSP.
> I hope someone has a solution,
> regards,
> PS : sorry for the first incomplete email :-p

-- (a belgian developer's logs)

View raw message