I’m currently stuck on a JavaScript / JSF issue.
The project I’m working on is a Seam 2 project and this is what I’m trying to do:
- On a certain page with a calendar
view the user can select multiple
calendar days within one month. The
list of selected days is kept on the
client-side using JavaScript (stored
in a JavaScript array) - Now when the users presses a command link button I want to call my
component like this:<h:commandButton
value="View Details"
action="#{myComponent.dateSelection}"/> - So far so good, however I want to be able to pass my Javascript array to this
method as I need that data on my backend.
Does anyone knows a way to add my JS var as parameter of my component call?
Thanks for helping!
Dirk
I don’t really see how you are doing things, because there is no code in your question, but a standard way of doing this is to use hidden form fields linked to an attribute of your backing bean, which you can fill using javascript.