0 Replies Latest reply on Jun 7, 2008 9:06 AM by Bernard Labno

    Richfaces and bijection

    Bernard Labno Master

      I have strange problem. My facelet uses RichFaces. When I use a4j:commandButton to update some backing bean attributes which should then be outjected and displayed on the page the new value does no get outjected unless i call


      Contexts.removeFromAllContexts("categoryName");



      Any ideas what is wrong ?


      My bean in brief :


      @Name("myBean")
      public class MyBean implements MyBeanLocal {
          @In(required = false)
          @Out(required = false)
          private String categoryName;
          @Out(required = false)
          private OfferCategory selectedCategory;
      
          private void setSelectedCategory(OfferCategory category) {
              selectedCategory = category;
              Contexts.removeFromAllContexts("categoryName");
              categoryName = category == null ? "" : category.getName();
          }
      
          public void processSelection(NodeSelectedEvent e) {
              log.debug("processSelection");
              UITree processedTree = (UITree) e.getComponent();
              selectedCategory = null;
              try {
                  setSelectedCategory((OfferCategory) processedTree.getRowData());
              } catch (IllegalStateException ex) {
                  setSelectedCategory(null);
              }
              if (processedTree.getId().equals(systemTree.getId())) {
                  selectedSystemCategory = (SystemOfferCategory) selectedCategory;
                  mapping = null;
              } else {
                  selectedExternalCategory = (ExternalOfferCategory) selectedCategory;
                  if (selectedExternalCategory != null) {
                      mapping = new ArrayList(selectedExternalCategory.getMapping());
                  }
              }
          }
      }