Search code examples
javajsffile-uploadicefaces

Which method is for binding the action callback to JSF/ICEFaces InputFile?


I would like to bind a method to my com.icesoft.faces.component.inputfile.InputFile object to get it behave as if was defined so:

<ice:inputFile id="inputFileComponent" actionListener="#{mainWindowManager.uploadActionListener}"

I create the InputFile instance but see several methods and none of them works.. :-(

com.icesoft.faces.component.inputfile.InputFile inputFile = new InputFile();

inputFile.addActionListener(..);
inputFile.setActionListener(..);
inputFile.setActionExpression(..);
inputFile.setAction(..);

Which method is for the binding described in the XML above..?


Solution

  • The winner is setActionListener(..) but the thing that I missed was setting an ID for the component, this caused all the mess.