Re: html-el:checkbox quandary

2005-06-07 Thread gdeschen
As Hubert suggested here are some of the details.

form-beans
   form-bean name=dependentForm type=
hronline.secure.personal.dependents.DependentForm
   /form-bean
/form-beans

action path=/personal/Dependent type=
hronline.secure.personal.dependents.DependentAction name=dependentForm 
scope=request validate=false
   forward name=dependent path=
/WEB-INF/personal/dependents/dependent.jsp
   /forward
   forward name=cancel path=/personal/Dependents
   /forward
/action 

...
public class DependentForm extends ActionForm {
   private DependentVO dependent;

   public DependentVO getDependent() {
  return dependent;
   }

   public void setDependent(DependentVO dependentVO) {
  dependent = dependentVO;
   }
...
}

public class DependentVO extends Dependent implements Serializable {
   private String disabledIndicator;
   private String dentalEligibilityIndicator;
   private String dependentId;
   private String fulltimeStudentIndicator;
   private String healthEligibilityIndicator;
   private String pensionEligibilityIndicator;

   public String getHealthEligibilityIndicator() {
  return healthEligibilityIndicator;
   }

   public void setHealthEligibilityIndicator(String string) {
  healthEligibilityIndicator = string;
   }

Once again... I really appreciate your time and patience with this !
- Glenn






Hubert Rabago [EMAIL PROTECTED] 
06/06/2005 05:50 PM
Please respond to
Struts Users Mailing List user@struts.apache.org


To
Struts Users Mailing List user@struts.apache.org
cc

Subject
Re: html-el:checkbox quandary






Yes.  Maybe if you include the actual mappings, JSP text, form
declaration, etc, someone will find something.  From what you've said,
it should work.

Hubert


On 6/6/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Yes the form bean is associated with the HTML form.
 
 If I simply do this:
 c:out value=${dependentForm.dependent.healthEligibilityIndicator}/
 It writes out the contents. This takes care of the value attribute.
 
 My question is for the property.
 Can a nested bean property be used in the html-el:checkbox as the
 property?
 
 - Glenn
 
 
 Hubert Rabago [EMAIL PROTECTED]
 06/06/2005 04:24 PM
 
 
 
 Is dependentForm is form bean associated with the HTML form that
 your checkbox is a part of?  There could be a typo in your
 struts-config, or your html:form, or your form declaration.
 
 Hubert
 
 On 6/6/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
  I gave it a go and I get this error now... more precise but an error
 none
  the less...
  [06/06/05 15:40:53:846 EDT] 5dc35dc3 WebGroup  E SRVE0026E: 
[Servlet
  Error]-[No getter method for property
 dependent.healthEligibilityIndicator
  of bean org.apache.struts.taglib.html.BEAN]:
  javax.servlet.jsp.JspException: No getter method for property
  dependent.healthEligibilityIndicator of bean
  org.apache.struts.taglib.html.BEAN
 
 

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





Re: html-el:checkbox quandary

2005-06-07 Thread gdeschen
Oh sh* !
Hubert you had your finger on the problem all along...
Now that I have had my first coffee of the day things are falling in 
place.

The problem is that the JSP is posting to an action which did not have the 
correct form bean.
So it wasn't able to find the property method.

This raises a question.
Say I have a Dependent and DependentSubmit actions.
The Dependent action gets data from the DB and displays it using the 
DependentForm.
The DependentSubmit action is also using the DependentForm.

In the JSP that is executed for the Dependent action this gets executed:
html-el:checkbox property=dependent.healthEligibilityIndicator
value=${dependentForm.dependent.healthEligibilityIndicator}/

Based on my problems, is it safe to say that the property is resolved 
on the action being submitted to and the the value on the action currently 
handling the request?

- Glenn




[EMAIL PROTECTED] 
07/06/2005 07:29 AM
Please respond to
Struts Users Mailing List user@struts.apache.org


To
Struts Users Mailing List user@struts.apache.org
cc

Subject
Re: html-el:checkbox quandary






As Hubert suggested here are some of the details.

form-beans
   form-bean name=dependentForm type=
hronline.secure.personal.dependents.DependentForm
   /form-bean
/form-beans

action path=/personal/Dependent type=
hronline.secure.personal.dependents.DependentAction name=dependentForm 

scope=request validate=false
   forward name=dependent path=
/WEB-INF/personal/dependents/dependent.jsp
   /forward
   forward name=cancel path=/personal/Dependents
   /forward
/action 

...
public class DependentForm extends ActionForm {
   private DependentVO dependent;

   public DependentVO getDependent() {
  return dependent;
   }

   public void setDependent(DependentVO dependentVO) {
  dependent = dependentVO;
   }
...
}

public class DependentVO extends Dependent implements Serializable {
   private String disabledIndicator;
   private String dentalEligibilityIndicator;
   private String dependentId;
   private String fulltimeStudentIndicator;
   private String healthEligibilityIndicator;
   private String pensionEligibilityIndicator;

   public String getHealthEligibilityIndicator() {
  return healthEligibilityIndicator;
   }

   public void setHealthEligibilityIndicator(String string) {
  healthEligibilityIndicator = string;
   }

Once again... I really appreciate your time and patience with this !
- Glenn






Hubert Rabago [EMAIL PROTECTED] 
06/06/2005 05:50 PM
Please respond to
Struts Users Mailing List user@struts.apache.org


To
Struts Users Mailing List user@struts.apache.org
cc

Subject
Re: html-el:checkbox quandary






Yes.  Maybe if you include the actual mappings, JSP text, form
declaration, etc, someone will find something.  From what you've said,
it should work.

Hubert


On 6/6/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Yes the form bean is associated with the HTML form.
 
 If I simply do this:
 c:out value=${dependentForm.dependent.healthEligibilityIndicator}/
 It writes out the contents. This takes care of the value attribute.
 
 My question is for the property.
 Can a nested bean property be used in the html-el:checkbox as the
 property?
 
 - Glenn
 
 
 Hubert Rabago [EMAIL PROTECTED]
 06/06/2005 04:24 PM
 
 
 
 Is dependentForm is form bean associated with the HTML form that
 your checkbox is a part of?  There could be a typo in your
 struts-config, or your html:form, or your form declaration.
 
 Hubert
 
 On 6/6/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
  I gave it a go and I get this error now... more precise but an error
 none
  the less...
  [06/06/05 15:40:53:846 EDT] 5dc35dc3 WebGroup  E SRVE0026E: 
[Servlet
  Error]-[No getter method for property
 dependent.healthEligibilityIndicator
  of bean org.apache.struts.taglib.html.BEAN]:
  javax.servlet.jsp.JspException: No getter method for property
  dependent.healthEligibilityIndicator of bean
  org.apache.struts.taglib.html.BEAN
 
 

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






Re: html-el:checkbox quandary

2005-06-07 Thread Hubert Rabago
I have to admit I didn't understand the question at all.  :(

Hubert

On 6/7/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 
 This raises a question.
 Say I have a Dependent and DependentSubmit actions.
 The Dependent action gets data from the DB and displays it using the
 DependentForm.
 The DependentSubmit action is also using the DependentForm.
 
 In the JSP that is executed for the Dependent action this gets executed:
 html-el:checkbox property=dependent.healthEligibilityIndicator
 value=${dependentForm.dependent.healthEligibilityIndicator}/
 
 Based on my problems, is it safe to say that the property is resolved
 on the action being submitted to and the the value on the action currently
 handling the request?
 
 - Glenn


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



Re: html-el:checkbox quandary

2005-06-07 Thread Wendy Smoak
From: [EMAIL PROTECTED]

 In the JSP that is executed for the Dependent action this gets executed:
 html-el:checkbox property=dependent.healthEligibilityIndicator
 value=${dependentForm.dependent.healthEligibilityIndicator}/


Why are you using the 'value' attribute?  The framework will automatically
render the form element with the value present in the form bean.  In your
case it's probably not hurting anything, but it keeps catching my eye...

-- 
Wendy Smoak


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



Re: html-el:checkbox quandary

2005-06-07 Thread Hubert Rabago
Oh, yeah, that's another thing.  You usually can leave out the value
attribute, except in checkbox.  In another thread, where you have
problems with the firstName text field, you can leave out the value
attribute, Struts will automatically populate the field with the value
held by the form. 
http://struts.apache.org/userGuide/struts-html.html#text

For a checkbox, the value field indicates what value Struts should
check for to determine whether or not the checkbox was checked,
whether to set the boolean property to true.  In your case, it's like
saying you're saying if the user didn't change the value, then
healthEligibilityIndicator should be set to true. 
http://struts.apache.org/userGuide/struts-html.html#checkbox

Hubert


On 6/7/05, Wendy Smoak [EMAIL PROTECTED] wrote:
 From: [EMAIL PROTECTED]
 
  In the JSP that is executed for the Dependent action this gets executed:
  html-el:checkbox property=dependent.healthEligibilityIndicator
  value=${dependentForm.dependent.healthEligibilityIndicator}/
 
 
 Why are you using the 'value' attribute?  The framework will automatically
 render the form element with the value present in the form bean.  In your
 case it's probably not hurting anything, but it keeps catching my eye...
 
 --
 Wendy Smoak
 
 
 -
 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: html-el:checkbox quandary

2005-06-06 Thread gdeschen
I gave it a go and I get this error now... more precise but an error none 
the less...
[06/06/05 15:40:53:846 EDT] 5dc35dc3 WebGroup  E SRVE0026E: [Servlet 
Error]-[No getter method for property dependent.healthEligibilityIndicator 
of bean org.apache.struts.taglib.html.BEAN]: 
javax.servlet.jsp.JspException: No getter method for property 
dependent.healthEligibilityIndicator of bean 
org.apache.struts.taglib.html.BEAN




Hubert Rabago [EMAIL PROTECTED] 
06/06/2005 03:25 PM
Please respond to
Struts Users Mailing List user@struts.apache.org


To
Struts Users Mailing List user@struts.apache.org
cc

Subject
Re: html-el:checkbox quandary






On 6/6/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Okay okay it is one of those mondays where your physically at work but
 mentally still Saturday afternoon !
 

I'm feeling the same way.

 I have a form bean:
 DependentForm
 which also contains  a value object bean:
 dependent
 which has a property called: healthEligibilityIndicator
 
 Now I'd liket to reference the property in the JSP.
 
 Currently this is what I have:
 html-el:checkbox property=
 ${dependentForm.dependent.healthEligibilityIndicator}
 property=${dependentForm.dependent.healthEligibilityIndicator}/
 
 This is the error I'm getting:
 [06/06/05 15:17:59:889 EDT] 5dc35dc3 WebGroup  E SRVE0026E: [Servlet
 Error]-[No getter method for property  of bean
 org.apache.struts.taglib.html.BEAN]: javax.servlet.jsp.JspException: No
 getter method for property  of bean org.apache.struts.taglib.html.BEAN
 
 Why is this happening?
 I'm more upset that I can't figure it out myself !
 
 Any input is appreciated !
 - Glenn
 

If dependentForm is the form bean associated with the HTML form that
your checkbox is a part of, try it with just
property=dependent.healthEligibilityIndicator.

Hubert

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





Re: html-el:checkbox quandary

2005-06-06 Thread Martin Gainty
Good catch Hubert..Thats what I noticed ..2 property references and no 
value=


In the future you may want to debug with display statement like
c:out value= ${dependentForm.dependent.healthEligibilityIndicator}/

Martin-
- Original Message - 
From: Hubert Rabago [EMAIL PROTECTED]

To: Struts Users Mailing List user@struts.apache.org
Sent: Monday, June 06, 2005 3:25 PM
Subject: Re: html-el:checkbox quandary


On 6/6/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

Okay okay it is one of those mondays where your physically at work but
mentally still Saturday afternoon !



I'm feeling the same way.


I have a form bean:
DependentForm
which also contains  a value object bean:
dependent
which has a property called: healthEligibilityIndicator

Now I'd liket to reference the property in the JSP.

Currently this is what I have:
html-el:checkbox property=
${dependentForm.dependent.healthEligibilityIndicator}
property=${dependentForm.dependent.healthEligibilityIndicator}/

This is the error I'm getting:
[06/06/05 15:17:59:889 EDT] 5dc35dc3 WebGroup  E SRVE0026E: [Servlet
Error]-[No getter method for property  of bean
org.apache.struts.taglib.html.BEAN]: javax.servlet.jsp.JspException: No
getter method for property  of bean org.apache.struts.taglib.html.BEAN

Why is this happening?
I'm more upset that I can't figure it out myself !

Any input is appreciated !
- Glenn



If dependentForm is the form bean associated with the HTML form that
your checkbox is a part of, try it with just
property=dependent.healthEligibilityIndicator.

Hubert

-
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: html-el:checkbox quandary

2005-06-06 Thread gdeschen
Apolgies it is my typo... I have property twice... one should be value.

- Glenn



Martin Gainty [EMAIL PROTECTED] 
06/06/2005 03:46 PM
Please respond to
Struts Users Mailing List user@struts.apache.org


To
Struts Users Mailing List user@struts.apache.org, Hubert Rabago 
[EMAIL PROTECTED]
cc

Subject
Re: html-el:checkbox quandary






Good catch Hubert..Thats what I noticed ..2 property references and no 
value=

In the future you may want to debug with display statement like
c:out value= ${dependentForm.dependent.healthEligibilityIndicator}/

Martin-
- Original Message - 
From: Hubert Rabago [EMAIL PROTECTED]
To: Struts Users Mailing List user@struts.apache.org
Sent: Monday, June 06, 2005 3:25 PM
Subject: Re: html-el:checkbox quandary


On 6/6/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Okay okay it is one of those mondays where your physically at work but
 mentally still Saturday afternoon !


I'm feeling the same way.

