I am using jsf in netbeans (glassfish) and i'd like to edit my Create form to include a file upload component that will send the image directory to the corresponding image field in mysql once the form is submitted. I have tried to change my code from:
<h:inputText id="imageUrl" value="#{artefactsController.selected.imageUrl}" title="#{bundle.CreateArtefactsTitle_imageUrl}"/>
to:
<t:inputFileUpload id="imageUrl" value="#{artefactsController.selected.imageUrl}" title="#{bundle.CreateArtefactsTitle_imageUrl}"/>
This is using the myfaces component(tomahawk) Is there any way i can pass the value of the upload field to the input textbox ? Or perhaps i need to call some method. I'd appreciate it if anyone could tell me on how to get the directory into the database using the form i already have. The forms were generated by the entities i had already defined.
i need at least a hint on how to link the upload component's managed bean to the:
value="#{artefactsController.selected.imageUrl}"
perhaps a
valuechangelistener="#{componentbean.getfilename()"
i just need someone to iron out the logic for me please!