11 Replies Latest reply on Jul 8, 2009 10:19 AM by David Bolsover

    inplaceSelect problem 3.3.0/3.3.1

    David Bolsover Newbie

      Can anyone propose a solution to this...

      The following code presents the user with an input select having the selected value determined by the value attribute of the rich:inplaceSelect tag. The problem is with display of the associated label.

       <rich:inplaceSelect listWidth="170"
       layout="block"
       defaultLabel="#{AddressEditBean.address.status}"
       value="#{AddressEditBean.address.status}" >
       <f:selectItems value="#{AddressEditBean.statusItems}"/>
       </rich:inplaceSelect>
      


      Using Richfaces 3.3.0 the code (correctly) presents the user with a the label associated the appropriate value from the selectItems.

      However, using RichFaces 3.3.1, the code always presents the
      value rather than the label.

      I assume this is a bug in 3.3.1 but have been unable to find references to the issue.
      For other reasons, I want to use 3.3.1 - but have to fix this issue before I can move


        • 1. Re: inplaceSelect problem 3.3.0/3.3.1
          Nick Belaevski Master

          Hi,

          Can you please try 3.3.2-snapshot?

          • 2. Re: inplaceSelect problem 3.3.0/3.3.1
            David Bolsover Newbie

            Thanks for response..
            I've just downloaded and tested against 3.3.2 5th July snapshot; the problem remains. When initially renderd, the Value is displayed rather than the Label. It is then possible to make a selection when the Label is displayed but after form sumit, the display reverts to the Value.

            David

            • 3. Re: inplaceSelect problem 3.3.0/3.3.1
              David Bolsover Newbie

              I thought I should revisit this issue in order to check out a couple of possiblities:

              I have tested using 3.3.2 5th July snapshot against following code:

              <rich:inplaceSelect listWidth="170"
               layout="block"
               value="#{AddressEditBean.address.status}" >
               <f:selectItems value="#{AddressEditBean.statusItems}"/>
              </rich:inplaceSelect>
              


              According to the TLD, attribute 'defaultLabel' should only have any effect whilst 'value' is undefined. In practice, with the above code NOTHING is displayed on initial page render even though 'value' is defined and has a valid value corresponding to one of the selectItem elements.

              If I use the code:

              
               <rich:inplaceSelect listWidth="170"
               layout="block"
               defaultLabel="#{AddressEditBean.address.status}"
               value="#{AddressEditBean.address.status}" >
               <f:selectItems value="#{AddressEditBean.statusItems}"/>
               </rich:inplaceSelect>
              


              The value is displayed rather than the corresponding label.

              • 4. Re: inplaceSelect problem 3.3.0/3.3.1
                Nick Belaevski Master

                Can you please post bean code?

                • 5. Re: inplaceSelect problem 3.3.0/3.3.1
                  David Bolsover Newbie

                  Hi there - I've tried to pick out the relevant stuff...

                  AddressEditBean

                  
                  package com.nomogen.yosemite.bean.edit;
                  
                  //~--- non-JDK imports --------------------------------------------------------
                  
                  import com.nomogen.app.AppConstants;
                  import com.nomogen.yosemite.bean.BaseBean;
                  import com.nomogen.yosemite.dao.AddressDao;
                  import com.nomogen.yosemite.hibernate.Address;
                  import com.nomogen.yosemite.hibernate.Contact;
                  
                  //~--- JDK imports ------------------------------------------------------------
                  
                  
                  import javax.faces.context.ExternalContext;
                  import javax.faces.context.FacesContext;
                  
                  import javax.servlet.http.HttpSession;
                  
                  /**
                   *
                   * @author David
                   */
                  public class AddressEditBean extends BaseBean {
                   private Address address;
                  
                   /** Creates a new instance of AddressEditBean */
                   public AddressEditBean() {}
                  
                   /**
                   * @return the address
                   */
                   public Address getAddress() {
                   return address;
                   }
                  
                   /**
                   * @param address the address to set
                   */
                   public void setAddress(Address address) {
                   this.address = address;
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @return
                   */
                   public String actionSave() {
                   FacesContext fc = FacesContext.getCurrentInstance();
                   ExternalContext ec = fc.getExternalContext();
                   HttpSession httpSes = (HttpSession) ec.getSession(false);
                   AddressDao dao = new AddressDao();
                   Contact contact = (Contact) httpSes.getAttribute(AppConstants.CONTACT);
                  
                   dao.saveActiveAddressWithHistory(address, contact);
                  
                   return "success";
                   }
                  }
                  


                  Address

                  /*
                  * Address.java
                  *
                   */
                  package com.nomogen.yosemite.hibernate;
                  
                  //~--- JDK imports ------------------------------------------------------------
                  
                  import java.sql.Timestamp;
                  
                  /**
                   * Class description
                   *
                   *
                   * @version Enter version here..., 09/06/30
                   * @author Enter your name here...
                   */
                  public class Address extends AbstractBean implements java.io.Serializable {
                   private String[] labels = {
                   "rowid", "id", "type", "usage", "name", "addr1", "addr2", "addr3", "city", "state", "zip", "country",
                   "landline", "fax", "cell", "website", "email", "narr", "status", "added", "changed", "userid"
                   };
                   private Timestamp added; // Size: 23.3, Nullable:true
                   private String addr1; // Size: 40.0, Nullable:true
                   private String addr2; // Size: 40.0, Nullable:true
                   private String addr3; // Size: 40.0, Nullable:true
                   private String cell; // Size: 7.0, Nullable:true
                   private Timestamp changed; // Size: 23.3, Nullable:false
                   private String city; // Size: 40.0, Nullable:true
                   private String country; // Size: 20.0, Nullable:true
                   private String email; // Size: 40.0, Nullable:true
                   private String fax; // Size: 7.0, Nullable:true
                   private Integer id; // Size: 10.0, Nullable:false
                   private Object[] index;
                   private String landline; // Size: 7.0, Nullable:true
                   private String name; // Size: 40.0, Nullable:true
                   private String narr; // Size: 180.0, Nullable:true
                   private String rowid; // Primary Key Field size: 32.0, Nullable:false
                   private String state; // Size: 20.0, Nullable:true
                   private Character status; // Size: 1.0, Nullable:true
                   private Character type; // Size: 1.0, Nullable:false
                   private Character usage; // Size: 1.0, Nullable:true
                   private String userid; // Size: 10.0, Nullable:true
                   private String website; // Size: 40.0, Nullable:true
                   private String zip; // Size: 10.0, Nullable:true
                  
                   /**
                   * Constructs ...
                   *
                   */
                   public Address() {}
                  
                   /**
                   * Method description
                   *
                   *
                   * @return
                   */
                   public String getRowid() {
                   return rowid;
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @return
                   */
                   public Integer getId() {
                   return id;
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @return
                   */
                   public Character getType() {
                   return type;
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @return
                   */
                   public Character getUsage() {
                   return usage;
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @return
                   */
                   public String getName() {
                   return name;
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @return
                   */
                   public String getAddr1() {
                   return addr1;
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @return
                   */
                   public String getAddr2() {
                   return addr2;
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @return
                   */
                   public String getAddr3() {
                   return addr3;
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @return
                   */
                   public String getCity() {
                   return city;
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @return
                   */
                   public String getState() {
                   return state;
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @return
                   */
                   public String getZip() {
                   return zip;
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @return
                   */
                   public String getCountry() {
                   return country;
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @return
                   */
                   public String getLandline() {
                   return landline;
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @return
                   */
                   public String getFax() {
                   return fax;
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @return
                   */
                   public String getCell() {
                   return cell;
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @return
                   */
                   public String getWebsite() {
                   return website;
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @return
                   */
                   public String getEmail() {
                   return email;
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @return
                   */
                   public String getNarr() {
                   return narr;
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @return
                   */
                   public Character getStatus() {
                   return status;
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @return
                   */
                   public Timestamp getAdded() {
                   return added;
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @return
                   */
                   public Timestamp getChanged() {
                   return changed;
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @return
                   */
                   public String getUserid() {
                   return userid;
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @return
                   */
                   public String[] getLabels() {
                   return labels;
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @return
                   */
                   public Object[] getIndex() {
                   index = new Object[22];
                   index[0] = (this.getRowid() != null)
                   ? this.getRowid()
                   : "";
                   index[1] = (this.getId() != null)
                   ? this.getId()
                   : "";
                   index[2] = (this.getType() != null)
                   ? this.getType()
                   : "";
                   index[3] = (this.getUsage() != null)
                   ? this.getUsage()
                   : "";
                   index[4] = (this.getName() != null)
                   ? this.getName()
                   : "";
                   index[5] = (this.getAddr1() != null)
                   ? this.getAddr1()
                   : "";
                   index[6] = (this.getAddr2() != null)
                   ? this.getAddr2()
                   : "";
                   index[7] = (this.getAddr3() != null)
                   ? this.getAddr3()
                   : "";
                   index[8] = (this.getCity() != null)
                   ? this.getCity()
                   : "";
                   index[9] = (this.getState() != null)
                   ? this.getState()
                   : "";
                   index[10] = (this.getZip() != null)
                   ? this.getZip()
                   : "";
                   index[11] = (this.getCountry() != null)
                   ? this.getCountry()
                   : "";
                   index[12] = (this.getLandline() != null)
                   ? this.getLandline()
                   : "";
                   index[13] = (this.getFax() != null)
                   ? this.getFax()
                   : "";
                   index[14] = (this.getCell() != null)
                   ? this.getCell()
                   : "";
                   index[15] = (this.getWebsite() != null)
                   ? this.getWebsite()
                   : "";
                   index[16] = (this.getEmail() != null)
                   ? this.getEmail()
                   : "";
                   index[17] = (this.getNarr() != null)
                   ? this.getNarr()
                   : "";
                   index[18] = (this.getStatus() != null)
                   ? this.getStatus()
                   : "";
                   index[19] = (this.getAdded() != null)
                   ? this.getAdded()
                   : "";
                   index[20] = (this.getChanged() != null)
                   ? this.getChanged()
                   : "";
                   index[21] = (this.getUserid() != null)
                   ? this.getUserid()
                   : "";
                  
                   return index;
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @param rowid
                   */
                   public void setRowid(String rowid) {
                   Object oldValue = getRowid();
                  
                   this.rowid = rowid;
                   firePropertyChange("rowid", oldValue, rowid);
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @param id
                   */
                   public void setId(Integer id) {
                   Object oldValue = getId();
                  
                   this.id = id;
                   firePropertyChange("id", oldValue, id);
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @param type
                   */
                   public void setType(Character type) {
                   Object oldValue = getType();
                  
                   this.type = type;
                   firePropertyChange("type", oldValue, type);
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @param usage
                   */
                   public void setUsage(Character usage) {
                   Object oldValue = getUsage();
                  
                   this.usage = usage;
                   firePropertyChange("usage", oldValue, usage);
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @param name
                   */
                   public void setName(String name) {
                   Object oldValue = getName();
                  
                   this.name = name;
                   firePropertyChange("name", oldValue, name);
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @param addr1
                   */
                   public void setAddr1(String addr1) {
                   Object oldValue = getAddr1();
                  
                   this.addr1 = addr1;
                   firePropertyChange("addr1", oldValue, addr1);
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @param addr2
                   */
                   public void setAddr2(String addr2) {
                   Object oldValue = getAddr2();
                  
                   this.addr2 = addr2;
                   firePropertyChange("addr2", oldValue, addr2);
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @param addr3
                   */
                   public void setAddr3(String addr3) {
                   Object oldValue = getAddr3();
                  
                   this.addr3 = addr3;
                   firePropertyChange("addr3", oldValue, addr3);
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @param city
                   */
                   public void setCity(String city) {
                   Object oldValue = getCity();
                  
                   this.city = city;
                   firePropertyChange("city", oldValue, city);
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @param state
                   */
                   public void setState(String state) {
                   Object oldValue = getState();
                  
                   this.state = state;
                   firePropertyChange("state", oldValue, state);
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @param zip
                   */
                   public void setZip(String zip) {
                   Object oldValue = getZip();
                  
                   this.zip = zip;
                   firePropertyChange("zip", oldValue, zip);
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @param country
                   */
                   public void setCountry(String country) {
                   Object oldValue = getCountry();
                  
                   this.country = country;
                   firePropertyChange("country", oldValue, country);
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @param landline
                   */
                   public void setLandline(String landline) {
                   Object oldValue = getLandline();
                  
                   this.landline = landline;
                   firePropertyChange("landline", oldValue, landline);
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @param fax
                   */
                   public void setFax(String fax) {
                   Object oldValue = getFax();
                  
                   this.fax = fax;
                   firePropertyChange("fax", oldValue, fax);
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @param cell
                   */
                   public void setCell(String cell) {
                   Object oldValue = getCell();
                  
                   this.cell = cell;
                   firePropertyChange("cell", oldValue, cell);
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @param website
                   */
                   public void setWebsite(String website) {
                   Object oldValue = getWebsite();
                  
                   this.website = website;
                   firePropertyChange("website", oldValue, website);
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @param email
                   */
                   public void setEmail(String email) {
                   Object oldValue = getEmail();
                  
                   this.email = email;
                   firePropertyChange("email", oldValue, email);
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @param narr
                   */
                   public void setNarr(String narr) {
                   Object oldValue = getNarr();
                  
                   this.narr = narr;
                   firePropertyChange("narr", oldValue, narr);
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @param status
                   */
                   public void setStatus(Character status) {
                   Object oldValue = getStatus();
                  
                   this.status = status;
                   firePropertyChange("status", oldValue, status);
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @param added
                   */
                   public void setAdded(Timestamp added) {
                   Object oldValue = getAdded();
                  
                   this.added = added;
                   firePropertyChange("added", oldValue, added);
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @param changed
                   */
                   public void setChanged(Timestamp changed) {
                   Object oldValue = getChanged();
                  
                   this.changed = changed;
                   firePropertyChange("changed", oldValue, changed);
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @param userid
                   */
                   public void setUserid(String userid) {
                   Object oldValue = getUserid();
                  
                   this.userid = userid;
                   firePropertyChange("userid", oldValue, userid);
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @param index
                   */
                   public void setIndex(Object[] index) {
                   Object oldValue = getIndex();
                  
                   this.index = index;
                   firePropertyChange("index", oldValue, index);
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @param other
                   *
                   * @return
                   */
                   @Override
                   public boolean equals(Object other) {
                   if ((this == other)) {
                   return true;
                   }
                  
                   if ((other == null)) {
                   return false;
                   }
                  
                   if (!(other instanceof Address)) {
                   return false;
                   }
                  
                   Address castOther = (Address) other;
                  
                   return ((this.getRowid() == castOther.getRowid())
                   || ((this.getRowid() != null) && (castOther.getRowid() != null)
                   && this.getRowid().equals(castOther.getRowid())));
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @return
                   */
                   @Override
                   public int hashCode() {
                   int result = 17;
                  
                   result = 37 * result + ((getRowid() == null)
                   ? 0
                   : this.getRowid().hashCode());
                  
                   return result;
                   }
                  
                   /**
                   * Method description
                   *
                   *
                   * @return
                   */
                   @Override
                   public String toString() {
                   StringBuffer sb = new StringBuffer();
                  
                   sb.append("rowid = " + rowid);
                   sb.append("\n");
                   sb.append("id = " + id);
                   sb.append("\n");
                   sb.append("type = " + type);
                   sb.append("\n");
                   sb.append("usage = " + usage);
                   sb.append("\n");
                   sb.append("name = " + name);
                   sb.append("\n");
                   sb.append("addr1 = " + addr1);
                   sb.append("\n");
                   sb.append("addr2 = " + addr2);
                   sb.append("\n");
                   sb.append("addr3 = " + addr3);
                   sb.append("\n");
                   sb.append("city = " + city);
                   sb.append("\n");
                   sb.append("state = " + state);
                   sb.append("\n");
                   sb.append("zip = " + zip);
                   sb.append("\n");
                   sb.append("country = " + country);
                   sb.append("\n");
                   sb.append("landline = " + landline);
                   sb.append("\n");
                   sb.append("fax = " + fax);
                   sb.append("\n");
                   sb.append("cell = " + cell);
                   sb.append("\n");
                   sb.append("website = " + website);
                   sb.append("\n");
                   sb.append("email = " + email);
                   sb.append("\n");
                   sb.append("narr = " + narr);
                   sb.append("\n");
                   sb.append("status = " + status);
                   sb.append("\n");
                   sb.append("added = " + added);
                   sb.append("\n");
                   sb.append("changed = " + changed);
                   sb.append("\n");
                   sb.append("userid = " + userid);
                   sb.append("\n");
                  
                   return sb.toString();
                   }
                  }
                  
                  
                  


                  BaseBean

                  
                  
                  package com.nomogen.yosemite.bean;
                  
                  //~--- non-JDK imports --------------------------------------------------------
                  
                  import com.nomogen.app.AppConstants;
                  import com.nomogen.yosemite.dao.ReasonDao;
                  import com.nomogen.yosemite.hibernate.Reason;
                  
                  //~--- JDK imports ------------------------------------------------------------
                  
                  import java.io.Serializable;
                  
                  import java.util.ArrayList;
                  import java.util.List;
                  
                  import javax.faces.component.UISelectItems;
                  import javax.faces.model.SelectItem;
                  
                  /**
                   *
                   * @author David
                   */
                  public class BaseBean implements Serializable {
                  
                   private List<SelectItem> statusItems;
                  
                  
                  
                   private List<SelectItem> getSelectItemsByReason(String reasonType) {
                   List<SelectItem> reasonItems = new ArrayList<SelectItem>();
                   ReasonDao reasonDao = new ReasonDao();
                  
                   for (Reason reason : reasonDao.retrieveReasonByIdAndStatus(reasonType, AppConstants.STATUS_ACTIVE)) {
                   SelectItem si = new SelectItem();
                  
                   // Value - just a char
                   si.setValue(reason.getSeq());
                   // Label - the string
                   si.setLabel(reason.getShortnarr());
                   // probably not required
                   si.setDescription(reason.getShortnarr());
                   reasonItems.add(si);
                   }
                  
                   return reasonItems;
                   }
                  
                  
                  
                   /**
                   * @return the statusItems
                   */
                   public List<SelectItem> getStatusItems() {
                   if (statusItems == null) {
                   statusItems = getSelectItemsByReason(AppConstants.REASON_STATUS);
                   }
                  
                   return statusItems;
                   }
                  
                   /**
                   * @param statusItems the statusItems to set
                   */
                   public void setStatusItems(List<SelectItem> statusItems) {
                   this.statusItems = statusItems;
                   }
                  
                  
                  }
                  
                  


                  • 6. Re: inplaceSelect problem 3.3.0/3.3.1
                    Ilya Shaikovsky Master

                    You see not the value but defaultLabel. So value just not recognized as valid. You could easily check this by changing the inplaceSelect to h:selectOneMenu. I created own sample with inplaceSelect and it works fine showing me label on initial rendering.

                    • 7. Re: inplaceSelect problem 3.3.0/3.3.1
                      David Bolsover Newbie

                      Hi Ilya

                      Yes, I agree, defaultLabel is not strictly required - but I still can not get this working in 3.3.1:

                      <h:outputText value="Using 3.3.1" /> <h:outputText value="Using 3.3.1" />
                       <h:outputText value="Address Status 1: "></h:outputText>
                       <rich:inplaceSelect listWidth="170"
                       layout="block"
                       defaultLabel="#{AddressEditBean.address.status}"
                       value="#{AddressEditBean.address.status}" >
                       <f:selectItems value="#{AddressEditBean.statusItems}"/>
                       </rich:inplaceSelect>
                       <h:outputText value="Address Status 2: "></h:outputText>
                       <h:selectOneMenu value="#{AddressEditBean.address.status}" >
                       <f:selectItems value="#{AddressEditBean.statusItems}"/>
                       </h:selectOneMenu>
                       <h:outputText value="Address Status 3: "></h:outputText>
                       <rich:inplaceSelect listWidth="170"
                       layout="block"
                       value="#{AddressEditBean.address.status}" >
                       <f:selectItems value="#{AddressEditBean.statusItems}"/>
                       </rich:inplaceSelect>
                      


                      Result:
                      [img]http://s670.photobucket.com/albums/vv68/dpbolsover/java/?action=view¤t=3_3_1.jpg[/img]

                      With 3.3.0 it is OK

                      <h:outputText value="Using 3.3.0" /> <h:outputText value="Using 3.3.0" />
                       <h:outputText value="Address Status 1: "></h:outputText>
                       <rich:inplaceSelect listWidth="170"
                       layout="block"
                       defaultLabel="#{AddressEditBean.address.status}"
                       value="#{AddressEditBean.address.status}" >
                       <f:selectItems value="#{AddressEditBean.statusItems}"/>
                       </rich:inplaceSelect>
                       <h:outputText value="Address Status 2: "></h:outputText>
                       <h:selectOneMenu value="#{AddressEditBean.address.status}" >
                       <f:selectItems value="#{AddressEditBean.statusItems}"/>
                       </h:selectOneMenu>
                       <h:outputText value="Address Status 3: "></h:outputText>
                       <rich:inplaceSelect listWidth="170"
                       layout="block"
                       value="#{AddressEditBean.address.status}" >
                       <f:selectItems value="#{AddressEditBean.statusItems}"/>
                       </rich:inplaceSelect>


                      Result:
                      [img]http://s670.photobucket.com/albums/vv68/dpbolsover/java/?action=view¤t=3_3_0.jpg[/img]

                      I'd like to use inplaceSelect since this gives whole page same look and feel with inplaceInput items - but getting deeply frustated. I NEED to move to 3.3.1 because later version offers bug fixes in other areas.

                      • 8. Re: inplaceSelect problem 3.3.0/3.3.1
                        David Bolsover Newbie

                        Sorry looks like there was a problem with the forum accepting the original img tag...
                        Relevant pictures are here:
                        Using 3.3.0
                        [IMG]http://i670.photobucket.com/albums/vv68/dpbolsover/java/3_3_0.jpg[/IMG]
                        Using 3.3.1
                        [IMG]http://i670.photobucket.com/albums/vv68/dpbolsover/java/3_3_1.jpg[/IMG]

                        • 9. Re: inplaceSelect problem 3.3.0/3.3.1
                          David Bolsover Newbie

                          Hi guys

                          I think I have a pointer to the problem... and a clue about what has changed between 3.3.0 and 3.3.1 that appears to have broken my original code:

                          This works as expected in 3.3.1 where AddressEditBean.address.stringA is declared as a String having the value "A":

                          <rich:inplaceSelect listWidth="170"
                           layout="block"
                           value="#{AddressEditBean.address.stringA}" >
                           <f:selectItem itemValue="A" itemLabel="Active"/>
                           <f:selectItem itemValue="I" itemLabel="Inactive"/>
                           </rich:inplaceSelect>


                          This does NOT work in 3.3.1 where AddressEditBean.address.characterA is a Character having the value 'A'.

                          <rich:inplaceSelect listWidth="170"
                           layout="block"
                           value="#{AddressEditBean.address.characterA}" >
                           <f:selectItem itemValue="A" itemLabel="Active"/>
                           <f:selectItem itemValue="I" itemLabel="Inactive"/>
                           </rich:inplaceSelect>

                          BOTH forms of the code work in 3.3.0 -- Has there been a change between 3.3.0 and 3.3.1 that would explain this?


                          • 10. Re: inplaceSelect problem 3.3.0/3.3.1
                            Nick Belaevski Master

                            I guess matching before was done by converted representation (i.e. by comparing toString() value). In 3.3.1 it's done by equals(), as should be.

                            • 11. Re: inplaceSelect problem 3.3.0/3.3.1
                              David Bolsover Newbie

                              Thanks... Seems like I have a way forward now - have refactored to use String values rather than character values.