Re: Re: Re: Editable/non-editable fields

2002-08-26 Thread Tom Klaasen


 "Struts Users Mailing List" <[EMAIL PROTECTED]> wrote:


>Tom,
>it doesn't appear in my final html! But it don't have to... or am I in the
>twilight zone?
>What do you by:"the server is picking up the latest version of your code"?

Some web servers keep a cached and compiled version of your jsp's and show that to the 
client every time. They're supposed to detect changes in the jsp's, but I've already 
experienced that they don't always do this reliably. So to make sure you're actually 
looking at the latest evolution of your code, you can add a comment like I suggested. 
This is the only way to give you peace of mind that you're looking at the latest code. 

hth,
tomK


>
>I'm using Struts 1.0.2
>
>
>Gilles Vandaele
>0498 52 64 12
>[EMAIL PROTECTED]
>
>
>  
>   
>   Tom Klaasen
>   
> 
>        cc:           
>   
>   26/08/2002 18:03 Subject:  Re:  Re: Editable/non-editable 
>fields  
>  
>   
>Please respond to Struts Users Mailing 
>List  
>  
>   
>  
>   
>  
>   
>
>
>
>
>Are you sure your web server is picking up the latest version of your code?
>(try adding , if it doesn't appear in
>your final html, you've got an answer :) )
>
>From a quick inspection of the code I have here (struts 1.0.2), the
>disabled attribute should work (didn't test it yet though)
>
>
>hth,
>tomK
>
>
> "Struts Users Mailing List"  wrote:
>
>
>>Hi all;
>>This list works too hard, some solutions comes out before I finish to
>type!
>>
>>How can you set the "disabled" attribute on the controls (in order to see
>>an input field "grayed out")?
>>If I put an '
>>For additional commands, e-mail:
>>
>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>
>
>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: Re: Editable/non-editable fields

2002-08-26 Thread Gilles . Vandaele


Tom,
it doesn't appear in my final html! But it don't have to... or am I in the
twilight zone?
What do you by:"the server is picking up the latest version of your code"?

I'm using Struts 1.0.2


Gilles Vandaele
0498 52 64 12
[EMAIL PROTECTED]


   
  
   Tom Klaasen 
  
   <[EMAIL PROTECTED]>
  
cc:
  
   26/08/2002 18:03     Subject:  Re:  Re: Editable/non-editable 
fields  
   
  
Please respond to Struts Users Mailing 
List  
   
  
   
  
   
  




Are you sure your web server is picking up the latest version of your code?
(try adding , if it doesn't appear in
your final html, you've got an answer :) )

>From a quick inspection of the code I have here (struts 1.0.2), the
disabled attribute should work (didn't test it yet though)


hth,
tomK


 "Struts Users Mailing List" <[EMAIL PROTECTED]> wrote:


>Hi all;
>This list works too hard, some solutions comes out before I finish to
type!
>
>How can you set the "disabled" attribute on the controls (in order to see
>an input field "grayed out")?
>If I put an '
>For additional commands, e-mail:
>



--
To unsubscribe, e-mail:   <
mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <
mailto:[EMAIL PROTECTED]>






--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: Editable/non-editable fields

2002-08-26 Thread Darryl Nortje

Gilles,

This is how I did it. Hope it helps


/>

The bean:write tag --> 
returns a String that either says readonly, or nothing, depending on my
condition works like a bomb

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 26, 2002 4:59 PM
To: Struts Users Mailing List
Subject: RE: Editable/non-editable fields



I don't understand your "The html tags don't support this attribute "

The struts tag html:text do have an attribute 'disabled' , so wat is it for
, if its not rendered in the 'DISABLED' attribute of the  tag?

Gilles Vandaele
0498 52 64 12
[EMAIL PROTECTED]


 

   "Kevin A. Smith"

   <[EMAIL PROTECTED] To:Struts Users Mailing List

   m>
<[EMAIL PROTECTED]>  
        cc:

       26/08/2002 16:49 Subject:  RE:
Editable/non-editable fields   
 

Please respond to Struts Users
Mailing List  
 

 

 





Gilles -

This is the was the hacking my project team had to do. The html tags don't
support this attribute so it doesn't show up in the final rendered HTML. We
had to hack the tag code to add support for this.

--Kevin

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 26, 2002 10:37 AM
To: Struts Users Mailing List
Subject: Re: Editable/non-editable fields



Hi all;
This list works too hard, some solutions comes out before I finish to type!

How can you set the "disabled" attribute on the controls (in order to see
an input field "grayed out")?
If I put an 'mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <
mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <
mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <
mailto:[EMAIL PROTECTED]>






--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: Re: Editable/non-editable fields

2002-08-26 Thread Tom Klaasen

Are you sure your web server is picking up the latest version of your code? (try 
adding , if it doesn't appear in your final html, 
you've got an answer :) )

>From a quick inspection of the code I have here (struts 1.0.2), the disabled 
>attribute should work (didn't test it yet though)


hth,
tomK


 "Struts Users Mailing List" <[EMAIL PROTECTED]> wrote:


>Hi all;
>This list works too hard, some solutions comes out before I finish to type!
>
>How can you set the "disabled" attribute on the controls (in order to see
>an input field "grayed out")?
>If I put an '
>For additional commands, e-mail: 
>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Editable/non-editable fields

2002-08-26 Thread Kevin A. Smith

Gilles - 

My memory is a bit foggy, but I believe that the "disabled" attribute on the tags 
meant something different than the HTML "disabled" attribute. There wasn't a 1:1 
correspondance.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 26, 2002 10:59 AM
To: Struts Users Mailing List
Subject: RE: Editable/non-editable fields



I don't understand your "The html tags don't support this attribute "

The struts tag html:text do have an attribute 'disabled' , so wat is it for
, if its not rendered in the 'DISABLED' attribute of the  tag?

Gilles Vandaele
0498 52 64 12
[EMAIL PROTECTED]


   
  
   "Kevin A. Smith"
  
   <[EMAIL PROTECTED] To:Struts Users Mailing List   
  
   m>  <[EMAIL PROTECTED]>
  
cc:        
          
   26/08/2002 16:49 Subject:  RE: Editable/non-editable fields 
  
   
  
Please respond to Struts Users Mailing 
List  
   
  
   
  
   
  




Gilles -

This is the was the hacking my project team had to do. The html tags don't
support this attribute so it doesn't show up in the final rendered HTML. We
had to hack the tag code to add support for this.

--Kevin

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 26, 2002 10:37 AM
To: Struts Users Mailing List
Subject: Re: Editable/non-editable fields



Hi all;
This list works too hard, some solutions comes out before I finish to type!

How can you set the "disabled" attribute on the controls (in order to see
an input field "grayed out")?
If I put an 'mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <
mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <
mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <
mailto:[EMAIL PROTECTED]>






--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: Editable/non-editable fields

2002-08-26 Thread Gilles . Vandaele


I don't understand your "The html tags don't support this attribute "

The struts tag html:text do have an attribute 'disabled' , so wat is it for
, if its not rendered in the 'DISABLED' attribute of the  tag?

Gilles Vandaele
0498 52 64 12
[EMAIL PROTECTED]


   
  
   "Kevin A. Smith"
  
   <[EMAIL PROTECTED] To:Struts Users Mailing List   
  
   m>  <[EMAIL PROTECTED]>
  
cc:
          
       26/08/2002 16:49 Subject:  RE: Editable/non-editable fields 
  
   
  
Please respond to Struts Users Mailing 
List  
   
  
   
  
   
  




Gilles -

This is the was the hacking my project team had to do. The html tags don't
support this attribute so it doesn't show up in the final rendered HTML. We
had to hack the tag code to add support for this.

--Kevin

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 26, 2002 10:37 AM
To: Struts Users Mailing List
Subject: Re: Editable/non-editable fields



Hi all;
This list works too hard, some solutions comes out before I finish to type!

How can you set the "disabled" attribute on the controls (in order to see
an input field "grayed out")?
If I put an 'mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <
mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <
mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <
mailto:[EMAIL PROTECTED]>






--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: Editable/non-editable fields

2002-08-26 Thread Kevin A. Smith

Gilles - 

This is the was the hacking my project team had to do. The html tags don't support 
this attribute so it doesn't show up in the final rendered HTML. We had to hack the 
tag code to add support for this.

--Kevin

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 26, 2002 10:37 AM
To: Struts Users Mailing List
Subject: Re: Editable/non-editable fields



Hi all;
This list works too hard, some solutions comes out before I finish to type!

How can you set the "disabled" attribute on the controls (in order to see
an input field "grayed out")?
If I put an 'mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: Editable/non-editable fields

2002-08-26 Thread Gilles . Vandaele


Hi all;
This list works too hard, some solutions comes out before I finish to type!

How can you set the "disabled" attribute on the controls (in order to see
an input field "grayed out")?
If I put an 'mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: 




Re: RE: RE: Editable/non-editable fields

2002-08-26 Thread Tom Klaasen

Thanks Kevin, I'll take it up with the user base if they like that.

And for the browser compatibility: we're working on an intranet here, so the browsers 
are standardized anyways (which relieves me of tons of headaches :) )

Thanks to all for your helpfulness!


tomK



 "Struts Users Mailing List" <[EMAIL PROTECTED]> wrote:


>That is true. But I believe that Netscape supports the disabled 
>attribute in some other way, I think. Its been over a year since I 
>worked on the project I'm referring to, so I could very well be 
>mistaken.
>
>--Kevin
>
>-Original Message-
>From: Sukhenko, Mikhail (Contr) [mailto:[EMAIL PROTECTED]]
>Sent: Monday, August 26, 2002 10:08 AM
>To: 'Struts Users Mailing List'
>Subject: RE: RE: Editable/non-editable fields
>
>
>The "grayed out" feature does not work on all the web browsers though. 
>Be
>careful with that. I think even Netscape does not support it.
>
>-Original Message-
>From: Kevin A. Smith [mailto:[EMAIL PROTECTED]]
>Sent: Monday, August 26, 2002 9:51 AM
>To: Struts Users Mailing List
>Subject: RE: RE: Editable/non-editable fields
>
>
>We went back and forth on this on my project, also. What was finally 
>agreed
>upon was that it might be less confusing for the user to see an input 
>field
>"grayed out" a la Windows, than to see input fields replaced with text
>strings, looking like field labels.
>
>Just my $0.02 worth . . .
>
>--Kevin
>
>-----Original Message-
>From: Tom Klaasen [mailto:[EMAIL PROTECTED]]
>Sent: Monday, August 26, 2002 9:37 AM
>To: Struts Users Mailing List
>Subject: Re: RE: Editable/non-editable fields
>
>
>Hi Kevin,
>
>
>Thanks for your reply!
>
>This seems to be a good "second-choice" solution in case the other one 
>won't
>work. However, I'm afraid it would clutter the layout and confuse the 
>user
>to have disabled and non-disabled fields mixed together. A non-editable
>field should be a html string instead of a html input ...
>
>
>Thanks again
>
>tomK
>
>
> "Struts Users Mailing List"  wrote:
>
>   
>>Could you set the "disabled" attribute on the controls? This would 
>still 
>>display the info to the user, but they wouldn't be able to edit it. On 
>a 
>>previous project, we hacked some of the Struts tags to support this 
>>attribute, it wasn't that hard. Maybe a few days of work.
>>
>>-Original Message-
>>From: Tom Klaasen [mailto:[EMAIL PROTECTED]]
>>Sent: Monday, August 26, 2002 9:09 AM
>>To: [EMAIL PROTECTED]
>>Subject: Editable/non-editable fields
>>
>>
>>Hi all,
>>
>>It's been some time, but it seems I'm back :)
>>
>>I'm currently working on a project where lots of forms are used. The 
>>forms are backed up by a DB. Somewhere in the DB, there is a table 
>which 
>>tells me which fields should be editable and which shouldn't (they 
>>should only be displayed).
>>
>>Until now, we were looking in the db manually, and changing tags if 
>some 
>>field changed from editable to non-editable.
>>
>>We want to change that: let our application look in the db and decide 
>>whether the current property should be editable or not.
>>
>>I've already implemented this for html:text fields (which was fairly 
>>trivial), but now I want to do this for html:select fields also. This 
>>seems to be less trivial to say the least.
>>
>>I just looked around on the net and found 
>>http://struts.application-servers.com, but it seems to be too 
>>restricting in terms of layout and granularity.
>>
>>Does anybody has any pointers on solutions for editable/non-editable 
>>fields? Basically I want one tag that can decide whether it's editable 
>>or not (based on business logic that I provide). Eg a text tag that is 
>>editable would generate the same output as html:text, if it's not 
>>editable it would be a bean:write followed by a html:hidden.
>>
>>(I've used struts some months ago, and I'm not totally up to speed with 
>
>>its recent developments, so please forgive me if this is a trivial 
>>question.)
>>
>>Any pointers are appreciated!
>>
>>Thanks,
>>tomK
>>
>>
>>--
>>To unsubscribe, e-mail:   
>>
>>For additional commands, e-mail: 
>>
>>
>>
>>--
>>To unsubscribe, e-mail:   
>>For additional commands, e-mail: 
>>
>
>
>
>--
>To unsubscribe, e-mail:
>
>For additional commands, e-mail:
>
>
>
>--
>To unsubscribe, e-mail:
>
>For additional commands, e-mail:
>
>
>--
>To unsubscribe, e-mail:   
>
>For additional commands, e-mail: 
>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: RE: Editable/non-editable fields

2002-08-26 Thread Kevin A. Smith

That is true. But I believe that Netscape supports the disabled attribute in some 
other way, I think. Its been over a year since I worked on the project I'm referring 
to, so I could very well be mistaken.

--Kevin

-Original Message-
From: Sukhenko, Mikhail (Contr) [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 26, 2002 10:08 AM
To: 'Struts Users Mailing List'
Subject: RE: RE: Editable/non-editable fields


The "grayed out" feature does not work on all the web browsers though. Be
careful with that. I think even Netscape does not support it.

-Original Message-
From: Kevin A. Smith [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 26, 2002 9:51 AM
To: Struts Users Mailing List
Subject: RE: RE: Editable/non-editable fields


We went back and forth on this on my project, also. What was finally agreed
upon was that it might be less confusing for the user to see an input field
"grayed out" a la Windows, than to see input fields replaced with text
strings, looking like field labels.

Just my $0.02 worth . . .

--Kevin

-Original Message-
From: Tom Klaasen [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 26, 2002 9:37 AM
To: Struts Users Mailing List
Subject: Re: RE: Editable/non-editable fields


Hi Kevin,


Thanks for your reply!

This seems to be a good "second-choice" solution in case the other one won't
work. However, I'm afraid it would clutter the layout and confuse the user
to have disabled and non-disabled fields mixed together. A non-editable
field should be a html string instead of a html input ...


Thanks again

tomK


 "Struts Users Mailing List" <[EMAIL PROTECTED]> wrote:


>Could you set the "disabled" attribute on the controls? This would still 
>display the info to the user, but they wouldn't be able to edit it. On a 
>previous project, we hacked some of the Struts tags to support this 
>attribute, it wasn't that hard. Maybe a few days of work.
>
>-Original Message-
>From: Tom Klaasen [mailto:[EMAIL PROTECTED]]
>Sent: Monday, August 26, 2002 9:09 AM
>To: [EMAIL PROTECTED]
>Subject: Editable/non-editable fields
>
>
>Hi all,
>
>It's been some time, but it seems I'm back :)
>
>I'm currently working on a project where lots of forms are used. The 
>forms are backed up by a DB. Somewhere in the DB, there is a table which 
>tells me which fields should be editable and which shouldn't (they 
>should only be displayed).
>
>Until now, we were looking in the db manually, and changing tags if some 
>field changed from editable to non-editable.
>
>We want to change that: let our application look in the db and decide 
>whether the current property should be editable or not.
>
>I've already implemented this for html:text fields (which was fairly 
>trivial), but now I want to do this for html:select fields also. This 
>seems to be less trivial to say the least.
>
>I just looked around on the net and found 
>http://struts.application-servers.com, but it seems to be too 
>restricting in terms of layout and granularity.
>
>Does anybody has any pointers on solutions for editable/non-editable 
>fields? Basically I want one tag that can decide whether it's editable 
>or not (based on business logic that I provide). Eg a text tag that is 
>editable would generate the same output as html:text, if it's not 
>editable it would be a bean:write followed by a html:hidden.
>
>(I've used struts some months ago, and I'm not totally up to speed with 
>its recent developments, so please forgive me if this is a trivial 
>question.)
>
>Any pointers are appreciated!
>
>Thanks,
>tomK
>
>
>--
>To unsubscribe, e-mail:   
>
>For additional commands, e-mail: 
>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>



--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: RE: Editable/non-editable fields

2002-08-26 Thread Sukhenko, Mikhail (Contr)

The "grayed out" feature does not work on all the web browsers though. Be
careful with that. I think even Netscape does not support it.

-Original Message-
From: Kevin A. Smith [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 26, 2002 9:51 AM
To: Struts Users Mailing List
Subject: RE: RE: Editable/non-editable fields


We went back and forth on this on my project, also. What was finally agreed
upon was that it might be less confusing for the user to see an input field
"grayed out" a la Windows, than to see input fields replaced with text
strings, looking like field labels.

Just my $0.02 worth . . .

--Kevin

-Original Message-
From: Tom Klaasen [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 26, 2002 9:37 AM
To: Struts Users Mailing List
Subject: Re: RE: Editable/non-editable fields


Hi Kevin,


Thanks for your reply!

This seems to be a good "second-choice" solution in case the other one won't
work. However, I'm afraid it would clutter the layout and confuse the user
to have disabled and non-disabled fields mixed together. A non-editable
field should be a html string instead of a html input ...


Thanks again

tomK


 "Struts Users Mailing List" <[EMAIL PROTECTED]> wrote:


>Could you set the "disabled" attribute on the controls? This would still 
>display the info to the user, but they wouldn't be able to edit it. On a 
>previous project, we hacked some of the Struts tags to support this 
>attribute, it wasn't that hard. Maybe a few days of work.
>
>-Original Message-
>From: Tom Klaasen [mailto:[EMAIL PROTECTED]]
>Sent: Monday, August 26, 2002 9:09 AM
>To: [EMAIL PROTECTED]
>Subject: Editable/non-editable fields
>
>
>Hi all,
>
>It's been some time, but it seems I'm back :)
>
>I'm currently working on a project where lots of forms are used. The 
>forms are backed up by a DB. Somewhere in the DB, there is a table which 
>tells me which fields should be editable and which shouldn't (they 
>should only be displayed).
>
>Until now, we were looking in the db manually, and changing tags if some 
>field changed from editable to non-editable.
>
>We want to change that: let our application look in the db and decide 
>whether the current property should be editable or not.
>
>I've already implemented this for html:text fields (which was fairly 
>trivial), but now I want to do this for html:select fields also. This 
>seems to be less trivial to say the least.
>
>I just looked around on the net and found 
>http://struts.application-servers.com, but it seems to be too 
>restricting in terms of layout and granularity.
>
>Does anybody has any pointers on solutions for editable/non-editable 
>fields? Basically I want one tag that can decide whether it's editable 
>or not (based on business logic that I provide). Eg a text tag that is 
>editable would generate the same output as html:text, if it's not 
>editable it would be a bean:write followed by a html:hidden.
>
>(I've used struts some months ago, and I'm not totally up to speed with 
>its recent developments, so please forgive me if this is a trivial 
>question.)
>
>Any pointers are appreciated!
>
>Thanks,
>tomK
>
>
>--
>To unsubscribe, e-mail:   
>
>For additional commands, e-mail: 
>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>



--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: RE: Editable/non-editable fields

2002-08-26 Thread Kevin A. Smith

We went back and forth on this on my project, also. What was finally agreed upon was 
that it might be less confusing for the user to see an input field "grayed out" a la 
Windows, than to see input fields replaced with text strings, looking like field 
labels.

Just my $0.02 worth . . .

--Kevin

-Original Message-
From: Tom Klaasen [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 26, 2002 9:37 AM
To: Struts Users Mailing List
Subject: Re: RE: Editable/non-editable fields


Hi Kevin,


Thanks for your reply!

This seems to be a good "second-choice" solution in case the other one won't work. 
However, I'm afraid it would clutter the layout and confuse the user to have disabled 
and non-disabled fields mixed together. A non-editable field should be a html string 
instead of a html input ...


Thanks again

tomK


 "Struts Users Mailing List" <[EMAIL PROTECTED]> wrote:


>Could you set the "disabled" attribute on the controls? This would still 
>display the info to the user, but they wouldn't be able to edit it. On a 
>previous project, we hacked some of the Struts tags to support this 
>attribute, it wasn't that hard. Maybe a few days of work.
>
>-Original Message-
>From: Tom Klaasen [mailto:[EMAIL PROTECTED]]
>Sent: Monday, August 26, 2002 9:09 AM
>To: [EMAIL PROTECTED]
>Subject: Editable/non-editable fields
>
>
>Hi all,
>
>It's been some time, but it seems I'm back :)
>
>I'm currently working on a project where lots of forms are used. The 
>forms are backed up by a DB. Somewhere in the DB, there is a table which 
>tells me which fields should be editable and which shouldn't (they 
>should only be displayed).
>
>Until now, we were looking in the db manually, and changing tags if some 
>field changed from editable to non-editable.
>
>We want to change that: let our application look in the db and decide 
>whether the current property should be editable or not.
>
>I've already implemented this for html:text fields (which was fairly 
>trivial), but now I want to do this for html:select fields also. This 
>seems to be less trivial to say the least.
>
>I just looked around on the net and found 
>http://struts.application-servers.com, but it seems to be too 
>restricting in terms of layout and granularity.
>
>Does anybody has any pointers on solutions for editable/non-editable 
>fields? Basically I want one tag that can decide whether it's editable 
>or not (based on business logic that I provide). Eg a text tag that is 
>editable would generate the same output as html:text, if it's not 
>editable it would be a bean:write followed by a html:hidden.
>
>(I've used struts some months ago, and I'm not totally up to speed with 
>its recent developments, so please forgive me if this is a trivial 
>question.)
>
>Any pointers are appreciated!
>
>Thanks,
>tomK
>
>
>--
>To unsubscribe, e-mail:   
>
>For additional commands, e-mail: 
>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: RE: Editable/non-editable fields

2002-08-26 Thread Tom Klaasen

Hi Kevin,


Thanks for your reply!

This seems to be a good "second-choice" solution in case the other one won't work. 
However, I'm afraid it would clutter the layout and confuse the user to have disabled 
and non-disabled fields mixed together. A non-editable field should be a html string 
instead of a html input ...


Thanks again

tomK


 "Struts Users Mailing List" <[EMAIL PROTECTED]> wrote:


>Could you set the "disabled" attribute on the controls? This would still 
>display the info to the user, but they wouldn't be able to edit it. On a 
>previous project, we hacked some of the Struts tags to support this 
>attribute, it wasn't that hard. Maybe a few days of work.
>
>-Original Message-
>From: Tom Klaasen [mailto:[EMAIL PROTECTED]]
>Sent: Monday, August 26, 2002 9:09 AM
>To: [EMAIL PROTECTED]
>Subject: Editable/non-editable fields
>
>
>Hi all,
>
>It's been some time, but it seems I'm back :)
>
>I'm currently working on a project where lots of forms are used. The 
>forms are backed up by a DB. Somewhere in the DB, there is a table which 
>tells me which fields should be editable and which shouldn't (they 
>should only be displayed).
>
>Until now, we were looking in the db manually, and changing tags if some 
>field changed from editable to non-editable.
>
>We want to change that: let our application look in the db and decide 
>whether the current property should be editable or not.
>
>I've already implemented this for html:text fields (which was fairly 
>trivial), but now I want to do this for html:select fields also. This 
>seems to be less trivial to say the least.
>
>I just looked around on the net and found 
>http://struts.application-servers.com, but it seems to be too 
>restricting in terms of layout and granularity.
>
>Does anybody has any pointers on solutions for editable/non-editable 
>fields? Basically I want one tag that can decide whether it's editable 
>or not (based on business logic that I provide). Eg a text tag that is 
>editable would generate the same output as html:text, if it's not 
>editable it would be a bean:write followed by a html:hidden.
>
>(I've used struts some months ago, and I'm not totally up to speed with 
>its recent developments, so please forgive me if this is a trivial 
>question.)
>
>Any pointers are appreciated!
>
>Thanks,
>tomK
>
>
>--
>To unsubscribe, e-mail:   
>
>For additional commands, e-mail: 
>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: RE: Editable/non-editable fields

