aspose file tools
The moose likes JSF and the fly likes How to pass the values when we click on button in jsf Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "How to pass the values when we click on button in jsf" Watch "How to pass the values when we click on button in jsf" New topic
Author

How to pass the values when we click on button in jsf

anwar pasha
Greenhorn

Joined: Jun 10, 2008
Posts: 19

When we clicking on commandButton pass the particular value to backing bean without using
<t:dataTable> tags


Below is working when we use tata table.
<t:datatable>
<f:facet name="header">
<hutputText value="Banner" />
</f:facet>

<c:column>
<t:commandButton id="programLink3" value="" styleClass="Activefeed_button" action="#{bannerdetails_backing.updateBannerImage}"onmouseover ="this.className ='Activefeed_buttonhov'" onmouseout ="this.className ='Activefeed_button'" >
<f:param name="toolId" value="#{banner.toolId}"/>
<t:updateActionListener property="#{bannerdetails_backing.bannerSession.banner}" value="#{banner}" />
</t:commandButton>
<c:column>
</t:datatable>


But
Below code using without datatable tag ? its not working.
ex:

<t:commandButton id="programLink3" value="" styleClass="Activefeed_button" action="#{bannerdetails_backing.updateBannerImage}"onmouseover ="this.className ='Activefeed_buttonhov'" onmouseout ="this.className ='Activefeed_button'" >
<f:param name="toolId" value="#{banner.toolId}"/>
<t:updateActionListener property="#{bannerdetails_backing.bannerSession.banner}" value="#{banner}" />
</t:commandButton>


Greg Charles
Bartender

Joined: Oct 01, 2001
Posts: 2539
    
  10

I believe part of the magic of the dataTable tag is that it communicates information about the current row to the backing model. If you use Seam to back JSF, which is the only way I've ever used JSF, you can pass parameters with the action command, like action="#{bannerdetails_backing.updateBannerImage(myImage)}". However, I'm pretty sure that's a Seam-specific extension.
anwar pasha
Greenhorn

Joined: Jun 10, 2008
Posts: 19
thanks Greg
anwar pasha
Greenhorn

Joined: Jun 10, 2008
Posts: 19
iam doing multiple upload using this code
i have number of Browse button and one Submit button
when am browse the images then click on submit all images must be store in server.

Ex:

<t:input File Upload id="file" value="#{bannerdetails_backing.uploadFile}" />
<t:input File Upload id="file" value="#{bannerdetails_backing.uploadFile}" /> ...
anwar pasha
Greenhorn

Joined: Jun 10, 2008
Posts: 19
after that

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to pass the values when we click on button in jsf
 
Similar Threads
Problem using rendered attribute in Command Button
EL Syntax exception - javax faces el ReferenceSyntaxException
Issue with using hx:requestRowAction in IE8
Can�t manage to select a row in a t:dataTable
passth value using javascript in jsf