0
votes

I am using primefaces 3.3 library for jsf based application.

I am using <p:pickList> to handle drag and drop the element from source to target and vide versa.

I want to call the jsf bean method when element transferring(by drag-drop ) from source to target and vice versa and handle some logical things there.

I follow the link PrimeFaces showcase for pickList to implement my functionality. This is the version 5.2.7.

In primefaces 5.2.7 it can be easily done by <p:ajax event="transfer" /> , but how can I achieve this using primafaces 3.3.

I try valueChangeListener attribute but it is not working. There is one attribute called onTransfer , but it is for clientSide callback.

This can be achieve by putting submit button. But I want to achieve it on drag and drop. So how can i do that ?

Thanks in advance.

1

1 Answers

0
votes

First, you should consider an update of your primefaces version. Updates are not only provided for new features but also for bug fixes, improvements (performance, stability) etc.

Currently I cannot find the documentation for 3.3, but what you could try is using p:remoteCommand (its in the 3.5 documentation, so maybe available):

use onTransfer="submitToBean()" along with a p:remoteCommand that might look like this:

<p:remoteCommand 
   name="submitToBean" 
   action="#{myBean.doSomething}"
   process="idOfYourPickList" 
   partialSubmit="true" />

Then the onTransfer Event will call the javascript method submitToBean() which in turn will process your picklist and call the action method.