 I have a form bean:
 DependentForm
 which also contains  a value object bean:
 dependent
 which has a property called: healthEligibilityIndicator

 Now I'd liket to reference the property in the JSP.

 Currently this is what I have:
 html-el:checkbox property=
 ${dependentForm.dependent.healthEligibilityIndicator}
 property=${dependentForm.dependent.healthEligibilityIndicator}/

 This is the error I'm getting:
 [06/06/05 15:17:59:889 EDT] 5dc35dc3 WebGroup  E SRVE0026E: [Servlet
 Error]-[No getter method for property  of bean
 org.apache.struts.taglib.html.BEAN]: javax.servlet.jsp.JspException: No
 getter method for property  of bean org.apache.struts.taglib.html.BEAN

 Why is this happening?
 I'm more upset that I can't figure it out myself !

 Any input is appreciated !
 - Glenn


If dependentForm is the form bean associated with the HTML form that
your checkbox is a part of, try it with just
property=dependent.healthEligibilityIndicator.

Hubert

-
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: html-el:checkbox quandary

2005-06-06 Thread Hubert Rabago
Is dependentForm is form bean associated with the HTML form that
your checkbox is a part of?  There could be a typo in your
struts-config, or your html:form, or your form declaration.

Hubert

On 6/6/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 I gave it a go and I get this error now... more precise but an error none
 the less...
 [06/06/05 15:40:53:846 EDT] 5dc35dc3 WebGroup  E SRVE0026E: [Servlet
 Error]-[No getter method for property dependent.healthEligibilityIndicator
 of bean org.apache.struts.taglib.html.BEAN]:
 javax.servlet.jsp.JspException: No getter method for property
 dependent.healthEligibilityIndicator of bean
 org.apache.struts.taglib.html.BEAN
 
 
 Hubert Rabago [EMAIL PROTECTED]
 06/06/2005 03:25 PM
 Please respond to
 Struts Users Mailing List user@struts.apache.org
 
 If dependentForm is the form bean associated with the HTML form that
 your checkbox is a part of, try it with just
 property=dependent.healthEligibilityIndicator.
 
 Hubert


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



Re: html-el:checkbox quandary

2005-06-06 Thread Hubert Rabago
Yes.  Maybe if you include the actual mappings, JSP text, form
declaration, etc, someone will find something.  From what you've said,
it should work.

Hubert


On 6/6/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Yes the form bean is associated with the HTML form.
 
 If I simply do this:
 c:out value=${dependentForm.dependent.healthEligibilityIndicator}/
 It writes out the contents. This takes care of the value attribute.
 
 My question is for the property.
 Can a nested bean property be used in the html-el:checkbox as the
 property?
 
 - Glenn
 
 
 Hubert Rabago [EMAIL PROTECTED]
 06/06/2005 04:24 PM
 
 
 
 Is dependentForm is form bean associated with the HTML form that
 your checkbox is a part of?  There could be a typo in your
 struts-config, or your html:form, or your form declaration.
 
 Hubert
 
 On 6/6/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
  I gave it a go and I get this error now... more precise but an error
 none
  the less...
  [06/06/05 15:40:53:846 EDT] 5dc35dc3 WebGroup  E SRVE0026E: [Servlet
  Error]-[No getter method for property
 dependent.healthEligibilityIndicator
  of bean org.apache.struts.taglib.html.BEAN]:
  javax.servlet.jsp.JspException: No getter method for property
  dependent.healthEligibilityIndicator of bean
  org.apache.struts.taglib.html.BEAN
 
 

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