ICEfaces
  1. ICEfaces
  2. ICE-4092

DisplayEvent.getContextValue() can only be cast to a String object

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8RC1
    • Fix Version/s: 1.8RC2, 1.8
    • Component/s: Framework, ICE-Components
    • Labels:
      None
    • Environment:
      All

      Description

      Test Case: contextValue is set on a panelGroup for a tree node for the user object of the node: <ice:panelGroup contextValue="#{item.userObject}../>. A menuPopup is also assigned to the same node. The menuPopup has its displayListener set to get the contextValue. Here is the sample code:

      public void display(DisplayEvent event){
          IceUserObject ice = (IceUserObject)event,getContextValue();
      }

      This causes a class cast exception since event.getContextValue() only returns a String object. In a different case calling ContextActionEvent.getContextValue() under similar methods returns the proper object.
      1. main.jspx
        3 kB
        Arran Mccullough
      2. TestBean.java
        4 kB
        Arran Mccullough

        Issue Links

          Activity

          Hide
          Arran Mccullough added a comment -

          Attached files to replicate this issue (main.jspx and TestBean.java)

          Show
          Arran Mccullough added a comment - Attached files to replicate this issue (main.jspx and TestBean.java)
          Hide
          Adnan Durrani added a comment -

          It has been fixed under ICE-4105

          Show
          Adnan Durrani added a comment - It has been fixed under ICE-4105

            People

            • Assignee:
              Unassigned
              Reporter:
              Arran Mccullough
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: