RE: nested:checkbox fail to set the property to false

2003-03-08 Thread Jörg Maurer
despite the fact doing some research in that issue anywhere(gives 100+
q&a) which might give you better explanation than mine, flaw is in http
protocol, not sending name-value pairs of unchecked checkboxes back.

-Original Message-
From: Joao Araujo [mailto:[EMAIL PROTECTED]
Sent: Samstag, 08. März 2003 04:33
To: [EMAIL PROTECTED]
Subject: nested:checkbox fail to set the property to false


Hi,

I am using nested:checkbox for  a boolean property.
Unfortunately, struts is not setting the property of the
formbean
to false when I unchecked it on the screen. On the other hand
when I check the box , struts set the property correctly. Any
clue?


ENVIRONMENT.
1. Struts 1.1b2
2. Tomcat 4.1.12

Thanks a lot for the attention provided.

Joao, 


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


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



RE: nested:checkbox fail to set the property to false

2003-03-08 Thread Sri Sankaran


> -Original Message-
> From: Joao Araujo [mailto:[EMAIL PROTECTED] 
> Sent: Friday, March 07, 2003 10:33 PM
> To: [EMAIL PROTECTED]
> Subject: nested:checkbox fail to set the property to false
> 
> 
> Hi,
> 
>   I am using nested:checkbox for  a boolean property.
>   Unfortunately, struts is not setting the property of 
> the formbean
>   to false when I unchecked it on the screen. On the other hand
>   when I check the box , struts set the property 
> correctly. Any clue?
> 

A value for a checkbox is sent by the browser to the server only when it is checked.  
This is how HTTP works and has nothing to do with Struts.  Please read the docs at 
http://jakarta.apache.org/struts/userGuide/struts-html.html#checkbox for how to handle 
checkboxes ( is just an extension of  
>   ENVIRONMENT.
>   1. Struts 1.1b2
>   2. Tomcat 4.1.12
> 
>   Thanks a lot for the attention provided.
> 
> Joao, 
> 

Sri

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



RE: Nested:Checkbox

2003-02-27 Thread Chen, Gin
Thanks Arron.
For whatever reason removing the name did help a bit (but only enough to get
the page to display) I dont know why that was the case since I used the name
attribute before and it worked fine (pre b3 struts). I found the cause of my
other error though. It was a scoping issue. I had the form in request scope
and apparently nested doesnt like that. While I dont like putting things in
session scope when I can help it. I guess I have to go with what works for
now.
-Tim

-Original Message-
From: Arron Bates [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 27, 2003 12:13 AM
To: Struts Users Mailing List
Subject: RE: Nested:Checkbox


nested tags don't like the "name" attribute, becuase they're getting the
bean
from their parent. In the example, the check is working off the product of
the
iterate tag anyway. I'm betting the following is what you're after...

  

  

...(there was also the closing slash in the checkbox tag, as well as the
closing tag, may have been the issue too). The process of making a bean with
the "id" property, and then the child using that, is more or less what the
nested tags do for free.

Hope this gets you working.
Happy nesting...

Arron.


> Nothing obvious jumps out.  However, have you tried the updated nested jar
that Arron made available a few days ago?  See
http://marc.theaimsgroup.com/?l=struts-user&m=104600916205585&w=2.
> 
> Sri
> 
> -Original Message-
> From: Chen, Gin [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, February 26, 2003 8:11 PM
> To: 'Struts Users Mailing List'
> Subject: Nested:Checkbox
> 
> 1.1b3 Bug?
> I have 
> 
> 
>   
> 
> 
> Where associates is the collection in my formbean with each bean in
something like: //interface only
> 
> AssociateVO
>   private boolean selected;
>   public boolean getSelected();
>   public void setSelected( boolean selected );
> 
> And I keep getting this.
> [ServletException in:/jsps/selectAssociates.jsp] No getter method for
property associates[0].selected of bean assoc' I had it as isSelected but I
thought the error was related to that so I changed it to get.
> 
> Yet when I simply do:
> 
> 
>   
> 
> 
> It works just fine.
> 
> Is something wrong with my nested setup?
> I've used the before in older versions so I don't think thats what it is
but
its getting late and I might be blind. >_<
> 
> -Tim
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]





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

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



RE: Nested:Checkbox

2003-02-26 Thread Arron Bates
nested tags don't like the "name" attribute, becuase they're getting the bean
from their parent. In the example, the check is working off the product of the
iterate tag anyway. I'm betting the following is what you're after...

  

  

...(there was also the closing slash in the checkbox tag, as well as the
closing tag, may have been the issue too). The process of making a bean with
the "id" property, and then the child using that, is more or less what the
nested tags do for free.

Hope this gets you working.
Happy nesting...

Arron.


> Nothing obvious jumps out.  However, have you tried the updated nested jar
that Arron made available a few days ago?  See
http://marc.theaimsgroup.com/?l=struts-user&m=104600916205585&w=2.
> 
> Sri
> 
> -Original Message-
> From: Chen, Gin [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, February 26, 2003 8:11 PM
> To: 'Struts Users Mailing List'
> Subject: Nested:Checkbox
> 
> 1.1b3 Bug?
> I have 
> 
> 
>   
> 
> 
> Where associates is the collection in my formbean with each bean in
something like: //interface only
> 
> AssociateVO
>   private boolean selected;
>   public boolean getSelected();
>   public void setSelected( boolean selected );
> 
> And I keep getting this.
> [ServletException in:/jsps/selectAssociates.jsp] No getter method for
property associates[0].selected of bean assoc' I had it as isSelected but I
thought the error was related to that so I changed it to get.
> 
> Yet when I simply do:
> 
> 
>   
> 
> 
> It works just fine.
> 
> Is something wrong with my nested setup?
> I've used the before in older versions so I don't think thats what it is but
its getting late and I might be blind. >_<
> 
> -Tim
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]





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



RE: Nested:Checkbox

2003-02-26 Thread Sri Sankaran
Nothing obvious jumps out.  However, have you tried the updated nested jar that Arron 
made available a few days ago?  See 
http://marc.theaimsgroup.com/?l=struts-user&m=104600916205585&w=2.

Sri

-Original Message-
From: Chen, Gin [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 26, 2003 8:11 PM
To: 'Struts Users Mailing List'
Subject: Nested:Checkbox


1.1b3 Bug?
I have 



  

Where associates is the collection in my formbean with each bean in something like: 
//interface only

AssociateVO
  private boolean selected;
  public boolean getSelected();
  public void setSelected( boolean selected );

And I keep getting this.
[ServletException in:/jsps/selectAssociates.jsp] No getter method for property 
associates[0].selected of bean assoc' I had it as isSelected but I thought the error 
was related to that so I changed it to get.

Yet when I simply do:



  

It works just fine.

Is something wrong with my nested setup?
I've used the before in older versions so I don't think thats what it is but its 
getting late and I might be blind. >_<

-Tim


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


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