6 Replies Latest reply on Dec 14, 2009 12:52 PM by Ldsfsdf GFdsf

    Newbie, how declaring read only variables?

    Ldsfsdf GFdsf Newbie

      Hi,

      I am using JBoss5.1.0 with RichFaces. I have a very simple form with an inputText and a progressbar. I am using this Bean.

      public class Bean {
       public String text;
       public Integer pro;
       public Bean() {
       }
       public String getText() {
       return text;
       }
       public void setText(String text) {
       this.text = text;
       if (this.text != null) {
       this.pro = this.text.length();
       }
       }
       public Integer getPro() {
       return pro;
       }
       public void setPro(Integer pro) {
       this.pro = pro;
       }
      }
      


      My problem is, that I don't want to implement the setPro-Method because it's unnecessary. I guess I have to configure it in faces-config.xml but like I said I don't know how. May anybody give me some advise how to do it?
      Thanks a lot

      Jonny