3 Replies Latest reply on Jul 21, 2014 7:00 AM by ppitonak

    rich:inplaceSelect not working in RF4

    kishi_kiran

      Hi all,

       

       

      i have a problem with the jsf 2.0 version with inplace select,

      in jsf 1.2 it was working, but in jsf 2.0 it is not

       

       

      problem: when select one of the item in inplace select dropdown,

      I am trying to update it with the selected value using the a4j:ajax tag, using  but the control is not calling the update() method

       

       

      <rich:column id = "locationClmn">

          <f:facet name = "header">

        <h:outputText id = "LocationHeder" styleClass = "headerText"

        value = "#{messagesRefdata['notifications.locations']}"/>

        </f:facet>

          <c:set var = "locations" value = "#{notificationConfigurationBean.listOfLocations(ntc.notification)}"/>

          <rich:inplaceSelect value = "#{ntc.location}" showControls = "true"

                              onviewactivation = "old=event.memo.oldValue" rendered="#{locations}">

              <f:selectItems value = "#{notificationConfigurationBean.listOfLocations(ntc.notification)}"/>

        <a4j:ajax action = "#{notificationConfigurationBean.update(ntc)}"

                            ajaxSingle = "true" event = "onviewactivated"

                            onsubmit = "if (event.memo.value == old) {return false;}"

         render = "notificationsModelPanel">

                      <f:param name = "partyId" value = "#{param['partyId']}"/>

                   </a4j:ajax>

          </rich:inplaceSelect>

      </rich:column>

       

       

      I have even tried f:ajax, execute= "@this", immediate = true, but no luck nothing have worked for me.

      can some one help me on this how it could work ???

        • 1. Re: rich:inplaceSelect not working in RF4
          ppitonak

          Hi,

           

          I don't understand your use-case but there are several problems:

          1. rich:inplaceSelect doesn't have parameter onviewactivation so it doesn't do anything
          2. why does a4j:ajax have event="onviewactived"? BTW, in RF, events shoud omit "on" so you should use e.g. "change" instead of "onchange"
          3. a4j:ajax doesn't have ajaxSingle parameter, you should use execute="@this" instead

           

          Regards,

          Pavol

          • 2. Re: rich:inplaceSelect not working in RF4
            kishi_kiran

            yes Pavol,

             

            thats true, there is no attribute onviewactivation in RF4, (it was working on RF3.3)

            and am in the course of migating RF3.3 to RF4, but i dont find the alternative attribute for that in RF4.

             

            I have tried with the change event, still it is not working, the update method is not called when I change the value from selection list.

             

            this isthe code whic i have changed

             

            <rich:column id = "nTypeClmn">

                       <f:facet name = "header">

                                                <h:outputText id = "NotificationsHeder"  value = "#{messagesRefdata['admin.alertprofiles.notification']}"/>

                       </f:facet>

                       <rich:inplaceSelect id="notificationselect" value = "#{ntc.notification}" showControls = "true"

                                                             defaultLabel = "Click to add Notification"

                                                             openOnEdit = "true" saveOnSelect="true" onchange="old=event.memo.oldValue">

                                  <f:selectItems value = "#{notificationConfigurationBean.listOfNotifications()}"/>

                                 <a4j:ajax action = "#{notificationConfigurationBean.update(ntc)}"

                                                          ajaxSingle = "true" event = "change" execute="@this"

                                                          onbeforesubmit="if (event.memo.value == old) {return false;}"

                                                          render="notificationsModelPanel">

                                              <f:param name = "partyId" value = "#{param['partyId']}"/>

                                  </a4j:ajax>

                       </rich:inplaceSelect>

            </rich:column>

             

            and one more problem when i use the showControls = "true" attribute, the OK and cancel buttons are  appearing and disappearing(just flashing) , i am unable to click the ok or cancel buttons.

             

            can you help me on this why the update method, is not getting called   is it need any extra from or buttons to call?

            • 3. Re: rich:inplaceSelect not working in RF4
              ppitonak

              Can you create a minimal xhtml and bean for me to try it out?