[SOLVED] Re: DynaValidatorForm arrives as null (that of passed by ActionForm) in execute

2009-02-24 Thread sledge

Problem solved: I was using a wrong type in form-properties:
java.lang._b_oolean


sledge wrote:
> 
> Struts 1.1; There's something I think I am doing not right.. Here is the
> code:
> 
> action .java:
> public class EditColActionInit extends Action {
>   public ActionForward execute(ActionMapping mapping, ActionForm form,
>   HttpServletRequest request, HttpServletResponse 
> response)
>   throws Exception {
> 
> // form arrives as null
>   DynaValidatorForm myForm = (DynaValidatorForm) form;
> }
> 
> struts-config:
> type="org.apache.struts.validator.DynaValidatorForm">
> 
>   
> ...
>   type="webfabis.newRunVer2.controller.EditColActionInit"
>name="newRunVer2EditColForm"
>scope="request"
>validate="true"
>input="/NewRunVer2/editCol.jsp">
> 
>path="/mainMenu.jsp"/>
>path="/NewRunVer2/editCol.jsp"/>
>   
> ...
>   
> 
> value="/webfabis/defaultroot/WEB-INF/validator-rules.xml,
> /WEB-INF/validation.xml"/>
>   
>   
> ...
> validation.xml:
> 
> 
>
>   
> 
>
> 
> ...
> editCol.jsp:
> 
> <%@ page contentType="text/html;charset=UTF-8" language="java" %>
> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
> <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
> 
> 
> 
> EditCol Program
>  href="/style/style.css" />
> 
> 
>  style="background:white;" onsubmit="return
> validateNewRunVer2EditColForm(this)">
>   
>   
>   Label:
>   
>property="label"/>
>   
>   
>value="Update"/>
> 
> 
> 
> 
> 
> 
> 
> pls help.!
> 
> -- 
> sledge
> 

-- 
View this message in context: 
http://www.nabble.com/DynaValidatorForm-arrives-as-null-%28that-of-passed-by-ActionForm%29-in-execute-tp22159345p22179785.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



DynaValidatorForm arrives as null (that of passed by ActionForm) in execute

2009-02-23 Thread sledge

Struts 1.1; There's something I think I am doing not right.. Here is the
code:

action .java:
public class EditColActionInit extends Action {
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse 
response)
throws Exception {

// form arrives as null
DynaValidatorForm myForm = (DynaValidatorForm) form;
}

struts-config:



...





...




...
validation.xml:


   


   

...
editCol.jsp:

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>



EditCol Program






Label:
    











pls help.!

-- 
sledge
-- 
View this message in context: 
http://www.nabble.com/DynaValidatorForm-arrives-as-null-%28that-of-passed-by-ActionForm%29-in-execute-tp22159345p22159345.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



DynaValidatorForm is null (from ActionForm in execute)

2009-02-20 Thread sledge

Here is the code:
action .java:
public class EditColActionInit extends Action {
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse 
response)
throws Exception {

// form arrives as null
DynaValidatorForm myForm = (DynaValidatorForm) form;
}

struts-config:



...





...




...
validation.xml:


   


   


pls help.!

-- 
sledge
-- 
View this message in context: 
http://www.nabble.com/DynaValidatorForm-is-null-%28from-ActionForm-in-execute%29-tp22120932p22120932.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Expression Language

2006-03-23 Thread David M Sledge
Do EL expressions only evaluate to String and primitive types?  I have code
similar to the following in my jsp.

 



  



 

Where uriList is an object of type java.util.List only containing
java.net.URI objects, and where uriValueMap has only java.net.URI objects as
keys and has for values objects with the property someProperty.

 

As a result, I end up getting the following exception:

 

javax.servlet.ServletException: Invalid argument looking up property:
"http://namespace-uri.org.someProperty"; of bean: "uriValueMap"

 

Is there any way to preserved the java.net.URI type as a lookup key?

 

Thanks,

 

David M. Sledge

Analyst/Programmer Specialist

LTER Network Office

Dept. of Biology, MSC03 2020
1 University of New Mexico
Albuquerque, NM  87131-0001

505-277-0666
[EMAIL PROTECTED]

 



Properties of Properties of Beans

2006-03-22 Thread David M Sledge
Is there a way I can access the properties of a property from a bean?

 

Suppose I set the following attribute:

 

servletContext.setAttribute("rootBean", rootBean);

 

and the object rootBean has the property childBean, and childBean has the
property grandChildBean (with the appropriate getters and setters).  Is
there a way I can access grandChildBean via a jsp tag without setting more
attributes?

 

David M. Sledge

Analyst/Programmer Specialist

LTER Network Office

Dept. of Biology, MSC03 2020
1 University of New Mexico
Albuquerque, NM  87131-0001

505-277-0666
[EMAIL PROTECTED]