myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Korhonen, Kalle" <>
Subject RE: [Myfaces-develop] New feature suggestion : Edit mode
Date Wed, 04 May 2005 03:48:17 GMT
Shouldn't we rather use the standard "readonly" attribute for this, as
specified in JSF RI?
 readonly	false	false	java.lang.String	Flag indicating
that this component will prohibit changes by the user. The element may
receive focus unless it has also been disabled.	 


	From: Sylvain Vieujot [] 
	Sent: Tuesday, May 03, 2005 6:53 PM
	Subject: Fwd: [Myfaces-develop] New feature suggestion : Edit
	Quite sometimes ago, we discussed on adding an editMode
attribute the meaningful x: components.
	The explanation for this is in the forwarded email discussion
	To summarize what it's about :
	<x:inputText ... editMode="true"> renders as the standard input
	<x:inputText ... editMode="false"> renders as an x:outputText
	I now need those features, and would like to implement them
(have them implemented).
	So, I would like to check everyone still agrees with this.
	Subject: Re: [Myfaces-develop] New feature suggestion : Edit
	Date: Fri, 30 Jul 2004 10:51:39 -0400
	One more precision :
	I didn't dig into the role based access -- used in disabled for
example -- right now.
	Maybe we have to think for one minute about the integration of
this with editMode.
	As of now, I think it works well :
	editMode == true => standard behavior
	editMode == false => renders as output anyway.
	But as I'm not sure I fully understand the MyFaces roles right
now, maybe I'm wrong or there is something smarter to do.
	On Fri, 2004-07-30 at 10:12, Sylvain Vieujot wrote: 

		Yes, that's it.
		I also think that the editmode attribute is better (in
fact editMode as I think this is the convention, like for
		Thanks for your feedback.
		On Fri, 2004-07-30 at 03:22, Manfred Geiler wrote: 

			Just a short summarize of your suggestion, so
that I'm sure that I got 
			it right:
			- we indroduce a new attribute "edit" (or
"editmode") for all extended 
			input components (x: tags)
			- default value of this attribute is true
			- value of true does not change rendering
			- value of false renders an output (normal html
text) instead of an 
			input (html input tag)
			Ok, her is my vote:
			+1 for such an attribute
			+.4 for name "edit"
			+.6 for name "editmode"
			Sylvain Vieujot wrote:
			> *Feedback requested on implementing a new edit
attribute for the x: tags :
			> *
			> I used to program a lot with Notes/Domino, and
Domino has a very nice 
			> feature :
			> You design a form, and the you use it either
in read or edit mode.
			> In read mode, you just see the fields contents
(i.e. h:outputText in 
			> JSF), and in edit mode, you have the
corresponding input field (i.e. 
			> h:inputText(area) in JSF).
			> This is a very useful feature that really help
to quicken the development.
			> In JSF right now, as far as I know, you either
have to design 2 forms : 
			> one for read mode, and one for edit mode, or
(especially if the access 
			> can be different for each field) like here :
			> <h:inputText value="#{order.client}" size="50"
			> <h:outputText value="#{order.client}"
rendered="#{! editMode.edit}"/>
			> I think it would be way easier to add an
*edit* attribute to the x: 
			> tags, that would reduce the upper code to :
			> <x:inputText value="#{order.client}" size="50"
			> For sure, you can use the disabled attribute,
but here, you wouldn't 
			> have the text in a disabled box, but you would
see it clear which is 
			> much nicer.
			> For the x:dateInput tag that I just did, it
would also look nicer to see 
			> a clean text with the date/time instead of all
the input fields/combo boxes.
			> For the x:fileUpload also, it would allow to
display the file name and 
			> maybe render the file in case the edit
attribute is set to false.
			> In the current MyFaces exemples, for the
dataTable.jsf example, if you 
			> want to edit all the countries, you also have
to design a new form.
			> I think with an edit attribute, we could avoid
the countryTableForm.jsf, 
			> and have only one form.
			> I also need a wiki style input tag where in
edit mode, you enter text 
			> with wiki like formating, and in read mode,
you just see the formated text.
			> In such cases, the edit (or whatever we choose
to name it) attribute is 
			> mandatory.
			> So, my question is :
			> Would you agree that we implement a standard
edit attribute for all the 
			> x: tags where it's relevant ?
			> And as you might guess, I think it would
really be a big plus for 
			> MyFaces as it would dramatically improve and
simplify some developments.
			> Thanks for your feedback.
			> Sylvain.
			This SF.Net email is sponsored by OSTG. Have you
noticed the changes on, ITManagersJournal and NewsForge in
the past few weeks? Now,
			one more big change to announce. We are now
OSTG- Open Source Technology
			Group. Come see the changes on the new OSTG
			Myfaces-develop mailing list

View raw message