Re: [S2] IE does not refresh page
hi i really think it has something to do with the showloadingText in IE. because when the form is save by clicking the submit button with showLoadingText=false it is saved but the list was not refresh. And if I save the form by clicking the submit button with showLoadingText=true the value is from form is null but the list is refresh with that particular record having null values. also If I click a link that loads the list it does refresh because that link has showLoadingText set to true. Do you have idea how can i solve this? I think Struts are not working fine in IE.. please help me. Thanks again. Jeromy Evans - Blue Sky Minds wrote: Hmm...this is a guess, but there's a relevant issue in IE's innerHTML implementation. Dojo uses this to insert the response into the page. This particular issue is that tables must be xhtml-compliant. Specifically, they must contain all the required tags including thead and tbody. Try adding those tags to your response. IE definitely does not permit you to insert (most) invalid HTML into the page. If not successful, IE is hopeless at debugging this, so simplify the pages (the one making the request and the result) to isolate the cause. Good luck! PS. All your calls like this: s:property value=getModuleName()/ can be replaced with this: s:property value=moduleName/ as it's a javabean-compliant property name (what have works too but is not the convention) carmi_cd wrote: hi, yes my submit reached my action because the record is saved/updated in the database. yes the list is the response from the action. the list is refreshing in Firefox but not in IE..here is part of list.jsp s:iterator id=users value=getUsersList() tr td align=left valign=top s:checkbox name=selectedGroup fieldValue=%{getUserId()}%{nextCell.label} theme=simple / /td td align=left valign=top s:url id=list value=UserMgt_input.action?userid=%{getUserId()}task=edit/ s:a theme=ajax href=%{list} targets=module errorText=Unable to load list. s:property value=getLastName()/ , s:property value=getFirstName()/ s:property value=getMiddleName()/ /s:a /td td align=left valign=top s:property value=getUserName()/ /td td align=left valign=top s:iterator id=modules value=getModules() s:property value=getModuleName()/ , /s:iterator /td /tr /s:iterator i'm using Struts 2.0.5. The theme being use is ajax. I hope I've given you enough information, if not, dont hesitate to ask, i'm really new in Struts, I need help. Thanks again. Jeromy Evans - Blue Sky Minds wrote: Setting showLoadingText=false itself shouldn't affect this. Is the submit reaching your action? Is the list that's refreshed the response from the action? Or is the refresh via a topic? Or refresh by some other means? Does your response contain any inline javascript? Or dojo widgets/ajax tags? The only other thing that frequently doesn't work is including inline javascript in the responses and expecting theme to execute at a particular time. Which version of struts are you using btw? regards, Jeromy Evans - 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] -- View this message in context: http://www.nabble.com/-S2--IE-does-not-refresh-page-tp15560342p15606733.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] IE does not refresh page
hi, yes my submit reached my action because the record is saved/updated in the database. yes the list is the response from the action. the list is refreshing in Firefox but not in IE..here is part of list.jsp s:iterator id=users value=getUsersList() tr td align=left valign=top s:checkbox name=selectedGroup fieldValue=%{getUserId()}%{nextCell.label} theme=simple / /td td align=left valign=top s:url id=list value=UserMgt_input.action?userid=%{getUserId()}task=edit/ s:a theme=ajax href=%{list} targets=module errorText=Unable to load list. s:property value=getLastName()/ , s:property value=getFirstName()/ s:property value=getMiddleName()/ /s:a /td td align=left valign=top s:property value=getUserName()/ /td td align=left valign=top s:iterator id=modules value=getModules() s:property value=getModuleName()/ , /s:iterator /td /tr /s:iterator i'm using Struts 2.0.5. The theme being use is ajax. I hope I've given you enough information, if not, dont hesitate to ask, i'm really new in Struts, I need help. Thanks again. Jeromy Evans - Blue Sky Minds wrote: Setting showLoadingText=false itself shouldn't affect this. Is the submit reaching your action? Is the list that's refreshed the response from the action? Or is the refresh via a topic? Or refresh by some other means? Does your response contain any inline javascript? Or dojo widgets/ajax tags? The only other thing that frequently doesn't work is including inline javascript in the responses and expecting theme to execute at a particular time. Which version of struts are you using btw? regards, Jeromy Evans - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/-S2--IE-does-not-refresh-page-tp15560342p15582733.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] form not retrieving values in IE
I have a form that works find in Firefox but when I tried to run it in Internet Explorer, all the values from the form input box are returned null. I dont know what should I do to fix this problem in IE, here is my form code s:form id=adminForm name=adminForm theme=ajax s:textfield name=employeeId id=employeeId label=Employee ID labelposition=left value=%{edituser.empId} size=10/ s:textfield name=lastname id=lastname label=Lastname labelposition=left value=%{edituser.lastName} size=30/ s:textfield name=firstname id=firstname label=First Name labelposition=left value=%{edituser.firstName} size=30/ s:textfield name=middlename id=middlename label=Middle Name labelposition=left value=%{edituser.middleName} size=30/ s:textfield name=position id=position label=Position labelposition=left value=%{edituser.position} size=40/ s:textfield name=username id=username label=Username labelposition=left value=%{edituser.userName} size=15/ s:textfield name=password id=password label=Password labelposition=left value=%{edituser.password} size=15/ s:textfield name=password2 id=password2 label=Confirm Password value=%{edituser.password} labelposition=left size=15/ /s:form here is my action class code: public String save() { UserBean userBean = new UserBean(); User newUser = new User(); System.out.println(getLastname()); newUser.setLastName(getLastname()); newUser.setFirstName(getFirstname()); newUser.setMiddleName(getMiddlename()); newUser.setPosition(getPosition()); newUser.setEmpId(getEmployeeId()); newUser.setUserName(getUsername()); newUser.setPassword(getPassword()); selectedIds =getSelectedIds(); if(userid == null || userid.equals(false)){ userBean.addUser(newUser,selectedIds); }else{ newUser.setUserId(userid); userBean.updateUser(newUser,selectedIds); } userid=null; return SUCCESS; } public String getUserid() { return userid; } public void setUserid(String value) { this.userid = value; } public String[] getSelectedGroup() { return selectedGroup; } public void setSelectedGroup(String[] value) { this.selectedGroup=value; } public String getTask() { return task; } public void setTask(String task) { this.task = task; } public String getLastname() { return lastname; } public void setLastname(String lastname) { this.lastname = lastname; } public String getFirstname() { return firstname; } public void setFirstname(String firstname) { this.firstname = firstname; } public String getMiddlename() { return middlename; } public void setMiddlename(String middlename) { this.middlename = middlename; } public String getPosition() { return position; } public void setPosition(String position) { this.position = position; } public String getEmployeeId() { return employeeId; } public void setEmployeeId(String employeeId) { this.employeeId = employeeId; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getPassword2() { return password2; } public void setPassword2(String password2) { this.password2 = password2; } I have getter and setter for every input field in my form, i dont know whats causing the problem. when I try to print out lastname, it said it is null. please help me. this problem only appears in Internet Explorer. Thanks in advance -- View this message in context: http://www.nabble.com/-S2--form-not-retrieving-values-in-IE-tp15540602p15540602.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Validation
i was able to identify the problem it was only in IE,I put the showLoadingText=false to my save button then it validates correctly before it wasn't able to get the form values in IE. still thanks newton.date. :-) newton.dave wrote: --- carmi_cd [EMAIL PROTECTED] wrote: Hi I have an application in Struts 2, my problem is when i try to submit the form even if there are values in the form input box it stills give validation message to the user to enter values for the required fields. here is my form fields. s:textfield name=employeeId label=Employee ID labelposition=left value=%{edituser.empId} size=10/ s:textfield name=lastname label=Lastname labelposition=left value=%{edituser.lastName} size=30/ You're validating on lastName etc; do you have getters and setters for lastName and so on, or are you assuming there's a getEdituser() and all the values are being set on the edituser bean? Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/-S2--Validation-tp15539111p15557767.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] IE does not refresh page
Hi i have program that when the user input data in the form and clicked the save button, it should display list of records that reflects changes made in the record edited thru the form. In Firefox it works perfectly but in IE the list does not reflect the changes made. It was refreshing the list before but when I put the ShowLoadingText=false in my save button, It does not refresh the list anymore. I really need to put the ShowLoadingText=false property in my save button to solve the issue in IE which is not retrieving the values from the form. Please help me. how should I solve this. thanks again in advance. -- View this message in context: http://www.nabble.com/-S2--IE-does-not-refresh-page-tp15560342p15560342.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] Validation
Hi I have an application in Struts 2, my problem is when i try to submit the form even if there are values in the form input box it stills give validation message to the user to enter values for the required fields. here is my form fields. s:textfield name=employeeId label=Employee ID labelposition=left value=%{edituser.empId} size=10/ s:textfield name=lastname label=Lastname labelposition=left value=%{edituser.lastName} size=30/ s:textfield name=firstname label=First Name labelposition=left value=%{edituser.firstName} size=30/ s:textfield name=middlename label=Middle Name labelposition=left value=%{edituser.middleName} size=30/ s:textfield name=position label=Position labelposition=left value=%{edituser.position} size=40/ here is my UserMgt-save-validation.xml: !DOCTYPE validators PUBLIC -//OpenSymphony Group//XWork Validator 1.0.2//EN http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd; validators field name=employeeId field-validator type=requiredstring true messageEmployee ID is required./message /field-validator /field field name=lastname field-validator type=requiredstring true messageLastname is required./message /field-validator /field field name=firstname field-validator type=requiredstring true messageFirst Name is required./message /field-validator /field field name=username field-validator type=requiredstring true message key=requiredstring/ /field-validator /field field name=password field-validator type=requiredstring true message key=requiredstring/ /field-validator /field validator type=expression password.equals(password2) messagePassword confirmation did not match./message /validator /validators I also implement prepare interceptors in my action class UserMgt.class here is the prepare code public void prepare() throws Exception { if (userid != null ){ UserBean userBean = new UserBean(); setEdituser(userBean.findUser(userid)); } ModuleBean moduleBean=new ModuleBean(); setModules(moduleBean.getAllModule()); } please help me. Thanks in advance for your help. -- View this message in context: http://www.nabble.com/-S2--Validation-tp15539111p15539111.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] Delete confirmation message
hi i have a form that has a delete button in it to delete the particular record.. i want to put a confirmation message before it execute the deletion. how should i do it in Struts 2? I'm really new with this..please help me . Thanks in advance. -- View this message in context: http://www.nabble.com/-S2--Delete-confirmation-message-tp14875972p14875972.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2]method not called
hi i have a table that has a checkbox, details of the record such as lastname, firstname with it. when user selects a record or records using checkbox corresponding to it, and click the delete button the record or records selected should be deleted. My problem is it is not able to execute the delete method within the action class.. It is directed to the entryform.jsp which is an input form when it should goes back to the list of records after it deleted the records. here is part of my struts.xml action name=UserMgt class=eis.module.UserMgt method=list result name=success/apps/modules/UserMgt/List.jsp/result interceptor-ref name=basicStack/ /action action name=UserMgt_* class=eis.module.UserMgt method={1} result name=success type=redirect-actionUserMgt/result result name=input/apps/modules/UserMgt/EntryForm.jsp/result result name=error/apps/modules/UserMgt/Error.jsp/result /action here is part of my UserMgt code public class UserMgt extends eisSupport implements Preparable { ..variable declaration here.. public String list() { UserBean userBean = new UserBean(); setUsersList(userBean.getUsersList()); return SUCCESS; } public String delete() { UserBean userBean = new UserBean(); if(userBean.deleteUser(getUserids())){ return SUCCESS; } return ERROR; } public String input() { return INPUT; } } here is part of my list.jsp delete button that calls the submit the form s:url id=deleteActionLink value=UserMgt_delete.action / s:submit name=btnDelete id=btnDelete theme=ajax value=Delete cssClass=button formId=adminForm targets=module loadingText=Loading... errorText=Unable to load user list. href=%{deleteActionLink} / here is the checkbox s:checkbox theme=simple name=userid fieldValue=%{getUserId()}/ i only included here parts of the code which i think is related to my question. i also get this ParametersInterceptor - [setParameters] exception when i checked the log of my SunApp Server Unexpected Exception catched: Error setting expression '__checkbox_userid' with value '[Ljava.lang.String;@1839ff8' Unexpected Exception catched: Error setting expression 'dojo.preventCache' with value '[Ljava.lang.String;@7b88e6' Please help me..thanks in advance. -- View this message in context: http://www.nabble.com/-S2-method-not-called-tp14796735p14796735.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Form Select
thank you so much..it solved the problem.. Laurie Harper wrote: They need to be public for Struts to be able to call them... ;-) carmi_cd wrote: here is my getter and setter method for selectedModules private String[] getSelectedModules() { return selectedModules; } private void setSelectedModules(String[] value) { selectedModules=value; } Laurie Harper wrote: What do you getter and setter methods for the selectedModules property look like? Remember, you need both for data to be passed in both directions. L. carmi_cd wrote: hi ted..thanks.. i tried to retrieved selectedModules as an array of String.. but it was not able to get the values.. here is my code.. String[] selectedModules =getSelectedModules(); System.out.println(selected + selectedModules[0]); It printed the value of selected is null..when i selected values from the list. i'm really new with S2, hope you could help me with this..thanks in advance. Ted Husted wrote: Hmmm, did you try selectedModules as an array of String? HTH, Ted * http://www.StrutsMentor.com/ On Jan 7, 2008 1:58 AM, carmi_cd [EMAIL PROTECTED] wrote: i have a form select.. my problem is i dont know how can i get the selected values in the form select box. here is my code.. s:select name=selectedModules value=%{edituser.modules.{moduleId}} list=modules listKey=moduleId listValue=moduleName multiple=true size=7 / it has multiple set to true..so it should return something like a list or array..but if i try to retrieved it using this code.. List selectedModules =getSelectedModules(); System.out.println(selected + selectedModules.size()); i get a null pointer exception error.. how should i do it? thanks in advance.. - 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] -- View this message in context: http://www.nabble.com/-S2--Form-Select-tp14659864p14726058.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Form Select
here is my getter and setter method for selectedModules private String[] getSelectedModules() { return selectedModules; } private void setSelectedModules(String[] value) { selectedModules=value; } Laurie Harper wrote: What do you getter and setter methods for the selectedModules property look like? Remember, you need both for data to be passed in both directions. L. carmi_cd wrote: hi ted..thanks.. i tried to retrieved selectedModules as an array of String.. but it was not able to get the values.. here is my code.. String[] selectedModules =getSelectedModules(); System.out.println(selected + selectedModules[0]); It printed the value of selected is null..when i selected values from the list. i'm really new with S2, hope you could help me with this..thanks in advance. Ted Husted wrote: Hmmm, did you try selectedModules as an array of String? HTH, Ted * http://www.StrutsMentor.com/ On Jan 7, 2008 1:58 AM, carmi_cd [EMAIL PROTECTED] wrote: i have a form select.. my problem is i dont know how can i get the selected values in the form select box. here is my code.. s:select name=selectedModules value=%{edituser.modules.{moduleId}} list=modules listKey=moduleId listValue=moduleName multiple=true size=7 / it has multiple set to true..so it should return something like a list or array..but if i try to retrieved it using this code.. List selectedModules =getSelectedModules(); System.out.println(selected + selectedModules.size()); i get a null pointer exception error.. how should i do it? thanks in advance.. - 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] -- View this message in context: http://www.nabble.com/-S2--Form-Select-tp14659864p14704456.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] What does Select tag set to multiple returns
i have a select that like this.. s:select name=selectedIds value=%{edituser.modules.{moduleId}} list=modules listKey=moduleId listValue=moduleName multiple=true size=7 / how should the getter and setter of selectedIds should look like? what should the selectedIds type? please help it take me already a long time to figure this out..thanks. -- View this message in context: http://www.nabble.com/-S2--What-does-Select-tag-set-to-multiple-returns-tp14706262p14706262.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Form Select
hi ted..thanks.. i tried to retrieved selectedModules as an array of String.. but it was not able to get the values.. here is my code.. String[] selectedModules =getSelectedModules(); System.out.println(selected + selectedModules[0]); It printed the value of selected is null..when i selected values from the list. i'm really new with S2, hope you could help me with this..thanks in advance. Ted Husted wrote: Hmmm, did you try selectedModules as an array of String? HTH, Ted * http://www.StrutsMentor.com/ On Jan 7, 2008 1:58 AM, carmi_cd [EMAIL PROTECTED] wrote: i have a form select.. my problem is i dont know how can i get the selected values in the form select box. here is my code.. s:select name=selectedModules value=%{edituser.modules.{moduleId}} list=modules listKey=moduleId listValue=moduleName multiple=true size=7 / it has multiple set to true..so it should return something like a list or array..but if i try to retrieved it using this code.. List selectedModules =getSelectedModules(); System.out.println(selected + selectedModules.size()); i get a null pointer exception error.. how should i do it? thanks in advance.. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/-S2--Form-Select-tp14659864p14680961.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] how to get the value of form select
how should i get its value..i'm really new to this please help me.. should it be this way.. List selectedmod = getSelectedModules(); System.out.print(Selected +selectedmod.get(0)); thanks again xniit2003 wrote: It should be a list. I guess your selectedModules in the name attribute is also a list and the values of selected items will be populated into it. If you wouldn't write multiple=true, the return data type would be String. On Jan 4, 2008 3:14 PM, carmi_cd [EMAIL PROTECTED] wrote: i have a form select..my problem is how to i get the selected values of the form select.. what is its data type..is it ArrayList? here is my code.. s:select name=selectedModules value=%{edituser.modules.{moduleId}} list=modules listKey=moduleId listValue=moduleName multiple=true size=7 / thanks in advance for your help -- View this message in context: http://www.nabble.com/-S2--how-to-get-the-value-of-form-select-tp14613273p14613273.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thanks Regards Arpan Debroy AOL Online India Private Ltd RMZ EcoSpace Campus 1A Outer Ring Road, Bellandur, Bangalore - 560037 India Mobile No :+9886006306 on-board :+91 (80) 4035 4528 E-mail : [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/-S2--how-to-get-the-value-of-form-select-tp14613273p14657904.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] Form Select
i have a form select.. my problem is i dont know how can i get the selected values in the form select box. here is my code.. s:select name=selectedModules value=%{edituser.modules.{moduleId}} list=modules listKey=moduleId listValue=moduleName multiple=true size=7 / it has multiple set to true..so it should return something like a list or array..but if i try to retrieved it using this code.. List selectedModules =getSelectedModules(); System.out.println(selected + selectedModules.size()); i get a null pointer exception error.. how should i do it? thanks in advance.. -- View this message in context: http://www.nabble.com/-S2--Form-Select-tp14659864p14659864.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] how to get the value of form select
i have a form select..my problem is how to i get the selected values of the form select.. what is its data type..is it ArrayList? here is my code.. s:select name=selectedModules value=%{edituser.modules.{moduleId}} list=modules listKey=moduleId listValue=moduleName multiple=true size=7 / thanks in advance for your help -- View this message in context: http://www.nabble.com/-S2--how-to-get-the-value-of-form-select-tp14613273p14613273.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
how to get the value of form select
i have a form select..my problem is how to i get the selected values of the form select.. what is its data type..is it ArrayList? here is my code.. s:select name=selectedModules value=%{edituser.modules.{moduleId}} list=modules listKey=moduleId listValue=moduleName multiple=true size=7 / thanks in advance for your help -- View this message in context: http://www.nabble.com/how-to-get-the-value-of-form-select-tp14613272p14613272.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] How to retained pre selected values in Struts form select
i have preselected values in my form select..my problem is when i try to add to its selected values by clicking other entries.. it looses the preselected values. how could i solve this? here is the code.. s:select name=edituser.modules.moduleId value=%{edituser.modules.{moduleId}} list=modules listKey=moduleId listValue=moduleName multiple=true size=7 / thanks in advance.., -- View this message in context: http://www.nabble.com/-S2--How-to-retained-pre-selected-values-in-Struts-form-select-tp14572905p14572905.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2]Checkbox value
i already solved it.. i hope this help other new struts user just replaced it with this one.. s:checkbox name=userId fieldValue=%{getUserId()}/ carmi_cd wrote: hello i have a checkbox which supposed to have the value of UserId property of the action class I try to do it this way but its having an exception.. here is how i've done it.. input name=chkUserId type=checkbox value=s:property value=%{getUserId()}/ / and here is the exception.. Unexpected Exception catched: Error setting expression 'chkUserId' with value '[Ljava.lang.String;@104496b' please help me..thanks in advance.. -- View this message in context: http://www.nabble.com/-S2-Checkbox-value-tp14291211p14332370.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2]Checkbox value
I've tried what you've suggested but i got same error.. Unexpected Exception catched: Error setting expression 'chkUserId' with value '[Ljava.lang.String;@138c03' here is part of the code.. s:iterator id=users value=getUsersList() tr td align=center input name=chkUserId type=checkbox value=%{userId()}/ /td td align=left valign=top s:url id=report value=UserMgt_input.action?userId=%{getUserId()}task=edit/ s:a theme=ajax href=%{report} targets=module errorText=Unable to load Report Generator. s:property value=getUserId()/s:property value=getLastName()/ , s:property value=getFirstName()/ s:property value=getMiddleName()/ /s:a /td td align=left valign=top s:property value=getUserName()/ /td td align=left valign=top s:iterator id=modules value=getModules() s:property value=getModuleName()/ , /s:iterator /td /tr /s:iterator do you know how i should solve this? Thanks in advance.. jogep wrote: input name=chkUserId type=checkbox value=s:property value=getUserId()// try this version: input name=chkUserId type=checkbox value=%{userId()}/ you can't use tags in tags. Best Regards Johannes Geppert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/-S2-Checkbox-value-tp14291211p14330776.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2]Checkbox value
hello i have a checkbox which supposed to have the value of UserId property of the action class I try to do it this way but its having an exception.. here is how i've done it.. input name=chkUserId type=checkbox value=s:property value=%{getUserId()}/ / and here is the exception.. Unexpected Exception catched: Error setting expression 'chkUserId' with value '[Ljava.lang.String;@104496b' please help me..thanks in advance.. -- View this message in context: http://www.nabble.com/-S2-Checkbox-value-tp14291211p14291211.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2]Checkbox value
hello i tried to view the value of s:property value=getUserId()/ and its value is just one id for each row.. but it seems the checkbox are not accepting this value.. input name=chkUserId type=checkbox value=s:property value=getUserId()// i dont know what wrong with this? thanks again. Ray Chen wrote: carmi_cd 写道: hello i have a checkbox which supposed to have the value of UserId property of the action class I try to do it this way but its having an exception.. here is how i've done it.. input name=chkUserId type=checkbox value=s:property value=%{getUserId()}/ / and here is the exception.. Unexpected Exception catched: Error setting expression 'chkUserId' with value '[Ljava.lang.String;@104496b' please help me..thanks in advance.. hi, The [Ljava.lang.String;@104496 means that the parameter is a String array Once when I tried to get the parameter from JSP, I found that it returns a String [] And I solve it by getting the first element of this array ( String[0]) I think you should do some to get the element value before set it to the checkbox You can have a try. -- Ray Chen Email:[EMAIL PROTECTED] Blog: http://clraychen.blogcn.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/-S2-Checkbox-value-tp14291211p14311050.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] ArrayList of Object as datasource in JasperReports
here is the complete struts.xml struts package name=apps namespace=/apps extends=struts-default,jasperreports-default !-- APPLICATION/GENERAL actions here -- action name=Logout class=apps.Logout result type=redirect-actionLogin_input/result /action action name=Menu class=apps.Menu result/apps/Menu.jsp/result /action !-- APPLICATION MODULE actions here -- action name=Toolbar class=eis.module.Toolbar result/apps/modules/Toolbar.jsp/result /action action name=Hrmis class=eis.module.Hrmis result name=error/apps/SessionExpired.jsp/result result/apps/modules/Hrmis.jsp/result /action action name=FNU class=eis.module.FNU result name=error/apps/SessionExpired.jsp/result result/apps/modules/FNU.jsp/result /action action name=Engineering class=eis.module.Engineering result name=error/apps/SessionExpired.jsp/result result/apps/modules/Engineering.jsp/result /action action name=UserMgt class=eis.module.UserMgt method=list result name=success/apps/modules/UserMgt/List.jsp/result interceptor-ref name=basicStack/ /action action name=UserMgt_* class=eis.module.UserMgt method={1} result name=success type=redirect-actionUserMgt/result result name=input/apps/modules/UserMgt/EntryForm.jsp/result result name=error/apps/modules/UserMgt/Error.jsp/result /action action name=ReportGenerator class=eis.report.ReportGenerator result name=error/apps/SessionExpired.jsp/result result/apps/reports/ReportGenerator.jsp/result /action !-- REPORT FILTER FORM actions here -- action name=ReportFilterForm_* class=eis.report.ReportFilterForm_{1} result/apps/reports/ReportFilterForm_{1}.jsp/result /action !-- REPORT actions here -- action name=EIS-HR-* class=eis.report.EIS_HR_{1} result name=error/apps/reports/ReportNotFound.jsp/result result/apps/reports/EIS_HR_{1}.jsp/result /action action name=EIS-FN-* class=eis.report.EIS_FN_{1} result name=error/apps/reports/ReportNotFound.jsp/result result/apps/reports/EIS_FN_{1}.jsp/result /action action name=EIS-EG-* class=eis.report.EIS_EG_{1} result name=error/apps/reports/ReportNotFound.jsp/result result/apps/reports/EIS_EG_{1}.jsp/result /action action name=EIS-HR-004_JASPER class=eis.report.EIS_HR_004_JASPER result name=error/apps/reports/ReportNotFound.jsp/result result name=success type=jasper apps/reports/templates/hr004.jasper reportData PDF /result /action !-- Add actions here -- action name=Login_* method={1} class=apps.Login result name=input/apps/Login.jsp/result result type=redirect-actionHome/result /action action name=* class=apps.eisSupport result/apps/{1}.jsp/result /action /package /struts please help me i've been thinking of it for a long time now..thanks again.. strutstwouser wrote: Can you paste the entire struts.xml ; ensure that you have : package name=mypackage extends=struts-default,jasperreports-default On Nov 7, 2007 8:51 PM, carmi_cd [EMAIL PROTECTED] wrote: hi actually i tried using that tutorial and got a pdf with no data in it only page and column titles. i dont know why.. Stacktrace of my sun application server, it has no problem. i dont know why the report is not filled with the data. here is my code: public class EIS_HR_004_JASPER extends eisSupport { private String reportId; private String dateStart = null; private String dateEnd = null; private String pdfFile; private final static String _REPORT_FOLDER = EIS_HR_003; private Report thisReport; private String dateRange; private ArrayListPersonnel reportData = new ArrayListPersonnel(); public String execute(ActionMapping mapping,ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { ReportBean reportBean = new ReportBean(); setThisReport(reportBean.getReport(getReportId())); setReportData(); try { JasperCompileManager.compileReportToFile( apps/reports/templates/hr004.jrxml, apps/reports/templates/hr004.jasper); } catch (Exception e) { System.out.println(empty
Re: [S2] ArrayList of Object as datasource in JasperReports
hi actually i tried using that tutorial and got a pdf with no data in it only page and column titles. i dont know why.. Stacktrace of my sun application server, it has no problem. i dont know why the report is not filled with the data. here is my code: public class EIS_HR_004_JASPER extends eisSupport { private String reportId; private String dateStart = null; private String dateEnd = null; private String pdfFile; private final static String _REPORT_FOLDER = EIS_HR_003; private Report thisReport; private String dateRange; private ArrayListPersonnel reportData = new ArrayListPersonnel(); public String execute(ActionMapping mapping,ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { ReportBean reportBean = new ReportBean(); setThisReport(reportBean.getReport(getReportId())); setReportData(); try { JasperCompileManager.compileReportToFile( apps/reports/templates/hr004.jrxml, apps/reports/templates/hr004.jasper); } catch (Exception e) { System.out.println(empty); e.printStackTrace(); return ERROR; } return SUCCESS; } public String getReportId() { return reportId; } public void setReportId(String reportId) { this.reportId = reportId; } public String getDateStart() { if (this.dateStart == null || this.dateStart.equals()) { ResourceBundle eisProperty=ResourceBundle.getBundle(eis); this.dateStart = eisProperty.getString(eis.minimum.date); } return this.dateStart; } public void setDateStart(String dateStart) { this.dateStart = dateStart; } public String getDateEnd() { if (this.dateEnd == null || this.dateEnd.equals()) { Calendar cal = Calendar.getInstance(TimeZone.getDefault()); this.dateEnd = (new SimpleDateFormat(MMM d, ).format(cal.getTime())); } return this.dateEnd; } public void setDateEnd(String dateEnd) { this.dateEnd = dateEnd; } public String getPdfFile() { //setPdfFile(); return pdfFile; } public Report getThisReport() { return thisReport; } public void setThisReport(Report thisReport) { this.thisReport = thisReport; } public String getDateRange() { setDateRange(); return dateRange; } public void setDateRange() { this.dateRange = ( + getDateStart() + - + getDateEnd() + ); } public ArrayListPersonnel getReportData() { // setReportData(); return reportData; } public void setReportData() { Personnel p1=new Personnel(); p1.setSurname(Dela Cruz); p1.setFirstname(Juan); p1.setExamcode(CSC111); p1.setExamdate(January 1,2003); Personnel p2=new Personnel(); p2.setSurname(Cruz); p2.setFirstname(Miguel); p2.setExamcode(CSC222); p2.setExamdate(December 2,2003); reportData.add(p1); reportData.add(p2); } } here is part of my struts.xml action name=EIS-HR-004_JASPER class=eis.report.EIS_HR_004_JASPER result name=error/apps/reports/ReportNotFound.jsp/result result name=success type=jasper apps/reports/templates/hr004.jasper reportData PDF /result /action i hope you could help me..thanks a lot. strutstwouser wrote: http://struts.apache.org/2.x/docs/jasperreports-tutorial.html ; I was able to use this as-is and get a report fine. -Joseph carmi_cd wrote: I need a tutorial that uses ArrayList of Object as datasource for JasperReports..do you know any? -- View this message in context: http://www.nabble.com/-S2--ArrayList-of-Object-as-datasource-in-JasperReports-tf4749173.html#a13639836 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] ArrayList of Object as datasource in JasperReports
I need a tutorial that uses ArrayList of Object as datasource for JasperReports..do you know any? -- View this message in context: http://www.nabble.com/-S2--ArrayList-of-Object-as-datasource-in-JasperReports-tf4749173.html#a13580062 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2]Datasource is null in JasperReports integration
i have done what you suggested but got the same errors..thanks again. strutstwouser wrote: I guess you need to have reportData as a field in the Action and do setReportData(reportData) in execute() after populating it. On 10/26/07, carmi_cd [EMAIL PROTECTED] wrote: i'm new in integrating JasperReports and Struts 2..my problem is its always saying that my datasouce is null so it displays a pdf file with all the labels in it without anything on the detail part..my datasource is an ArrayList of Personnel object, i name it reportData. here is part of my code.. public class EIS_HR_004_JASPER extends eisSupport { private String reportId; private String dateStart = null; private String dateEnd = null; private Report thisReport; private String dateRange; private ArrayListPersonnel reportData; public String execute(ActionMapping mapping,ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { ReportBean reportBean = new ReportBean(); setThisReport(reportBean.getReport(getReportId())); reportData=new ArrayListPersonnel(); Personnel p1=new Personnel(); p1.setSurname(De la Cruz); p1.setFirstname(Juan); p1.setExamcode(CSC111); p1.setExamdate(January 1,2003); Personnel p2=new Personnel(); p2.setSurname(Hepburn); p2.setFirstname(Audrey); p2.setExamcode(CSC222); p2.setExamdate(December 2,2003); reportData.add(p1); reportData.add(p2); return SUCCESS; } public ArrayListPersonnel getReportData() { // setReportData(); return reportData; } } thanks in advance for your help. -- View this message in context: http://www.nabble.com/-S2-Datasource-is-null-in-JasperReports-integration-tf4695652.html#a13422205 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/-S2-Datasource-is-null-in-JasperReports-integration-tf4695652.html#a13526998 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Data source was null exception..
hi i followed this tutorial.. in JasperReports/Struts 2 Integration http://cwiki.apache.org/WW/jasperreports-tutorial.html but I got this exception Data source value for data source myList was null. i dont know whats causing the problem..thanks in advance. -- View this message in context: http://www.nabble.com/Data-source-was-null-exception..-tf4716197.html#a13481888 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts 2 and JasperReports Integration
hi i followed this tutorial.. in JasperReports/Struts 2 Integration http://cwiki.apache.org/WW/jasperreports-tutorial.html but I got this exception Data source value for data source myList was null. i dont know whats causing the problem..thanks in advance. -- View this message in context: http://www.nabble.com/Struts-2-and-JasperReports-Integration-tf4716462.html#a13482629 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2]Datasource is null in JasperReports integration
i'm new in integrating JasperReports and Struts 2..my problem is its always saying that my datasouce is null so it displays a pdf file with all the labels in it without anything on the detail part..my datasource is an ArrayList of Personnel object, i name it reportData. here is part of my code.. public class EIS_HR_004_JASPER extends eisSupport { private String reportId; private String dateStart = null; private String dateEnd = null; private Report thisReport; private String dateRange; private ArrayListPersonnel reportData; public String execute(ActionMapping mapping,ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { ReportBean reportBean = new ReportBean(); setThisReport(reportBean.getReport(getReportId())); reportData=new ArrayListPersonnel(); Personnel p1=new Personnel(); p1.setSurname(De la Cruz); p1.setFirstname(Juan); p1.setExamcode(CSC111); p1.setExamdate(January 1,2003); Personnel p2=new Personnel(); p2.setSurname(Hepburn); p2.setFirstname(Audrey); p2.setExamcode(CSC222); p2.setExamdate(December 2,2003); reportData.add(p1); reportData.add(p2); return SUCCESS; } public ArrayListPersonnel getReportData() { // setReportData(); return reportData; } } thanks in advance for your help. -- View this message in context: http://www.nabble.com/-S2-Datasource-is-null-in-JasperReports-integration-tf4695652.html#a13422205 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] JasperReports and Struts2 DataSource was null error
i'm new in integrating JasperReports and Struts 2..my problem is its always saying that my datasouce is null so it displays a pdf file with all the labels in it without anything on the detail part..my datasource is an ArrayList of Personnel object, i name it reportData. here is part of my code.. public class EIS_HR_004_JASPER extends eisSupport { private String reportId; private String dateStart = null; private String dateEnd = null; private Report thisReport; private String dateRange; private ArrayListPersonnel reportData; public String execute(ActionMapping mapping,ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { ReportBean reportBean = new ReportBean(); setThisReport(reportBean.getReport(getReportId())); reportData=new ArrayListPersonnel(); Personnel p1=new Personnel(); p1.setSurname(De la Cruz); p1.setFirstname(Juan); p1.setExamcode(CSC111); p1.setExamdate(January 1,2003); Personnel p2=new Personnel(); p2.setSurname(Hepburn); p2.setFirstname(Audrey); p2.setExamcode(CSC222); p2.setExamdate(December 2,2003); reportData.add(p1); reportData.add(p2); return SUCCESS; } public ArrayListPersonnel getReportData() { // setReportData(); return reportData; } } thanks in advance for your help. :-) -- View this message in context: http://www.nabble.com/-S2--JasperReports-and-Struts2-DataSource-was-null-error-tf4689733.html#a13403514 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: conditional statement in struts2
would this code function correctly..that if pdfValue==1 it will display an iframe containing a pdf generated from jasperreports else a strut div will be displayed containing an html format report? s:if test=pdfValue==1 iframe id=reportPreview name=reportPreview src=%{getReportNumber()}.action?reportId=%{getReportId()} width=800 height=600/ /s:if s:else s:div theme=ajax id=reportPreview href=%{getReportNumber()}.action?reportId=%{getReportId()} cssStyle=componentHolder loadingText=Loading report... Please wait. errorText=Unable to load report. listenTopics=load_report_preview executeScripts=true Loading report... Please wait. /s:div /s:else thanks again. jignesh(india) wrote: It's simple dude use s:if and s:else like mentioned below s:if test=pdfValue!=0 if part /s:if s:else else part /s:else hope it will help u.! Regards, Jignesh carmi_cd wrote: hi i'm new in struts 2..my question is how can i get a value from a member variable of my action class and evaluate it in my if-else-if statemet? i try to code it but it doesn't evaluate properly..here is my exisiting code. s:if test='%{getPdfValue()} == 0' s:div theme=ajax id=reportPreview href=%{getReportNumber()}.action?reportId=%{getReportId()} cssStyle=componentHolder loadingText=Loading report... Please wait. errorText=Unable to load report. listenTopics=load_report_preview executeScripts=true Loading report... Please wait. /s:div /s:if s:else s:div theme=ajax id=reportPreview cssStyle=componentHolder loadingText=Loading PDF errorText=Unable to load report. listenTopics=load_report_preview executeScripts=true iframe id=pdf_container name=pdf_container src=%{getReportNumber()}.action?reportId=%{getReportId()} width=800 height=600/ /s:div /s:else it supposed to display the genereated pdf inside the iframe if the getPdfValue() method return are not equal to 0. please help me its not evaluating properly..thanks in advance. -- View this message in context: http://www.nabble.com/conditional-statement-in-struts2-tf4682064.html#a13382105 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
conditional statement in struts2
hi i'm new in struts 2..my question is how can i get a value from a member variable of my action class and evaluate it in my if-else-if statemet? i try to code it but it doesn't evaluate properly..here is my exisiting code. s:if test='%{getPdfValue()} == 0' s:div theme=ajax id=reportPreview href=%{getReportNumber()}.action?reportId=%{getReportId()} cssStyle=componentHolder loadingText=Loading report... Please wait. errorText=Unable to load report. listenTopics=load_report_preview executeScripts=true Loading report... Please wait. /s:div /s:if s:else s:div theme=ajax id=reportPreview cssStyle=componentHolder loadingText=Loading PDF errorText=Unable to load report. listenTopics=load_report_preview executeScripts=true iframe id=pdf_container name=pdf_container src=%{getReportNumber()}.action?reportId=%{getReportId()} width=800 height=600/ /s:div /s:else it supposed to display the genereated pdf inside the iframe if the getPdfValue() method return are not equal to 0. please help me its not evaluating properly..thanks in advance. -- View this message in context: http://www.nabble.com/conditional-statement-in-struts2-tf4682064.html#a13379191 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]