You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Sebastien Cesbron <sc...@ifrance.com> on 2003/03/20 15:43:46 UTC

Faces - UIComponent - read/write mode

Hi,

I am looking at the struts faces integration ant I have a question about 
it. Is there any plan to integrate the UIComponent tree in struts or is 
the integration just a new tag library.
I am guessing that in the future we will put ui components in 
actionforms : do I miss something (I am not an expert in both so maybe I 
am in the wrong way) ?

My current problem is that I want to use the same form for both reading 
and editing.
My idea is this one :

public LogonForm
{
   private UIInput login = new UIInput(); // with getter / setter
.
.
.
}

in my Action :

logonForm.getLogin().setAttribute("editable", Boolean.FALSE);

and in my jsp :

<h:input_text id="login" modelReference="logonForm.login"/>

and then my renderer uses getAttribute("editable") to know if my control 
is editable or know (we can do the same thing with "visible", 
"mandatory" and so on).


But this is not possible at this time and this is maybe not a viable 
solution. So, does somebody have any idea for a solution that is managed 
by the input tag. I am not really fond of lot of if constructions to 
distinguish edit/visu modes. Is there any alternatives ?

Thanks in advance

Seb

_____________________________________________________________________
Envie de discuter en "live" avec vos amis ? T�l�charger MSN Messenger
http://www.ifrance.com/_reloc/m la 1�re messagerie instantan�e de France


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: i need some help with struts & forms

Posted by Stephen Smithstone <sk...@lchost.co.uk>.
what u could do is have some js that would run when the use selects the file 
from the drop down go to an action that repopulates the form with the select 
file name and the contents of the file in in the form then so and so 



On Wednesday 16 April 2003 3:11 pm, VAN DEN BROEK, Johan wrote:
> Hello,
>
> I want to implement the following:
> A form with a dropdown where you can choose the file you wish to work
> with. After you 've made your selection you can see the content of the
> file (a userprofile or whatever). You must be able to save changes or
> just continue and choose another file. So I want to use only one form
> for all of this.
>
> How do I do this? Can somebody show me the (struts) way?
>
> Thnx,
> Johan
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


i need some help with struts & forms

Posted by "VAN DEN BROEK, Johan" <Jo...@ehb.be>.
Hello,

I want to implement the following:
A form with a dropdown where you can choose the file you wish to work
with. After you 've made your selection you can see the content of the
file (a userprofile or whatever). You must be able to save changes or
just continue and choose another file. So I want to use only one form
for all of this.

How do I do this? Can somebody show me the (struts) way?

Thnx,
Johan



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org