This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have David & Dawn Griffiths on-line!
See this thread for details.
Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

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

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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">
<h:outputText 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>


 
Sheriff
Posts: 3036
12
Mac IntelliJ IDE Python VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks Greg
 
anwar pasha
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
after that

 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic