jsr344-experts@javaserverfaces-spec-public.java.net

[jsr344-experts] Re: Pass Through Elements

From: Michael Müller <michael.mueller_at_mueller-bruehl.de>
Date: Tue, 22 Jan 2013 22:59:29 +0100

Frank,

In my opinion I still belive the javadoc is not clear enough at this point.

Given
<h:inputText ...>
there is a well defined element for input, which will be added to the tree.

Let's move on to pass through
<input jsf:id="param1" type="text"...>
The spec says, add an element to the component tree, if "jsf:" (more
precise: an element of
"|http://java.sun.com/jsf")|||is found in the page. Now, we have an
element of |javax.faces.passthrough.Element within |the tree. Can we add
an action to it? Or a value? Or whatever?

To get this information, the developer has to examine the class
TagDecorator. She may discover the <input> mapped to <h:inputText>.

But what happens, if a new element is invented for HTML5?
<newElement jsf:id="myId"...>
Because of jsf:id it will be added to the tree.
Again my questions: Can we add an action to it? Or a value? Or whatever?

Have I overlooked something in spec + javadoc + source? Maybe, let me
know. But IMHO, the spec/javadoc might be get more detailed here.

Herzliche Grüße - Best Regards,
Michael Müller

Am 09.01.2013 09:21, schrieb Frank Caputo:
> Hi Michael,
>
> it is necessary, that the user knows a little bit about form handling in JSF. If so, she could simply read the javadoc of TagDecorator to see the mapping between the HTML tags and JSF components: https://maven.java.net/service/local/repositories/snapshots/archive/javax/faces/javax.faces-api/2.2-SNAPSHOT/javax.faces-api-2.2-20130104.160953-119-javadoc.jar/!/javadocs/javax/faces/view/facelets/TagDecorator.html
>
> Ciao Frank
>
> Am 07.01.2013 um 22:51 schrieb Michael Müller <michael.mueller_at_mueller-bruehl.de>:
>
>> Hi Volunteers,
>>
>> Suppose we have
>>
>> <input type="submit" id="btn" value="myButton"/>
>>
>> In the API the reader finds this element should be included into the component tree, if prefixed by the sun...JSF namespace, e.g
>>
>> <input type="submit" jsf:id="btn" value="myButton"/>
>>
>> Now, let's add an action
>>
>> <input type="submit" jsf:id="btn" value="myButton" jsf:action="#{myBean.myAction}"/>
>>
>> This action is not HTML5, but JSF specific. I guess, we all know, that a couple of attributes should be supported. But how should somebody know, who is new to JSF and reads the spec for the first time? Is this specification missing, or do I simply havn't seen it?
>>
>> --
>>
>> Herzliche Grüße - Best Regards,
>> Michael Müller
>>
>
>
>
>
>