I have an array of objects (ContactDto[]) that I need to display. I actually have the full list I send in (userContacts), and the list of objects selected in the alertForm (alertContacts).
I can display the form for an initial addAlert() just fine. I have not gotten any further.
I do not seem t even get to my add() method ever. And even if I turn the log level to debug, I do not seem to get any more information on the stacktrace.
Please help me on this as I am very frustrated and confused.
StackTrace for alertForm Load, and then submission:
==========================================
10:59:25,965 INFO [AlertActions] userContacts[] length: 3
10:59:25,975 INFO [AlertActions] ======================================================================
10:59:25,975 INFO [AlertActions] Must be a new alert then....
10:59:25,985 INFO [AlertActions] ======================================================================
10:59:25,985 INFO [AlertActions] alertDto: {alertId= userId=1 subject= startDate=null reoccurring= gracePeriodDays= gracePeriodHours=
endingDate=Thu May 29 10:59:24 CEST 2003 startingLocation=null endingLocation=null status= safeConfirm= details= noteToContactees=}
10:59:25,995 INFO [AlertActions] ======================================================================
10:59:45,944 INFO [PropertyMessageResources] Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
10:59:45,944 INFO [PropertyMessageResources] Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
10:59:45,954 INFO [PropertyMessageResources] Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
10:59:45,954 INFO [PropertyMessageResources] Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
10:59:45,984 INFO [PropertyMessageResources] Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
11:00:55,504 INFO [SecurityContextFilter] processing request /alert.do
11:00:55,544 ERROR [SecurityContextFilter] Exception
javax.servlet.ServletException: BeanUtils.populate
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1098)
at org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:816)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1420)
at com.baselogic.yoursos.struts.ExtendedActionServlet.process(ExtendedActionServlet.java:53)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:520)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360)
at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:342)
at com.baselogic.yoursos.security.SecurityContextFilter.doFilter(SecurityContextFilter.java:102)
at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:334)
at com.baselogic.yoursos.user.UserPreferenceFilter.doFilter(UserPreferenceFilter.java:46)
at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:334)
at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:286)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1714)
at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:507)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1664)
at org.mortbay.http.HttpServer.service(HttpServer.java:863)
at org.jboss.jetty.Jetty.service(Jetty.java:460)
at org.mortbay.http.HttpConnection.service(HttpConnection.java:775)
at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:939)
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:792)
at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:201)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455)
alertActions.java::add(...): (LookupDispatchAction) ========================= public ActionForward add( ActionMapping mapping , ActionForm form , HttpServletRequest request , HttpServletResponse response ) throws Exception { log.info( "Process a alert update()" );
if( log.isInfoEnabled() ) { log.info( "==========" ); log.info( "form: " + form.toString() ); log.info( "==========" ); }
struts-config.xml mappings: ====================== <form-bean name="alertForm" dynamic="true" type="org.apache.struts.validator.DynaValidatorForm"> <form-property name="alertId" type="java.lang.String" /> <form-property name="userId" type="java.lang.Long" />
<form-property name="subject" type="java.lang.String" />
<form-property name="startingDate" type="java.util.Date" />
<form-property name="reoccurring" type="java.lang.String" />
<form-property name="gracePeriodDays" type="java.lang.String" />
<form-property name="gracePeriodHours" type="java.lang.String" />
<form-property name="endingDate" type="java.util.Date" />
<form-property name="status" type="java.lang.String" />
<form-property name="safeConfirm" type="java.lang.String" />
<form-property name="details" type="java.lang.String" />
<form-property name="noteToContactees" type="java.lang.String" />
<form-property name="alertContacts" type="java.lang.String[]" />
<form-property name="userContacts" type="com.baselogic.yoursos.contact.ContactDto[]" />
<!--<form-property name="userContacts" type="com.baselogic.yoursos.contact.ContactDto[]" />-->
<!--<form-property name="alertLocations" type="com.baselogic.yoursos.location.LocationDto[]" />-->
</form-bean>
<forward name="alertAdd" path="/alert.do" />
<action path="/alert" input="/alert.do" name="alertForm" parameter="action" scope="request" type="com.baselogic.yoursos.alert.AlertActions" validate="true" > <forward name="success" path="/alertList.do" redirect="true" /> <forward name="error" path=".error" redirect="true" /> <forward name="add" path=".alertAdd" redirect="true" /> <forward name="edit" path=".alertEdit" redirect="true" /> <forward name="view" path=".alertView" redirect="true" /> </action>
alert.jsp: ========================= <%@ page contentType="text/html; charset=utf-8" %> <%@ page language="java" %> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> <%@ taglib uri="/WEB-INF/c.tld" prefix="c" %>
<html:form action="/alert">
<html:hidden property="alertId" />
<table width="100%" border="1" cellspacing="1" cellpadding="1">
<tr bgcolor="#9966FF">
<td height="2" colspan="2">
<img src="/images/spacer.gif" width="8" height="8" alt="" border="0">
Alert Details
</td>
</tr>
<tr>
<td><bean:message key="alert.subject"/></td>
<td><html:text property="subject" size="32" maxlength="32" /></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr bgcolor="#9966FF">
<td height="2" colspan="2">
<img src="/images/spacer.gif" width="8" height="8" alt="" border="0">Rotations
</td>
</tr>
<tr>
<td><bean:message key="alert.startDate"/></td>
<td><html:text property="startingDate" size="32" maxlength="32" /></td>
</tr>
<tr>
<td><bean:message key="alert.reoccurring"/></td>
<td>
<html:select property="reoccurring">
<html:option value = "" key="form.select"/>
<html:option value = "1" key="Every Day"/>
<html:option value = "2" key="Every 2 Days"/>
<html:option value = "3" key="Every 3 Days"/>
<html:option value = "4" key="Every 4 Days"/>
<html:option value = "5" key="Every 5 Days"/>
<html:option value = "6" key="Every 6 Days"/>
<html:option value = "7" key="Every Week"/>
<html:option value = "14" key="Every 2 Weeks"/>
<html:option value = "30" key="Every Month"/>
</html:select>
</td>
</tr>
<tr>
<td><bean:message key="alert.gracePeriodDays"/></td>
<td>
<html:select property="gracePeriodDays">
<html:option value = "1" key="1 Day"/>
<html:option value = "2" key="2 Day"/>
<html:option value = "3" key="3 Day"/>
<html:option value = "4" key="4 Day"/>
<html:option value = "5" key="5 Day"/>
<html:option value = "6" key="6 Day"/>
</html:select>
</td>
</tr>
<tr>
<td><bean:message key="alert.gracePeriodHours"/></td>
<td>
<html:select property="gracePeriodHours">
<html:option value = "" key="form.select"/>
<html:option value = "1" key="1 Hour"/>
<html:option value = "2" key="2 Hour"/>
<html:option value = "3" key="3 Hour"/>
<html:option value = "4" key="4 Hour"/>
<html:option value = "5" key="5 Hour"/>
<html:option value = "6" key="6 Hour"/>
<html:option value = "7" key="7 Hour"/>
<html:option value = "8" key="8 Hour"/>
<html:option value = "9" key="9 Hour"/>
<html:option value = "10" key="10 Hour"/>
<html:option value = "11" key="11 Hour"/>
<html:option value = "12" key="12 Hour"/>
<html:option value = "13" key="13 Hour"/>
<html:option value = "14" key="14 Hour"/>
<html:option value = "15" key="15 Hour"/>
<html:option value = "16" key="16 Hour"/>
<html:option value = "17" key="17 Hour"/>
<html:option value = "18" key="18 Hour"/>
<html:option value = "19" key="19 Hour"/>
<html:option value = "20" key="20 Hour"/>
<html:option value = "21" key="21 Hour"/>
<html:option value = "22" key="22 Hour"/>
<html:option value = "23" key="23 Hour"/>
</html:select>
</td>
</tr>
<tr>
<td><bean:message key="alert.endingDate"/></td>
<td><html:text property="endingDate" size="32" maxlength="32" /></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr bgcolor="#9966FF">
<td height="2" colspan="2"> <img src="/images/spacer.gif" width="8" height="8" alt="" border="0">
Starting Location
</td>
</tr>
<tr>
<td><bean:message key="alert.starting.location"/></td>
<td>
Starting Location select
</td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr bgcolor="#9966FF">
<td height="2" colspan="2"> <img src="/images/spacer.gif" width="8" height="8" alt="" border="0">
Ending Location </td>
</tr>
<tr>
<td><bean:message key="alert.ending.location"/></td>
<td>
Ending Location select
</td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr bgcolor="#9966FF">
<td width="7" height="2" colspan="5">
<img src="/images/spacer.gif" height="8" alt="" border="0">Alert Preferences
</td>
</tr>
<tr>
<td><bean:message key="alert.status"/> </td>
<td>
<html:select property="status">
<html:option value = "" key="form.select"/>
<html:option value = "active" key="Active"/>
<html:option value = "pending" key="Pending"/>
<html:option value = "cancelled" key="Cancelled"/>
</html:select>
</td>
</tr>
<tr>
<td><bean:message key="alert.safeConfirm"/> </td>
<td>
<html:select property="safeConfirm">
<html:option value = "" key="form.select"/>
<html:option value = "finish" key="On finish date"/>
<html:option value = "reaccur" key="Each Re-Accurence"/>
<html:option value = "never" key="Never"/>
</html:select>
</td>
</tr>
<tr>
<td><bean:message key="alert.contacts"/></td>
<td colspan="2">
<html : select property="userContacts" multiple="true" >
< html : optionsCollection property="userContacts"
value="contactId"
label="firstName" />
</ html : select>
</td>
</tr>
<tr>
<td><bean:message key="alert.details"/></td>
<td colspan="2">
<html:textarea property="details" rows="7" />
</td>
</tr>
<tr>
<td><bean:message key="alert.noteToContactees"/></td>
<td colspan="2">
<html:textarea property="noteToContactees" rows="7" />
</td>
</tr>
<tr>
<td height="2" colspan="4">
<img src="/images/spacer.gif" height="8" alt="" border="0">
<html:submit property="action">
<bean:message key="button.add"/>
</html:submit>
</td>
</tr>
<tr bgcolor="#9966FF">
<td height="2" colspan="2">
<img src="/images/spacer.gif" width="8" height="8" alt="" border="0">
</td>
</tr>
</table>
</html:form>
==================================================
Thanks in advance for you help!
Mick knutson
_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]