Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Like valueChangeListener but will fire valueChange event AFTER the UPDATE_MODEL phase.

      Its not correctly packaged and it didnt use the right package names yet , though, functional.
      It would be great if there is a developer which will review this code so I/he can prepare it for addition to tomahawk.

      Maybe Simon? (as you state you do have the same needs)

      It requires a phase listener installed in your fase-config. I am sure we can hide this from the user after we packaged it

      faces-config

      <lifecycle>
      <phase-listener>com.ops.OPSJ.jsflib.PhaseListener</phase-listener>
      </lifecycle>

      TLD

      <tag>
      <name>valueChangeNotifier</name>
      <tag-class>com.ops.OPSJ.jsflib.valueChangeNotifier.ValueChangeNotifierTag</tag-class>
      <body-content>JSP</body-content>
      <description>
      <p>
      Add a value change listener which will be fired AFTER UPDATE_MODEL.
      Only "method" valueChange listeners are supported currently.
      </p>
      e.g. myBean.myMethoListener
      </description>
      <attribute>
      <name>name</name>
      <required>true</required>
      <rtexprvalue>false</rtexprvalue>
      </attribute>
      </tag>

      1. ValueChangeManager.java
        4 kB
        Mario Ivankovits
      2. ValueChangeNotifierTag.java
        4 kB
        Mario Ivankovits
      3. ValueChangePhaseListener.java
        1 kB
        Mario Ivankovits
      4. ValueChangeCollector.java
        2 kB
        Mario Ivankovits

        Activity

        Mario Ivankovits created issue -
        Mario Ivankovits made changes -
        Field Original Value New Value
        Attachment ValueChangeCollector.java [ 12320882 ]
        Mario Ivankovits made changes -
        Attachment ValueChangePhaseListener.java [ 12320885 ]
        Attachment ValueChangeManager.java [ 12320883 ]
        Attachment ValueChangeNotifierTag.java [ 12320884 ]
        Hide
        Mario Ivankovits added a comment -

        Usage:

        <h:selectOneMenu
        value="#

        {replacementItems.catalog}

        "
        onchange="submit()">

        <opsj:valueChangeNotifier
        name="replacementItems.catalogSelected" />

        <f:selectItems value="#

        {replacementItems.catalogs}

        " />
        </h:selectOneMenu>

        where you have to replace the taglib "opsj" by the name where you added the valueChangeNotifier.

        Like valueChangeListener, if you add a name with '#

        {...}

        ' the returned string of this method will be used to add the valueChange listener. And thus, you have to strip those if you simply would like to set a bean/method-name.

        Currently only the syntax myBean.myMethodName is supported, no valueChange classes.

        Show
        Mario Ivankovits added a comment - Usage: <h:selectOneMenu value="# {replacementItems.catalog} " onchange="submit()"> <opsj:valueChangeNotifier name="replacementItems.catalogSelected" /> <f:selectItems value="# {replacementItems.catalogs} " /> </h:selectOneMenu> where you have to replace the taglib "opsj" by the name where you added the valueChangeNotifier. Like valueChangeListener, if you add a name with '# {...} ' the returned string of this method will be used to add the valueChange listener. And thus, you have to strip those if you simply would like to set a bean/method-name. Currently only the syntax myBean.myMethodName is supported, no valueChange classes.
        Martin Marinschek made changes -
        Assignee Simon Kitching [ skitching ]
        Matthias Weßendorf made changes -
        Assignee Simon Kitching [ skitching ] Matthias Weßendorf [ matzew ]
        Matthias Weßendorf made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Matthias Weßendorf made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Matthias Weßendorf made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        sean schofield made changes -
        Workflow jira [ 12344030 ] MyFaces Workflow [ 12348211 ]
        sean schofield made changes -
        Workflow MyFaces Workflow [ 12348211 ] MyFaces Workflow2 [ 12350586 ]
        sean schofield made changes -
        Workflow MyFaces Workflow [ 12348211 ] MyFaces Workflow2 [ 12350690 ]
        sean schofield made changes -
        Workflow MyFaces Workflow2 [ 12350690 ] MyFaces Workflow [ 12354536 ]
        sean schofield made changes -
        Workflow MyFaces Workflow [ 12354536 ] MyFaces Workflow2 [ 12355881 ]
        sean schofield made changes -
        Workflow MyFaces Workflow2 [ 12355881 ]  MyFaces Workflow [ 12357587 ]
        sean schofield made changes -
        Workflow  MyFaces Workflow [ 12357587 ] MyFaces Workflow2 [ 12359099 ]
        sean schofield made changes -
        Workflow  MyFaces Workflow [ 12359099 ] MyFaces Workflow2 [ 12359700 ]
        sean schofield made changes -
        Workflow  MyFaces Workflow [ 12359700 ] MyFaces Workflow2 [ 12360290 ]

          People

          • Assignee:
            Matthias Weßendorf
            Reporter:
            Mario Ivankovits
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development