You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-dev@incubator.apache.org by Martin Koci <Ma...@aura.cz> on 2006/09/21 13:41:46 UTC
Differences between read-only inputText and read-only
selectOneChoice
Current codebase renders different output for read-only inputText and
read-only selectOneChoice as I think they would be same.
tr:selectOneChoice renders only <span>s with value between,
tr:inputText renders <span><div>value</div><span>.
Probably all non-elements outputs (which call
FormElementRenderer.encodeAllAsNonElement) should lead to similar HTML
code to accomplish consistent behaviour (on client side) of readOnly
components.
Btw. is af|selectOneChoice:readOnly valid skin selector? As I see in
SimpleSelectOneRenderer.renderNonElementContent there in no chance to
render it.
Martin
Re: Differences between read-only inputText and read-only selectOneChoice
Posted by Arjuna Wijeyekoon <ar...@gmail.com>.
Unfortunately, we cannot make guarantees about the html generated by
trinidad renderers.
Different renderers will render different markup.
you cannot rely on a particular markup or dom structure on the client.
On 9/26/06, Martin Koci <Ma...@aura.cz> wrote:
>
> Hello,
>
> we need it for both reasons.
>
> We have application currently rewrited with trinidad. But we must use
> some old legacy javascript which is not "JSF-oriented" (at least now).
>
> Trinidad components have content part but with readOnly selectOneChoice
> is content part not rendered as usual.
>
> I think readOnly selectOne and readOnly inputText should act as
> outputText and produce same output. And if not there must be a good
> reason for this.
>
> Btw. tomahawk uses behavioral interface DisplayValueOnlyCapable for
> this.
>
>
> Martin
>
> Arjuna Wijeyekoon píše v Po 25. 09. 2006 v 18:02 -0700:
> > Martin,
> >
> > why does it matter that these components render slightly different
> markup
> > when readOnly?
> > are you relying on a particular DOM structure on the client-side?
> >
> > or are you wondering how to skin the two consistently using CSS?
> >
> > --arjuna
>
>
Re: Differences between read-only inputText and read-only
selectOneChoice
Posted by Martin Koci <Ma...@aura.cz>.
Hello,
we need it for both reasons.
We have application currently rewrited with trinidad. But we must use
some old legacy javascript which is not "JSF-oriented" (at least now).
Trinidad components have content part but with readOnly selectOneChoice
is content part not rendered as usual.
I think readOnly selectOne and readOnly inputText should act as
outputText and produce same output. And if not there must be a good
reason for this.
Btw. tomahawk uses behavioral interface DisplayValueOnlyCapable for
this.
Martin
Arjuna Wijeyekoon píše v Po 25. 09. 2006 v 18:02 -0700:
> Martin,
>
> why does it matter that these components render slightly different markup
> when readOnly?
> are you relying on a particular DOM structure on the client-side?
>
> or are you wondering how to skin the two consistently using CSS?
>
> --arjuna
Re: Differences between read-only inputText and read-only selectOneChoice
Posted by Arjuna Wijeyekoon <ar...@gmail.com>.
Martin,
why does it matter that these components render slightly different markup
when readOnly?
are you relying on a particular DOM structure on the client-side?
or are you wondering how to skin the two consistently using CSS?
--arjuna