2002-08-26 Thread Tom Klaasen

Hi Sri,


Thanks for your reply.

There are a few problems though:

1) I don't like to have a myriad of logic:equal in the jsp's. They tend to become 
unmaintainable.
2) More important, there won't be one "global" canEdit property: each field would have 
to decide for itself whether it's editable or not. Something like

would look in the DB to decide whether myName.myProperty is editable or not. It's all 
about granularity (the same problem I'm having with the layout: taglib).


Thanks though!

tomK



 "Struts Users Mailing List" <[EMAIL PROTECTED]> wrote:


>If I understand you question correctly, you want to dynamically 
>determine whether to display the data in an editable manner or not.
>
>You could save the condition (that determines whether to allow edits or 
>not) in the form bean and then do something like:
>
>
>  
>
>
>  
>
>
>At any given time either the editable or the non-editable version will 
>be displayed.  There are a variety of tags in the  library.  You 
>can try equal, match, present etc.
>
>Sri
>
>-Original Message-
>From: Tom Klaasen [mailto:[EMAIL PROTECTED]] 
>Sent: Monday, August 26, 2002 9:09 AM
>To: [EMAIL PROTECTED]
>Subject: Editable/non-editable fields
>
>
>Hi all,
>
>It's been some time, but it seems I'm back :)
>
>I'm currently working on a project where lots of forms are used. The 
>forms are backed up by a DB. Somewhere in the DB, there is a table which 
>tells me which fields should be editable and which shouldn't (they 
>should only be displayed).
>
>Until now, we were looking in the db manually, and changing tags if some 
>field changed from editable to non-editable.
>
>We want to change that: let our application look in the db and decide 
>whether the current property should be editable or not.
>
>I've already implemented this for html:text fields (which was fairly 
>trivial), but now I want to do this for html:select fields also. This 
>seems to be less trivial to say the least.
>
>I just looked around on the net and found 
>http://struts.application-servers.com, but it seems to be too 
>restricting in terms of layout and granularity.
>
>Does anybody has any pointers on solutions for editable/non-editable 
>fields? Basically I want one tag that can decide whether it's editable 
>or not (based on business logic that I provide). Eg a text tag that is 
>editable would generate the same output as html:text, if it's not 
>editable it would be a bean:write followed by a html:hidden.
>
>(I've used struts some months ago, and I'm not totally up to speed with 
>its recent developments, so please forgive me if this is a trivial 
>question.)
>
>Any pointers are appreciated!
>
>Thanks,
>tomK
>
>
>--
>To unsubscribe, e-mail:   
>
>For additional commands, e-mail: 
>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Editable/non-editable fields

2002-08-26 Thread Sri Sankaran

If I understand you question correctly, you want to dynamically determine whether to 
display the data in an editable manner or not.

You could save the condition (that determines whether to allow edits or not) in the 
form bean and then do something like:


  <%-- Editable version goes here --%>


  <%-- Non-editable version goes here --%>


At any given time either the editable or the non-editable version will be displayed.  
There are a variety of tags in the  library.  You can try equal, match, present 
etc.

Sri

-Original Message-
From: Tom Klaasen [mailto:[EMAIL PROTECTED]] 
Sent: Monday, August 26, 2002 9:09 AM
To: [EMAIL PROTECTED]
Subject: Editable/non-editable fields


Hi all,

It's been some time, but it seems I'm back :)

I'm currently working on a project where lots of forms are used. The forms are backed 
up by a DB. Somewhere in the DB, there is a table which tells me which fields should 
be editable and which shouldn't (they should only be displayed).

Until now, we were looking in the db manually, and changing tags if some field changed 
from editable to non-editable.

We want to change that: let our application look in the db and decide whether the 
current property should be editable or not.

I've already implemented this for html:text fields (which was fairly trivial), but now 
I want to do this for html:select fields also. This seems to be less trivial to say 
the least.

I just looked around on the net and found http://struts.application-servers.com, but 
it seems to be too restricting in terms of layout and granularity.

