You can probably make that work, but it may take a little effort. Jsf
Rendering (generating of html) is independent of form value
processing.
You could create a jsf component that didn't output any tags in the
rendering stage but still worked with the submitted values of the
externally-generated html inputs, so long as you could somehow
associate the clientId of the component with the actual id generated
by the external content.
Probably would look something like this on your page template:
<my:customComponent forInputId="bbb">
<!-- start externally generated content -->
<input id="bbb" name="bbb" type="text" value=""/>
<!-- end externally generated content -->
</my:customComponent>
On Tue, Sep 15, 2009 at 8:59 AM, Dvora <[email protected]> wrote:
>
> Of course, this is understood. I'm asking because I would like to integrate
> external js library which render html elements in the page, and I would like
> to access these elements in the server side...
>
>
> Bart Kummel-2 wrote:
>>
>> Hi,
>>
>> What you are asking is not possible. It is against the nature of JSF to do
>> so. In your example, you should use a <h:inputText> to render the HTML
>> <input>.
>>
>> Good luck!
>> Best regards,
>> Bart Kummel
>>
>> On Tue, Sep 15, 2009 at 14:41, Dvora <[email protected]> wrote:
>>
>>>
>>> Hello all,
>>>
>>> I was wondering - is it possible for the server side to access html
>>> elements
>>> (or the dom tree) that not rendered by myfaces tags?
>>>
>>> For example the following jsp:
>>>
>>> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
>>> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
>>> <%...@taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
>>>
>>>
>>> <f:view>
>>>
>>> .
>>> .
>>> .
>>> <body>
>>>
>>> <h:form id="myForm">
>>> <input id="bbb" name="bbb" type="text" value=""/>
>>> </h:form>
>>>
>>> </body>
>>>
>>> </f:view>
>>>
>>>
>>> Can the backing bean access the 'bbb' input text element and its value? I
>>> tried to debug and inspect the FacesContext instance, but found only
>>> Myfaces
>>> elements.
>>> --
>>> View this message in context:
>>> http://www.nabble.com/MyFaces---can-backing-beans-access-native-html-elements--tp25453164p25453164.html
>>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>
> --
> View this message in context:
> http://www.nabble.com/MyFaces---can-backing-beans-access-native-html-elements--tp25453164p25453541.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>