0 Replies Latest reply on Aug 18, 2008 2:55 PM by Glen Lockhart

    HtmlLabel and setFor query

    Glen Lockhart Newbie

      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);