You can find the full source code for this website in the Seam package in the directory /examples/wiki. It is licensed under the LGPL.
| Online: | 18 Members of 4546 |
| Forum: Seam Users |
18. Aug 2008, 14:55 CET | Link |
All,
I'm having trouble getting a Seam Label to display the text I want it to.
In the code below name
is a string that's suitable as an id for a UIComponent. localeName is the localised, user friendly, name that I'd like to display on my page.
However, when I render the page, the label text displays the value of name
instead of localeName
Obviously I'm missing something. How do I get the HtmlLabel to display the value of localeName
If you think this is the wrong forum to post this query on could you suggest a more appropriate one? If you'd like more info just ask and I'll get it for you.
thanks, Glen
Version info
Using Sun's reference jsf implementation 1.2_09-BETA1
Seam 2.02GA
Richfaces 3.2.1GA
import org.jboss.seam.ui.component.html.HtmlLabel;
import javax.faces.component.html.HtmlOutputText;
...
HtmlInputText inputText = new HtmlInputText();
HtmlLabel seamLabel = new HtmlLabel();
...
inputText.setValueExpression("value", createValueExpression(expr));
inputText.setId(name);
inputText.setLabel(localeName);
inputText.setTitle(localeName);
seamLabel.setFor(inputText.getClientId(FacesContext.getCurrentInstance()));
seamLabel.setTitle(localeName);
seamLabel.setValue(localeName);