Hello.

I'm not sure what you are trying to do, but it is very easy to
use JavaScript (JS) to insert a value into a JSF component, such
as a text field.  I do this all of the time.  I have raw HTML/JS
client-side components and as the form is being submitted I have
JS functions that package the data into a hidden field JSF component.
This data in this component is then sent to the backing bean for
server-side processing.

The key is known the clientID for the JSF component.  Usually, this
clientID is a combination of the form id and the component's id. So...
<h:form id='xyz'>
...
  <h:inputHidden id='data' value='#{myBean.compositeData}' />
...
</h:form>

The JS function would then do something like...
function storeCompositeData()
{
   var jsfComponent = document.getElementById('xyz:data');
   var compValue = ... // calculate composite data string
   jsfComponent.value = compValue;
}

HTH,
Bryan


mufflon wrote:
Hey!
I have the problem the problem that I´ve got no idea hovw I could move data,
e.g. an array or something else, to a myFaces-Bean.
Anyone an idea? Greets
mufflone

Reply via email to