myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Marinschek <martin.marinsc...@gmail.com>
Subject Re: [Myfaces-develop] New feature suggestion : Edit mode
Date Wed, 04 May 2005 16:44:33 GMT
Well, MyFaces tries to remain in the Spec as much as possible in any
of the core classes and the core components - extended components have
far left the functionality described in the spec ;)

so these attributes would of course only be implemented in the x:... components

regards,

Martin

On 5/4/05, Rolf Kulemann <roku@apache.org> wrote:
> On Wed, 2005-05-04 at 17:31, Sean Schofield wrote:
> > The editable attribute might be a little bit of overkill.  Yes for
> > text it would be nice to alternate between HTML text or inputText but
> > that could also be achieved using the rendered attribute.
> >
> > <h:inputText value="#{foo.value}" rendered="#{foo.isEditable}"/>
> > <h:outputText value="#{foo.value}" rendered="#{!foo.isEditable}">
> >
> > So yes you type two lines of code but I would argue that the above is
> > more obvious "at a glance."
> >
> > Is there an argument against my approach besides the extra line of code?
> 
> IMHO, you are right. The proposal to dynamically switch the semantics of
> an inputText to an outputText is a bit non-straightforward, if I may say
> that. Myfaces should try to go along with the JSF spec semantics where
> possible, well, most of the extensions are very useful, so do not get me
> wrong.
> 
> But I understand the need for such kind of dynamics. The idea of Sean
> sounds a bit more "straight forward" to me.
> 
> Another alternative could be to collapse the semantics of input- and
> outputField into a new component lets say a x:dataField, which is a more
> generic component to display data:
> 
> <x:dataField renderType="input|output" ..../>
> 
> or for more programming convenience
> 
> <x:dataField isInput="true|false" ..../> so someone could bind a boolean
> bean property to @isInput.
> 
> My two Euro cents.
> 
> Ah, beside this, I'm from Cocoon land and we solve such problems by just
> adding an xslt to the content pipeline to in order to dynamically
> transform fields etc. CForms ist just great with that. However, that is
> not the point here :)
> --
> Rolf Kulemann
> 
>

Mime
View raw message