Resetting session scope form bean values
Hi, I have a data entry form implemented as a DynaActionForm form bean in session scope. After I submit the form and open it again for new data entry, the form retains its old values. If I call form.reset(), it fails to clear the bean. Do I need to override the reset method and manually clear values of all bean elements ? Please clarify. thanks in advance, Pundarik, Struts newbie
problem with requiredif and validwhen
HI, I have gone through User's Guide provided in your website for the use requiredif and validwhen in struts 1.3 but i m not getting the desired result. please help me. I am providing the code below. Date field is required when byDate is selected which is a radio button. field property=byDate depends=required arg0 key=By Date resource=false/ /field field property=date depends=requiredif arg0 key=Date resource=false/ var var-namefield[0]/var-name var-valuebyDate/var-value /var var var-namefieldTest[0]/var-name var-valueEQUAL/var-value /var var var-namefieldValue[0]/var-name var-valuebydate/var-value /var /field - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
S2: Json Plugin and anonymous array
Hi, for a YUI 3 Plugin i need the following data structure to be returned by the backend: [ { dateline: 1269141246, content: There are two cows, link: #cows }, { dateline: 1269141246, content: There are two pigs, link: #pigs } ] So basically an array structure without name. When i create the JSON output with a simple Struts 2 Action: public class JsonNotificationsAction { private ListNotificationStruct result = new ArrayListNotificationStruct(); public String execute() { // fill the list return Action.SUCCESS; } public class NotificationStruct { long dateline; String content; String link; } } Now this action results in the following output: {result:[{content:blabla balabla,dateline:1270241423080,link:#foo},{content:blabla balabla,dateline:1270241423080,link:#foo}]} It nearly matches what is expected but how can i get rid of the parent result. It seems its not possible at all but this would mean i cant use Struts2 for getting the output outlined above Thanks for hints. Marc - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Exception starting filter struts2 java.lang.ClassNotFoundException: org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
In-spite of having *struts2-core-2.1.8.1.jar *under /WebContent/WEB-INF/lib/struts-2.1.8.1/ . im getting the below error . Exception starting filter struts2 *java.lang.ClassNotFoundException*: org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter * my web.xml* ?xml version=1.0 encoding=UTF-8? web-app id=WebApp_ID version=2.4 xmlns=http://java.sun.com/xml/ns/j2ee xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation= http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; display-namemy_project/display-name welcome-file-list welcome-fileinitial.jsp/welcome-file /welcome-file-list filter filter-namestruts2/filter-name filter-class org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter /filter-class /filter filter-mapping filter-namestruts2/filter-name url-pattern/*/url-pattern /filter-mapping /web-app Any help is much appreciated.