Does anybody has any pointers on solutions for editable/non-editable fields? Basically 
I want one tag that can decide whether it's editable or not (based on business logic 
that I provide). Eg a text tag that is editable would generate the same output as 
html:text, if it's not editable it would be a bean:write followed by a html:hidden.

(I've used struts some months ago, and I'm not totally up to speed with its recent 
developments, so please forgive me if this is a trivial question.)

Any pointers are appreciated!

Thanks,
tomK


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Editable/non-editable fields

2002-08-26 Thread Kevin A. Smith

Could you set the "disabled" attribute on the controls? This would still display the 
info to the user, but they wouldn't be able to edit it. On a previous project, we 
hacked some of the Struts tags to support this attribute, it wasn't that hard. Maybe a 
few days of work.

-Original Message-
From: Tom Klaasen [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 26, 2002 9:09 AM
To: [EMAIL PROTECTED]
Subject: Editable/non-editable fields


Hi all,

It's been some time, but it seems I'm back :)

I'm currently working on a project where lots of forms are used. The forms are backed 
up by a DB. Somewhere in the DB, there is a table which tells me which fields should 
be editable and which shouldn't (they should only be displayed).

Until now, we were looking in the db manually, and changing tags if some field changed 
from editable to non-editable.

We want to change that: let our application look in the db and decide whether the 
current property should be editable or not.

I've already implemented this for html:text fields (which was fairly trivial), but now 
I want to do this for html:select fields also. This seems to be less trivial to say 
the least.

I just looked around on the net and found http://struts.application-servers.com, but 
it seems to be too restricting in terms of layout and granularity.

Does anybody has any pointers on solutions for editable/non-editable fields? Basically 
I want one tag that can decide whether it's editable or not (based on business logic 
that I provide). Eg a text tag that is editable would generate the same output as 
html:text, if it's not editable it would be a bean:write followed by a html:hidden.

(I've used struts some months ago, and I'm not totally up to speed with its recent 
developments, so please forgive me if this is a trivial question.)

Any pointers are appreciated!

Thanks,
tomK


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: