This content has been marked as final.
Show 2 replies
-
1. Re: RequestParameter issue null value
salski22 Jan 12, 2010 1:59 PM (in response to salski22)Does it true that f:param works on h:commandLink and h:outputLink only. If so, how can I pass parameter to backing bean from xhtml outputtext?
I have three values that I can display in outputtext using<h:outputFormat value="{0}{1}{2}{3}"> <f:param value="#{event.single}"/> <f:param value="#{event.couple}"/> <f:param value="#{event.children}"/> <f:param value="#{event.groups}"/> </h:outputFormat>
but I need to format those 3 values in one string with some additional text depending on these vales. So how can I use bean from above to format outputtext -
2. Re: RequestParameter issue null value
salski22 Jan 12, 2010 2:47 PM (in response to salski22)I found solution :) Maybe this post will be helpfull for someone
We need outputtext
<h:outputText binding="#{SetW.text}" value="#{SetW.textValue}" > <f:attribute name="attributename" value="#{event.city}" /> <f:attribute name="attributename1" value="#{event.eventname}" /> </h:outputText>
and backing bean
@Name("SetW") public class SetWhos { private HtmlOutputText text; public HtmlOutputText getText() { return text; } public String getTextValue() { return (String) text.getAttributes().get("attributename") + (String) text.getAttributes().get("attributename1"); } public void setText(HtmlOutputText text) { this.text = text; } }
GREAT!!!