ICEfaces
  1. ICEfaces
  2. ICE-1665

Support Seam tags related to <s:selectItems> to allow more than a String to be returned.

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6DR#5
    • Fix Version/s: 1.6.1
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      Seam , Icefaces

      Description

      This includes <s:convertEnum> and <s:convertEntity> and possibly other seam components which affect our MenuRenderer. Currently the MenuRenderer allows a String to be returned from a list of items. These newer components allows objects to be returned and then with the value="" attribute you can select a different attribute (rather than the label) of an object to be returned. A <s:convertEnum> or <s:convertEntity> will convert this to a String to be returned.

      Currently the user would have to write their own <f:convert> or use an actionListener to look up the String value returned from their list.


        Issue Links

          Activity

          Hide
          Judy Guglielmin added a comment -

          Similar behavior and Classes

          Show
          Judy Guglielmin added a comment - Similar behavior and Classes
          Hide
          Judy Guglielmin added a comment -

          See the following link for the EnumListConverter Class that is responsible for this:-

          http://shrubbery.mynetgear.net/wiki/Select_lists_with_Seam

          Show
          Judy Guglielmin added a comment - See the following link for the EnumListConverter Class that is responsible for this:- http://shrubbery.mynetgear.net/wiki/Select_lists_with_Seam
          Hide
          Ted Goddard added a comment -

          Can our menu renderer be changed to accept Object rather than String?

          Show
          Ted Goddard added a comment - Can our menu renderer be changed to accept Object rather than String?
          Hide
          Judy Guglielmin added a comment -

          after creating a few samples and tracing them through, the MenuRenderer is indeed the problem as it is designed to only return a single string that can possibly be used with validator/converter.
          when using <s:selectItem> with a label=" " var=" " and value=" " the value is always returned null (this can't be rendered which is why the box is always empty when you use this s component with <h:selectOneMenu>, <h:selectManyListbox> or it's ice equivalents.

          The major benefit of the<s:selectItem> is that you don't have to write a converter. You can actually use an entity object, element from a datamodel or a list of objects and it will let you return a value that is different from the label (not limited to strings).

          If we are just worried about Seam, we can detect if we have a seam environment and whether the s:selectItem is being used and return the object value as well as label....or we could create a similar renderer that we would use for this component.....What do you guys think?

          Show
          Judy Guglielmin added a comment - after creating a few samples and tracing them through, the MenuRenderer is indeed the problem as it is designed to only return a single string that can possibly be used with validator/converter. when using <s:selectItem> with a label=" " var=" " and value=" " the value is always returned null (this can't be rendered which is why the box is always empty when you use this s component with <h:selectOneMenu>, <h:selectManyListbox> or it's ice equivalents. The major benefit of the<s:selectItem> is that you don't have to write a converter. You can actually use an entity object, element from a datamodel or a list of objects and it will let you return a value that is different from the label (not limited to strings). If we are just worried about Seam, we can detect if we have a seam environment and whether the s:selectItem is being used and return the object value as well as label....or we could create a similar renderer that we would use for this component.....What do you guys think?
          Hide
          Judy Guglielmin added a comment -

          Adnan....basically you don't even need seam to test <s:selectItems> Check out this url where the guys who developed it have put it in another jar that you can add to a standard ICEfaces application (put on a jsp page) and test there. A simple test case is also on the web site. Once it works for this, we can test further with Seam.

          http://jsf-comp.sourceforge.net/components/easysi/index.html

          Show
          Judy Guglielmin added a comment - Adnan....basically you don't even need seam to test <s:selectItems> Check out this url where the guys who developed it have put it in another jar that you can add to a standard ICEfaces application (put on a jsp page) and test there. A simple test case is also on the web site. Once it works for this, we can test further with Seam. http://jsf-comp.sourceforge.net/components/easysi/index.html
          Hide
          Adnan Durrani added a comment -

          After testing it came across that the s:selectItems works fine with the ICEfaces. The problem was with the hibernate, which was returning an empty list. As this bug is not related to s:selectItems so I am closing this bug.

          Show
          Adnan Durrani added a comment - After testing it came across that the s:selectItems works fine with the ICEfaces. The problem was with the hibernate, which was returning an empty list. As this bug is not related to s:selectItems so I am closing this bug.
          Hide
          Judy Guglielmin added a comment -

          Actually the problem lies with the <s:decorate tag as the hibernate works properly (with the s:selectItems tag) when you comment out the <s:decorate template=" ....

          Am waiting for the other changes for Facelet View Handler (ICE-1710 and 1711) to see if this is fixed with it.

          Show
          Judy Guglielmin added a comment - Actually the problem lies with the <s:decorate tag as the hibernate works properly (with the s:selectItems tag) when you comment out the <s:decorate template=" .... Am waiting for the other changes for Facelet View Handler ( ICE-1710 and 1711) to see if this is fixed with it.
          Hide
          Mark Collette added a comment -

          There was a problem with the Seam "ui" example working with ICEfaces, where the colour selection in the s:selectItems page wouldn't work.

          Show
          Mark Collette added a comment - There was a problem with the Seam "ui" example working with ICEfaces, where the colour selection in the s:selectItems page wouldn't work.
          Hide
          Mark Collette added a comment -

          The following block of code was having problems because MenuRenderer was not properly converting values in a List, like is was in an array:

          <h:selectManyListbox ...>
          <s:selectItems .../>
          <s:convertEntity />
          </h:selectManyListbox ...>

          Subversion 14690
          icefaces\core\src\com\icesoft\faces\renderkit\dom_html_basic\MenuRenderer.java

          Show
          Mark Collette added a comment - The following block of code was having problems because MenuRenderer was not properly converting values in a List, like is was in an array: <h:selectManyListbox ...> <s:selectItems .../> <s:convertEntity /> </h:selectManyListbox ...> Subversion 14690 icefaces\core\src\com\icesoft\faces\renderkit\dom_html_basic\MenuRenderer.java

            People

            • Assignee:
              Unassigned
              Reporter:
              Judy Guglielmin
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: