struts 2 and dojo innerHTML in a FORM
I am having problems with the following code in IE only. The basic premise for what i am trying to achieve is i would like to use DOJO to call an action and place the resulting JSP contents into a DIV on my current page. That all works fine unless the DIV is inside my FORM tags in which case the action is still called but the returned JSP is not displayed. FireFox is giving me no such problems. I appreciate this is only a trivial example, and appreciate any help anyone can provide. [EMAIL PROTECTED] prefix=s uri=/struts-tags % head s:head theme=ajax debug=true/ script type=text/javascript function test2() { var id = 1; var kw = { preventCache: true, url:simpleAJAX.action, handler:function(type, data, evt) { var displayDiv = dojo.byId(ajaxtest); displayDiv.innerHTML = data; }, mimeType: text/html }; dojo.io.bind(kw); } /script /head body s:form action=quoteAJAX method=post div id=ajaxtest/div s:textfield id=packageCount label=packageCount name=packageCount/ s:submit action=destinationInitialise targets=packages / s:a href=# onclick=test2() quick test /s:a /s:form /body Thanks. -- View this message in context: http://www.nabble.com/struts-2-and-dojo-innerHTML-in-a-FORM-tf4730227.html#a13525672 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: Need Help Struts 2.0.8
Hi, still looking for help. On 10/31/07, Raghuveer Rawat [EMAIL PROTECTED] wrote: Hi, I have form which allows user to invite other users. A user can invite a max of 10 users at a time. A row contain First Name, Last Name, and Email Address. How should I name these textfields (OGNL expression) and how should I retrieve these values in Action Class? table tr tdFirst Name/ td tdLast Name/ td tdEmail Address/ td /tr tr s:textfield name=firstName size=25 maxlength =20//td s:textfield name=lastName size=25 maxlength =20//td s:textfield name=email size=25 maxlength= 20//td /tr similarly 9 more rows like this. /table
Re: Need Help Struts 2.0.8
2007/11/1, Raghuveer Rawat [EMAIL PROTECTED]: Hi, still looking for help. Here it is: http://struts.apache.org/2.x/docs/home.html In other words, RTFM :-) Antonio
Re: Need Help Struts 2.0.8
The simplest way (if I'have understood your problem right) is to create 10 variables in your action class (with getters and setters of course) and on the form. So it'll be private String firstName1; private String firstName2; private String firstName3; ... private String firstName10; in the action class and : s:textfield name=firstName1 size=25 maxlength =20/ s:textfield name=firstName2 size=25 maxlength =20/ s:textfield name=firstName3 size=25 maxlength =20/ ... s:textfield name=firstName10 size=25 maxlength =20/ Struts fills action variables values automatically using reflection. On 11/1/07, Raghuveer Rawat [EMAIL PROTECTED] wrote: Hi, still looking for help. On 10/31/07, Raghuveer Rawat [EMAIL PROTECTED] wrote: Hi, I have form which allows user to invite other users. A user can invite a max of 10 users at a time. A row contain First Name, Last Name, and Email Address. How should I name these textfields (OGNL expression) and how should I retrieve these values in Action Class? table tr tdFirst Name/ td tdLast Name/ td tdEmail Address/ td /tr tr s:textfield name=firstName size=25 maxlength =20//td s:textfield name=lastName size=25 maxlength =20//td s:textfield name=email size=25 maxlength= 20//td /tr similarly 9 more rows like this. /table -- Best regards, Bashmaкov Anton
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]
s2 File Upload Progress Bar
Hello Has anyone tried to implement a file upload progress bar in s2? I have seen this technique on http://www.learntechnology.net/content/ajax/ajax_upload.jsp . Regards -- Markus Stauffer - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: s2 File Upload Progress Bar
I have implemented a file upload progress bar in S2. I used the following as the basis for my work: http://kencochrane.blogspot.com/2006/03/ajax-struts-file-upload-progress -meter.html -Original Message- From: Markus Stauffer [mailto:[EMAIL PROTECTED] Sent: Thursday, November 01, 2007 7:51 AM To: user@struts.apache.org Subject: s2 File Upload Progress Bar Hello Has anyone tried to implement a file upload progress bar in s2? I have seen this technique on http://www.learntechnology.net/content/ajax/ajax_upload.jsp . Regards -- Markus Stauffer - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - ***Note:The information contained in this message may be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the Sender immediately by replying to the message and deleting it from your computer. Thank you. Premier Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Request.getAttribute
I'm new to struts. Setting request.setAttribute(status) in my Action.java, is there a tag to get it in the JSP page? To get around it I've been using %= request.getAttribute(status) % Status is not a class so I don't think it should be implemented as a bean. I've googled without any success Thanks in advance for any help or examples. Blue Cross Blue Shield of Florida, Inc., and its subsidiary and affiliate companies are not responsible for errors or omissions in this e-mail message. Any personal comments made in this e-mail do not reflect the views of Blue Cross Blue Shield of Florida, Inc. The information contained in this document may be confidential and intended solely for the use of the individual or entity to whom it is addressed. This document may contain material that is privileged or protected from disclosure under applicable law. If you are not the intended recipient or the individual responsible for delivering to the intended recipient, please (1) be advised that any use, dissemination, forwarding, or copying of this document IS STRICTLY PROHIBITED; and (2) notify sender immediately by telephone and destroy the document. THANK YOU. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Request.getAttribute
which tag are you using? please display full JSP code so we can further assist you M-- - Original Message - From: Peters, John [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Thursday, November 01, 2007 7:37 AM Subject: Request.getAttribute I'm new to struts. Setting request.setAttribute(status) in my Action.java, is there a tag to get it in the JSP page? To get around it I've been using %= request.getAttribute(status) % Status is not a class so I don't think it should be implemented as a bean. I've googled without any success Thanks in advance for any help or examples. Blue Cross Blue Shield of Florida, Inc., and its subsidiary and affiliate companies are not responsible for errors or omissions in this e-mail message. Any personal comments made in this e-mail do not reflect the views of Blue Cross Blue Shield of Florida, Inc. The information contained in this document may be confidential and intended solely for the use of the individual or entity to whom it is addressed. This document may contain material that is privileged or protected from disclosure under applicable law. If you are not the intended recipient or the individual responsible for delivering to the intended recipient, please (1) be advised that any use, dissemination, forwarding, or copying of this document IS STRICTLY PROHIBITED; and (2) notify sender immediately by telephone and destroy the document. THANK YOU. - 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: Need Help Struts 2.0.8
It's not necessary to do declare 10 variables. Here's an example: http://struts.apache.org/2.x/docs/tabular-inputs.html By the way, Struts 2.0.11 is out, so Raguveer, you might want to upgrade. The answer to your particular question doesn't change, but there are some bug and security fixes you should have. On Nov 1, 2007, at 7:14 AM, John Doe wrote: The simplest way (if I'have understood your problem right) is to create 10 variables in your action class (with getters and setters of course) and on the form. So it'll be private String firstName1; private String firstName2; private String firstName3; ... private String firstName10; in the action class and : s:textfield name=firstName1 size=25 maxlength =20/ s:textfield name=firstName2 size=25 maxlength =20/ s:textfield name=firstName3 size=25 maxlength =20/ ... s:textfield name=firstName10 size=25 maxlength =20/ Struts fills action variables values automatically using reflection. On 11/1/07, Raghuveer Rawat [EMAIL PROTECTED] wrote: Hi, still looking for help. On 10/31/07, Raghuveer Rawat [EMAIL PROTECTED] wrote: Hi, I have form which allows user to invite other users. A user can invite a max of 10 users at a time. A row contain First Name, Last Name, and Email Address. How should I name these textfields (OGNL expression) and how should I retrieve these values in Action Class? table tr tdFirst Name/ td tdLast Name/ td tdEmail Address/ td /tr tr s:textfield name=firstName size=25 maxlength =20//td s:textfield name=lastName size=25 maxlength =20//td s:textfield name=email size=25 maxlength= 20//td /tr similarly 9 more rows like this. /table -- Best regards, Bashmaкov Anton - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Need Help Struts 2.0.8
I found an Article on this in Ian Roughley's book. Posting here if someone is implementing Tabular Data Entry support in their apps. *Utilize Tabular Data Entry Support* Struts2 provides support for using lists to transfer tabulated data easily between the HTML user interface and actions. Let's take a look at an example. Here is a class for Person; each attribute has a getter and setter (not shown): public class Person { int id; String name; int age; float height; } Our action would then use the person class in a list: public class MyAction { public List getPeopleList() { … } public void setPeopleList( List peopleList ) { … } … } Before we can use the Person class as an element in MyAction, we need to add configuration information. This is achieved with the MyAction-conversion.properties file, which is created in the same package as MyAction. The name follows the same convention as for validation, the name of the action followed by a *-conversion.properties suffix. The file contents are: Element_peopleList=Person The prefix Element_ is constant, with the last part of the lefthand value being the name of the list property in the action class. The right-hand side value is the full class name (including package) of the class that is placed into the list. To finish the example we need to render the list to the user: ww:iterator value=peopleList status=stat s:property value=peopleList[#stat.index].id / s:property value=peopleList[#stat.index].name / s:property value=peopleList[#stat.index].age / s:property value=peopleList[#stat.index].height/ /ww:iterator Lists are indexed, so we use the index property of the iterators status object to reference the element being displayed. This is not the most efficient way of achieving this particular result, as the value of the s:property … / tags could have been simply id, name, age and height respectively. What it does show is a clean form of what is needed for an editable form. For a tabular editable form using the same objects, the JSP is: s:form action=update method=post s:iterator value=peopleList status=stat s:hidden name=peopleList[%{#stat.index}].id value=%{peopleList[#stat.index].id}/ s:textfield label=Name name=peopleList[%{#stat.index}].name value=%{peopleList[#stat.index].name}/ s:textfield label=Age name=peopleList[%{#stat.index}].age value=%{peopleList[#stat.index].age} / s:textfield label=Height name=peopleList[%{#stat.index}].height value=%{peopleList[#stat.index].height}/ br/ /s:iterator s:submit value=Update/ /s:form Notice that the name and value attribute of this code is similar to the value attribute above. The difference being in the name we need to provide the actual index by surrounding #stat.index with the correct token to obtain a value, and the value attribute has the entire expression surrounded. Using this code, Struts2 will create an ArrayList with populated People objects, and set the list on the action using the setPeopleList() method. To allow Struts2 to create new objects in the list (perhaps you are dynamically creating elements in the user interface), add the following line to MyAction-conversion.properties configuration file: CreateIfNull_peopleList = true On 11/1/07, John Doe [EMAIL PROTECTED] wrote: The simplest way (if I'have understood your problem right) is to create 10 variables in your action class (with getters and setters of course) and on the form. So it'll be private String firstName1; private String firstName2; private String firstName3; ... private String firstName10; in the action class and : s:textfield name=firstName1 size=25 maxlength =20/ s:textfield name=firstName2 size=25 maxlength =20/ s:textfield name=firstName3 size=25 maxlength =20/ ... s:textfield name=firstName10 size=25 maxlength =20/ Struts fills action variables values automatically using reflection. On 11/1/07, Raghuveer Rawat [EMAIL PROTECTED] wrote: Hi, still looking for help. On 10/31/07, Raghuveer Rawat [EMAIL PROTECTED] wrote: Hi, I have form which allows user to invite other users. A user can invite a max of 10 users at a time. A row contain First Name, Last Name, and Email Address. How should I name these textfields (OGNL expression) and how should I retrieve these values in Action Class? table tr tdFirst Name/ td tdLast Name/ td tdEmail Address/ td /tr tr s:textfield name=firstName size=25 maxlength =20//td s:textfield name=lastName size=25 maxlength =20//td s:textfield name=email size=25 maxlength= 20//td /tr similarly 9 more rows like this. /table -- Best regards, Bashmaкov Anton
RE: Request.getAttribute
Currently I'm not using any tags for this JSP page This is the snip of JSP-No problems doing it this way. But I was wondering if there was a struts tag to do this. tr style='color: #0090DD class='footer2' td% if(null!=request.getAttribute(cellStatus) request.getAttribute(cellStatus)!=) { % % if(((String)request.getAttribute(cellStatus)).equalsIgnoreCase(SUCCES SFUL)){ % FONT COLOR=green %}else{ % FONT COLOR=red %}% B%=request.getAttribute(cellStatus) %/B/FONT %}else{%The result was not found%} %/td /tr This is my action.java which forwards to the above request.setAttribute(cellStatus, status); return mapping.findForward(Forwards.CELLPING); -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Thursday, November 01, 2007 9:04 AM To: Struts Users Mailing List Subject: Re: Request.getAttribute which tag are you using? please display full JSP code so we can further assist you M-- - Original Message - From: Peters, John [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Thursday, November 01, 2007 7:37 AM Subject: Request.getAttribute I'm new to struts. Setting request.setAttribute(status) in my Action.java, is there a tag to get it in the JSP page? To get around it I've been using %= request.getAttribute(status) % Status is not a class so I don't think it should be implemented as a bean. I've googled without any success Thanks in advance for any help or examples. Blue Cross Blue Shield of Florida, Inc., and its subsidiary and affiliate companies are not responsible for errors or omissions in this e-mail message. Any personal comments made in this e-mail do not reflect the views of Blue Cross Blue Shield of Florida, Inc. The information contained in this document may be confidential and intended solely for the use of the individual or entity to whom it is addressed. This document may contain material that is privileged or protected from disclosure under applicable law. If you are not the intended recipient or the individual responsible for delivering to the intended recipient, please (1) be advised that any use, dissemination, forwarding, or copying of this document IS STRICTLY PROHIBITED; and (2) notify sender immediately by telephone and destroy the document. THANK YOU. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: struts 2 and dojo innerHTML in a FORM
--- kingysball [EMAIL PROTECTED] wrote: I am having problems with the following code in IE [...] s:form action=quoteAJAX method=post div id=ajaxtest/div s:textfield id=packageCount [...] I'd look at the generated HTML and try validating it. Remember that the S2 form tags create a table (with the default templates); I'm not sure how cross-browser (or legal) a div... inside a table... is. d. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Request.getAttribute
--- Peters, John [EMAIL PROTECTED] wrote: Setting request.setAttribute(status) in my Action.java, is there a tag to get it in the JSP page? Which version of Struts? If you're using a JSP 2.0 container ${status} should work, or you can explicitly scope it if you prefer. d. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Need Help Struts 2.0.8
Oh, Didn't notice that. Can this message be deleted? On 11/1/07, Dave Newton [EMAIL PROTECTED] wrote: --- Raghuveer Rawat wrote: I found an Article on this in Ian Roughley's book. Posting here if someone is implementing Tabular Data Entry support in their apps. You know it's copyrighted, right? d. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Request.getAttribute
Unfortunately struts 1.1...I know I'm behind the times but I just came into this application I'll try your suggestion below. Thank you -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: Thursday, November 01, 2007 9:44 AM To: Struts Users Mailing List Subject: Re: Request.getAttribute --- Peters, John [EMAIL PROTECTED] wrote: Setting request.setAttribute(status) in my Action.java, is there a tag to get it in the JSP page? Which version of Struts? If you're using a JSP 2.0 container ${status} should work, or you can explicitly scope it if you prefer. d. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Blue Cross Blue Shield of Florida, Inc., and its subsidiary and affiliate companies are not responsible for errors or omissions in this e-mail message. Any personal comments made in this e-mail do not reflect the views of Blue Cross Blue Shield of Florida, Inc. The information contained in this document may be confidential and intended solely for the use of the individual or entity to whom it is addressed. This document may contain material that is privileged or protected from disclosure under applicable law. If you are not the intended recipient or the individual responsible for delivering to the intended recipient, please (1) be advised that any use, dissemination, forwarding, or copying of this document IS STRICTLY PROHIBITED; and (2) notify sender immediately by telephone and destroy the document. THANK YOU. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Need Help Struts 2.0.8
Not really, and it's probably not a big deal anyway. In the future it might make more sense to post a link to the book if you feel compelled to do something like that or post the code that you used. Or you could create or add to a page on one of the struts wikis. d. --- Raghuveer Rawat [EMAIL PROTECTED] wrote: Oh, Didn't notice that. Can this message be deleted? On 11/1/07, Dave Newton [EMAIL PROTECTED] wrote: --- Raghuveer Rawat wrote: I found an Article on this in Ian Roughley's book. Posting here if someone is implementing Tabular Data Entry support in their apps. You know it's copyrighted, right? d. - 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: [2.1]sx:div error in IE
The solution is : - to put the sx:div outside the form !!! Herrera Pedro Herrera wrote: I´, using the follow div tag : sx:div href=%{#url_dominio} firefox works fine but when I use IE(6 and 7) the error message appers : Couldn't load content ... what´s the problem? Is an dojo error ? Herrera -- View this message in context: http://www.nabble.com/-2.1-sx%3Adiv-error-in-IE-tf4727152.html#a13529070 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: struts 2 and dojo innerHTML in a FORM
Why don't you let the a tag do this for you? I think using the ajax tags and hooking things to onclick at the same time is not a good idea. regards musachy On 11/1/07, kingysball [EMAIL PROTECTED] wrote: I am having problems with the following code in IE only. The basic premise for what i am trying to achieve is i would like to use DOJO to call an action and place the resulting JSP contents into a DIV on my current page. That all works fine unless the DIV is inside my FORM tags in which case the action is still called but the returned JSP is not displayed. FireFox is giving me no such problems. I appreciate this is only a trivial example, and appreciate any help anyone can provide. [EMAIL PROTECTED] prefix=s uri=/struts-tags % head s:head theme=ajax debug=true/ script type=text/javascript function test2() { var id = 1; var kw = { preventCache: true, url:simpleAJAX.action, handler:function(type, data, evt) { var displayDiv = dojo.byId(ajaxtest); displayDiv.innerHTML = data; }, mimeType: text/html }; dojo.io.bind(kw); } /script /head body s:form action=quoteAJAX method=post div id=ajaxtest/div s:textfield id=packageCount label=packageCount name=packageCount/ s:submit action=destinationInitialise targets=packages / s:a href=# onclick=test2() quick test /s:a /s:form /body Thanks. -- View this message in context: http://www.nabble.com/struts-2-and-dojo-innerHTML-in-a-FORM-tf4730227.html#a13525672 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [2.1]sx:div error in IE
yes, IE doesn't like that (isn't it a lovely browser? :) ) musachy On 11/1/07, Pedro Herrera [EMAIL PROTECTED] wrote: The solution is : - to put the sx:div outside the form !!! Herrera Pedro Herrera wrote: I´, using the follow div tag : sx:div href=%{#url_dominio} firefox works fine but when I use IE(6 and 7) the error message appers : Couldn't load content ... what´s the problem? Is an dojo error ? Herrera -- View this message in context: http://www.nabble.com/-2.1-sx%3Adiv-error-in-IE-tf4727152.html#a13529070 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: struts 2 and dojo innerHTML in a FORM
Thankyou very much for the advice. The problem was indeed that IE was unhappy populating a DIV in a TABLE. Simply changed my HTML and it worked fine, allowing me to create dynamic FORMS. With regards to using the AJAX tags, I started with those but switched to DOJO code when the I ran into problems. Now I've fixed the issue I can simply go back to using the AJAX theme properly. Once again cheers. Steve newton.dave wrote: --- kingysball [EMAIL PROTECTED] wrote: I am having problems with the following code in IE [...] s:form action=quoteAJAX method=post div id=ajaxtest/div s:textfield id=packageCount [...] I'd look at the generated HTML and try validating it. Remember that the S2 form tags create a table (with the default templates); I'm not sure how cross-browser (or legal) a div... inside a table... is. d. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/struts-2-and-dojo-innerHTML-in-a-FORM-tf4730227.html#a13530153 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: struts 2 and dojo innerHTML in a FORM
Thankyou very much for the advice. The problem was indeed that IE was unhappy populating a DIV in a TABLE. Simply changed my HTML and it worked fine, allowing me to create dynamic FORMS. With regards to using the AJAX tags, I started with those but switched to DOJO code when the I ran into problems. Now I've fixed the issue I can simply go back to using the AJAX theme properly. Once again cheers. kingysball kingysball wrote: I am having problems with the following code in IE only. The basic premise for what i am trying to achieve is i would like to use DOJO to call an action and place the resulting JSP contents into a DIV on my current page. That all works fine unless the DIV is inside my FORM tags in which case the action is still called but the returned JSP is not displayed. FireFox is giving me no such problems. I appreciate this is only a trivial example, and appreciate any help anyone can provide. [EMAIL PROTECTED] prefix=s uri=/struts-tags % head s:head theme=ajax debug=true/ script type=text/javascript function test2() { var id = 1; var kw = { preventCache: true, url:simpleAJAX.action, handler:function(type, data, evt) { var displayDiv = dojo.byId(ajaxtest); displayDiv.innerHTML = data; }, mimeType: text/html }; dojo.io.bind(kw); } /script /head body s:form action=quoteAJAX method=post div id=ajaxtest/div s:textfield id=packageCount label=packageCount name=packageCount/ s:submit action=destinationInitialise targets=packages / s:a href=# onclick=test2() quick test /s:a /s:form /body Thanks. -- View this message in context: http://www.nabble.com/struts-2-and-dojo-innerHTML-in-a-FORM-tf4730227.html#a13530168 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: Need Help Struts 2.0.8
Thanks Jim for link. Yeah, I have to upgrade to newer version 2.0.11. On 11/1/07, Jim Cushing [EMAIL PROTECTED] wrote: It's not necessary to do declare 10 variables. Here's an example: http://struts.apache.org/2.x/docs/tabular-inputs.html By the way, Struts 2.0.11 is out, so Raguveer, you might want to upgrade. The answer to your particular question doesn't change, but there are some bug and security fixes you should have. On Nov 1, 2007, at 7:14 AM, John Doe wrote: The simplest way (if I'have understood your problem right) is to create 10 variables in your action class (with getters and setters of course) and on the form. So it'll be private String firstName1; private String firstName2; private String firstName3; ... private String firstName10; in the action class and : s:textfield name=firstName1 size=25 maxlength =20/ s:textfield name=firstName2 size=25 maxlength =20/ s:textfield name=firstName3 size=25 maxlength =20/ ... s:textfield name=firstName10 size=25 maxlength =20/ Struts fills action variables values automatically using reflection. On 11/1/07, Raghuveer Rawat [EMAIL PROTECTED] wrote: Hi, still looking for help. On 10/31/07, Raghuveer Rawat [EMAIL PROTECTED] wrote: Hi, I have form which allows user to invite other users. A user can invite a max of 10 users at a time. A row contain First Name, Last Name, and Email Address. How should I name these textfields (OGNL expression) and how should I retrieve these values in Action Class? table tr tdFirst Name/ td tdLast Name/ td tdEmail Address/ td /tr tr s:textfield name=firstName size=25 maxlength =20//td s:textfield name=lastName size=25 maxlength =20//td s:textfield name=email size=25 maxlength= 20//td /tr similarly 9 more rows like this. /table -- Best regards, Bashmaкov Anton - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Conversion
Hello, I implemented the StrutsTypeConverter, but only convertFromString() is called, the conversion doesn't happens when an object is converted to String. Anybody knows why it´s happen? -- __ Juan Damasceno __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
struts2 portlet support
I was hoping to get help deploying a struts2 portlet. I have been developing based on the portlet archetype with the embedded jetty/pluto portlet container as detailed at http://portletwork.blogspot.com/ This archetype is based on struts 2.1.0, and developing with it has been great. However, when deploying to a WAS 6.1 server, i would get Error 404: There is no Action mapped for action name HealtheAdmin/, HealtheAdmin being the name of my portlet. While trying to solve this problem, I downloaded the same archetype with struts 2.0.9 dependencies/config, and it deployed on my server no problem. So basically, I have been developing with struts 2.1.0 b/c of how easy the embedded portlet container makes it, and then deploying with 2.0.9. However, I would like to not have the mis-matched versions. I was hoping someone could help clarify the changes i need to make for my 2.1.0 portlet to work so that i can get stop deploying with 2.0.9. I have also looked at the 2.1.1 portlet sample application, and tried deploying it. I built it with no profiles, but got the same error as before (Error 404: There is no Action mapped for action name HealtheAdmin/). If i build it with the pluto profile, I get several errors - first, the pluto plugin seems to generate a web.xml that does not match the dtd, so it is invalid. If i fix that manually, my server complains about having matching servlet and portlet names. Can anyone explain the differences between 2.0.9, 2.1.0, and 2.1.1 portlet applications, how to build them, and where configuration unique to my portlet server should be? Thanks, Brian
Re: Submit button property in ajax not sends value to action.
Thanks very much, this is the way! But I think that the property of submit button should be posted. Thanks, Vinicius Jeromy Evans wrote: I've read somewhere, but can't find the reference, that you're correct that dojo doesn't post the value of the submit button with XHR. Instead, I always post to different methods in the action - one for each submit button. eg. s:submit name=valueButton theme=ajax targets=%{target} action=SomeActionMethodA value=some/ s:submit name=valueButton theme=ajax targets=%{target} action=SomeActionMethodB value=other/ with the corresponding wildcard in struts.xml: action name=SomeAction* method={1}... and two methods in your action: public String methodA() {} public String methodB() {} Hope that helps. regards, Jeromy Evans Vinicius Medeiros Peretti wrote: When I submit a form, in a div using theme=ajax, the value of property of submit button not goes to Action. E.g. s:form action=SomeAction method=post theme=ajax target=%{target} s:submit name=valueButton theme=ajax targets=%{target} value=some/ s:submit name=valueButton theme=ajax targets=%{target} value=other/ /s:form If I click in some or other, I want to get the value by getValueButton(). But it not works. Any way to do this? regards, Vinicius - 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]
related to struts2
How this uri is resolved in struts2 %@ taglib prefix=s uri=/struts-tags % Where jsp compiler finds details about /struts-tags. I have not seen any information about this in web.xml or any other file. -- View this message in context: http://www.nabble.com/related-to-struts2-tf4733474.html#a13535291 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: Submit button property in ajax not sends value to action.
Fixed on 2.1: https://issues.apache.org/struts/browse/WW-1930 musachy On 11/1/07, Vinicius Medeiros Peretti [EMAIL PROTECTED] wrote: Thanks very much, this is the way! But I think that the property of submit button should be posted. Thanks, Vinicius Jeromy Evans wrote: I've read somewhere, but can't find the reference, that you're correct that dojo doesn't post the value of the submit button with XHR. Instead, I always post to different methods in the action - one for each submit button. eg. s:submit name=valueButton theme=ajax targets=%{target} action=SomeActionMethodA value=some/ s:submit name=valueButton theme=ajax targets=%{target} action=SomeActionMethodB value=other/ with the corresponding wildcard in struts.xml: action name=SomeAction* method={1}... and two methods in your action: public String methodA() {} public String methodB() {} Hope that helps. regards, Jeromy Evans Vinicius Medeiros Peretti wrote: When I submit a form, in a div using theme=ajax, the value of property of submit button not goes to Action. E.g. s:form action=SomeAction method=post theme=ajax target=%{target} s:submit name=valueButton theme=ajax targets=%{target} value=some/ s:submit name=valueButton theme=ajax targets=%{target} value=other/ /s:form If I click in some or other, I want to get the value by getValueButton(). But it not works. Any way to do this? regards, Vinicius - 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] -- Hey you! Would you help me to carry the stone? Pink Floyd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: struts2 portlet support
Hi! In version 2.1, the portlet support was moved into a plugin. It could be related to that. Can you find any exceptions or traces of error in the logs somewhere? Nils-H On 11/1/07, Brian Relph [EMAIL PROTECTED] wrote: I was hoping to get help deploying a struts2 portlet. I have been developing based on the portlet archetype with the embedded jetty/pluto portlet container as detailed at http://portletwork.blogspot.com/ This archetype is based on struts 2.1.0, and developing with it has been great. However, when deploying to a WAS 6.1 server, i would get Error 404: There is no Action mapped for action name HealtheAdmin/, HealtheAdmin being the name of my portlet. While trying to solve this problem, I downloaded the same archetype with struts 2.0.9 dependencies/config, and it deployed on my server no problem. So basically, I have been developing with struts 2.1.0 b/c of how easy the embedded portlet container makes it, and then deploying with 2.0.9. However, I would like to not have the mis-matched versions. I was hoping someone could help clarify the changes i need to make for my 2.1.0 portlet to work so that i can get stop deploying with 2.0.9. I have also looked at the 2.1.1 portlet sample application, and tried deploying it. I built it with no profiles, but got the same error as before (Error 404: There is no Action mapped for action name HealtheAdmin/). If i build it with the pluto profile, I get several errors - first, the pluto plugin seems to generate a web.xml that does not match the dtd, so it is invalid. If i fix that manually, my server complains about having matching servlet and portlet names. Can anyone explain the differences between 2.0.9, 2.1.0, and 2.1.1 portlet applications, how to build them, and where configuration unique to my portlet server should be? Thanks, Brian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: related to struts2
See chapter 8 of the JSP spec here: http://jcp.org/aboutJava/communityprocess/final/jsr245/index.html musachy On 11/1/07, StrutsDeveloper [EMAIL PROTECTED] wrote: How this uri is resolved in struts2 %@ taglib prefix=s uri=/struts-tags % Where jsp compiler finds details about /struts-tags. I have not seen any information about this in web.xml or any other file. -- View this message in context: http://www.nabble.com/related-to-struts2-tf4733474.html#a13535291 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: struts2 portlet support
I downloaded and installed the struts2 portlet application 2.1.1, here are the logs - [11/1/07 14:59:22:785 CDT] 0022 ApplicationMg A WSVR0200I: Starting application: struts2-portlet-2_1_1-SNAPSHOT_war [11/1/07 14:59:22:801 CDT] 0022 ApplicationMg A WSVR0204I: Application: struts2-portlet-2_1_1-SNAPSHOT_war Application build level: Unknown [11/1/07 14:59:22:910 CDT] 0022 SibMessageI [:] CWSID0017I: Configuration reload is starting for bus RepositoryTopicBus. [11/1/07 14:59:22:926 CDT] 0022 SibMessageI [:] CWSID0018I: Configuration reload is complete for bus RepositoryTopicBus. [11/1/07 14:59:22:941 CDT] 0022 SibMessageI [:] CWSID0019I: Configuration reload is starting for messaging engine CERN-BR014532Node02.server1-RepositoryTopicBus. [11/1/07 14:59:23:019 CDT] 0022 SibMessageI [:] CWSID0020I: Configuration reload is complete for messaging engine CERN-BR014532Node02.server1-RepositoryTopicBus. [11/1/07 14:59:23:035 CDT] 0022 SibMessageI [:] CWSIS1569I: Messaging engine CERN-BR014532Node02.server1-RepositoryTopicBus is using a file store. [11/1/07 14:59:23:487 CDT] 0022 WebGroup A SRVE0169I: Loading Web Module: struts2-portlet-2.1.1-SNAPSHOT.war. [11/1/07 14:59:23:893 CDT] 0022 WebAppA SRVE0180I: [struts2-portlet-2_1_1-SNAPSHOT_war#struts2-portlet-2.1.1-SNAPSHOT.war] [/struts2-portlet-211] [Servlet.LOG]: Initializing Spring root WebApplicationContext [11/1/07 14:59:24:252 CDT] 0022 VirtualHost I SRVE0250I: Web Module null has been bound to default_host[*:9081,*:80,*:9444,*:5060,*:5061,*:443,*:9088,*:9451,*:5073,*:5072,*:9083,*:9446,*:5063,*:5062,*:9084,*:9447,*:5065,*:5064]. [11/1/07 14:59:24:268 CDT] 0022 ApplicationMg A WSVR0221I: Application started: struts2-portlet-2_1_1-SNAPSHOT_war [11/1/07 15:01:54:195 CDT] 0022 SystemOut O 15:01:54,195 ERROR [ org.apache.struts2.dispatcher.Dispatcher] Could not find action or result There is no Action mapped for action name StrutsPortlet/. - [unknown location] at com.opensymphony.xwork2.DefaultActionProxy.prepare( DefaultActionProxy.java:185) I am accessing the portlet with http://localhost:9081/struts2-portlet-211/StrutsPortlet/ On the struts2 wiki, there is a comment under the tutorial section for portlets, that mentions a WAS 6.1 bugfix - I am running Was 6.1.0.11, and i applied the custom property com.ibm.ws.webcontainer.invokefilterscompatibility=true to both the webserver container and the portlet container, but it did not seem to make a difference On 11/1/07, Nils-Helge Garli Hegvik [EMAIL PROTECTED] wrote: Hi! In version 2.1, the portlet support was moved into a plugin. It could be related to that. Can you find any exceptions or traces of error in the logs somewhere? Nils-H On 11/1/07, Brian Relph [EMAIL PROTECTED] wrote: I was hoping to get help deploying a struts2 portlet. I have been developing based on the portlet archetype with the embedded jetty/pluto portlet container as detailed at http://portletwork.blogspot.com/ This archetype is based on struts 2.1.0, and developing with it has been great. However, when deploying to a WAS 6.1 server, i would get Error 404: There is no Action mapped for action name HealtheAdmin/, HealtheAdmin being the name of my portlet. While trying to solve this problem, I downloaded the same archetype with struts 2.0.9 dependencies/config, and it deployed on my server no problem. So basically, I have been developing with struts 2.1.0 b/c of how easy the embedded portlet container makes it, and then deploying with 2.0.9. However, I would like to not have the mis-matched versions. I was hoping someone could help clarify the changes i need to make for my 2.1.0portlet to work so that i can get stop deploying with 2.0.9. I have also looked at the 2.1.1 portlet sample application, and tried deploying it. I built it with no profiles, but got the same error as before (Error 404: There is no Action mapped for action name HealtheAdmin/). If i build it with the pluto profile, I get several errors - first, the pluto plugin seems to generate a web.xml that does not match the dtd, so it is invalid. If i fix that manually, my server complains about having matching servlet and portlet names. Can anyone explain the differences between 2.0.9, 2.1.0, and 2.1.1portlet applications, how to build them, and where configuration unique to my portlet server should be? Thanks, Brian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] Display Tag? (2.0.11)
I've used DisplayTag with S1 before, with excellent results. I'm also using it in S2 in a few cases, and it's working fine. However, now I want to use it to render a form. Each row in the table will contain a couple of input tags, and the table as a whole represents a single List on my action. Without DisplayTag, I can accomplish that as follows: s:iterator value=rules status=status id=rule div class=resultRow${status.odd ? ' highlight' : ''} div class=name s:property value=name / /div div class=value s:textfield name=%{'rules['+#status.index+'].value'} label= size=90 / /div /div /s:iterator I converted the code above as follows: display:table htmlId=rulesTable list=rules id=rule display:column title=Rule Name s:property value=name / /display:column display:column title=Rule Name s:textfield name=rules[rule_rowNum].value label= size=90 / /display:column /display:table But that didn't work, because DisplayTag doesn't push rule_rowNum onto the stack. So I added a push tag: display:table htmlId=rulesTable list=rules id=rule s:push value=%= rule_rowNum.toString() % id=rowNum/ display:column title=Rule Name s:property value=name / /display:column display:column title=Rule Name s:textfield name=rules[rowNum].value size=90 / /display:column /display:table Then I discovered that s:push doesn't accept runtime expressions, just like everything else in 2.0.11. So, how do I accomplish this? I guess I could keep it the old way, but I'd really rather be consistent. -Jake - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Display Tag? (2.0.11)
You can access the values published by displaytag using #attr, like: dt:table name=products id=row class=dt dt:column s:property value=#attr.row.name / /dt:column /dt:table musachy On 11/1/07, Jake Robb [EMAIL PROTECTED] wrote: I've used DisplayTag with S1 before, with excellent results. I'm also using it in S2 in a few cases, and it's working fine. However, now I want to use it to render a form. Each row in the table will contain a couple of input tags, and the table as a whole represents a single List on my action. Without DisplayTag, I can accomplish that as follows: s:iterator value=rules status=status id=rule div class=resultRow${status.odd ? ' highlight' : ''} div class=name s:property value=name / /div div class=value s:textfield name=%{'rules['+#status.index+'].value'} label= size=90 / /div /div /s:iterator I converted the code above as follows: display:table htmlId=rulesTable list=rules id=rule display:column title=Rule Name s:property value=name / /display:column display:column title=Rule Name s:textfield name=rules[rule_rowNum].value label= size=90 / /display:column /display:table But that didn't work, because DisplayTag doesn't push rule_rowNum onto the stack. So I added a push tag: display:table htmlId=rulesTable list=rules id=rule s:push value=%= rule_rowNum.toString() % id=rowNum/ display:column title=Rule Name s:property value=name / /display:column display:column title=Rule Name s:textfield name=rules[rowNum].value size=90 / /display:column /display:table Then I discovered that s:push doesn't accept runtime expressions, just like everything else in 2.0.11. So, how do I accomplish this? I guess I could keep it the old way, but I'd really rather be consistent. -Jake - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: struts2 portlet support
Downloading and installing the struts2 portlet application 2.0.12 works fine. The differences between 2.0.12 and 2.1.1 are minimal: web.xml has no difference ( i did not uncomment the dispatcher servlet ) portlet.xml has no difference struts.xml includes struts-portlet-default.xml in 2.0.12 but not in 2.1.1 struts.properties exists in 2.0.12 what other files could possibly contribute to the action mapping definitions? On 11/1/07, Brian Relph [EMAIL PROTECTED] wrote: I downloaded and installed the struts2 portlet application 2.1.1, here are the logs - [11/1/07 14:59:22:785 CDT] 0022 ApplicationMg A WSVR0200I: Starting application: struts2-portlet-2_1_1-SNAPSHOT_war [11/1/07 14:59:22:801 CDT] 0022 ApplicationMg A WSVR0204I: Application: struts2-portlet-2_1_1-SNAPSHOT_war Application build level: Unknown [11/1/07 14:59:22:910 CDT] 0022 SibMessageI [:] CWSID0017I: Configuration reload is starting for bus RepositoryTopicBus. [11/1/07 14:59:22:926 CDT] 0022 SibMessageI [:] CWSID0018I: Configuration reload is complete for bus RepositoryTopicBus. [11/1/07 14:59:22:941 CDT] 0022 SibMessageI [:] CWSID0019I: Configuration reload is starting for messaging engine CERN-BR014532Node02.server1-RepositoryTopicBus. [11/1/07 14:59:23:019 CDT] 0022 SibMessageI [:] CWSID0020I: Configuration reload is complete for messaging engine CERN-BR014532Node02.server1-RepositoryTopicBus. [11/1/07 14:59:23:035 CDT] 0022 SibMessageI [:] CWSIS1569I: Messaging engine CERN-BR014532Node02.server1-RepositoryTopicBus is using a file store. [11/1/07 14:59:23:487 CDT] 0022 WebGroup A SRVE0169I: Loading Web Module: struts2-portlet-2.1.1-SNAPSHOT.war. [11/1/07 14:59:23:893 CDT] 0022 WebAppA SRVE0180I: [struts2-portlet-2_1_1-SNAPSHOT_war#struts2-portlet-2.1.1-SNAPSHOT.war] [/struts2-portlet-211] [Servlet.LOG]: Initializing Spring root WebApplicationContext [11/1/07 14:59:24:252 CDT] 0022 VirtualHost I SRVE0250I: Web Module null has been bound to default_host[*:9081,*:80,*:9444,*:5060,*:5061,*:443,*:9088,*:9451,*:5073,*:5072,*:9083,*:9446,*:5063,*:5062,*:9084,*:9447,*:5065,*:5064]. [11/1/07 14:59:24:268 CDT] 0022 ApplicationMg A WSVR0221I: Application started: struts2-portlet-2_1_1-SNAPSHOT_war [11/1/07 15:01:54:195 CDT] 0022 SystemOut O 15:01:54,195 ERROR [ org.apache.struts2.dispatcher.Dispatcher ] Could not find action or result There is no Action mapped for action name StrutsPortlet/. - [unknown location] at com.opensymphony.xwork2.DefaultActionProxy.prepare( DefaultActionProxy.java:185) I am accessing the portlet with http://localhost:9081/struts2-portlet-211/StrutsPortlet/ On the struts2 wiki, there is a comment under the tutorial section for portlets, that mentions a WAS 6.1 bugfix - I am running Was 6.1.0.11, and i applied the custom property com.ibm.ws.webcontainer.invokefilterscompatibility=true to both the webserver container and the portlet container, but it did not seem to make a difference On 11/1/07, Nils-Helge Garli Hegvik [EMAIL PROTECTED] wrote: Hi! In version 2.1, the portlet support was moved into a plugin. It could be related to that. Can you find any exceptions or traces of error in the logs somewhere? Nils-H On 11/1/07, Brian Relph [EMAIL PROTECTED] wrote: I was hoping to get help deploying a struts2 portlet. I have been developing based on the portlet archetype with the embedded jetty/pluto portlet container as detailed at http://portletwork.blogspot.com/ This archetype is based on struts 2.1.0, and developing with it has been great. However, when deploying to a WAS 6.1 server, i would get Error 404: There is no Action mapped for action name HealtheAdmin/, HealtheAdmin being the name of my portlet. While trying to solve this problem, I downloaded the same archetype with struts 2.0.9 dependencies/config, and it deployed on my server no problem. So basically, I have been developing with struts 2.1.0 b/c of how easy the embedded portlet container makes it, and then deploying with 2.0.9. However, I would like to not have the mis-matched versions. I was hoping someone could help clarify the changes i need to make for my 2.1.0portlet to work so that i can get stop deploying with 2.0.9. I have also looked at the 2.1.1 portlet sample application, and tried deploying it. I built it with no profiles, but got the same error as before (Error 404: There is no Action mapped for action name HealtheAdmin/). If i build it with the pluto profile, I get several errors - first, the pluto plugin seems to generate a web.xml that does not match the dtd, so it is invalid. If i fix that manually, my server complains about having matching servlet and portlet names. Can anyone explain the differences between 2.0.9, 2.1.0, and 2.1.1portlet
Re: struts2 portlet support
The only real difference I can think of is that portlet support is a plugin in 2.1. Is the struts2-portlet-plugin jar file in the classpath of the application? Nils-H On 11/1/07, Brian Relph [EMAIL PROTECTED] wrote: Downloading and installing the struts2 portlet application 2.0.12 works fine. The differences between 2.0.12 and 2.1.1 are minimal: web.xml has no difference ( i did not uncomment the dispatcher servlet ) portlet.xml has no difference struts.xml includes struts-portlet-default.xml in 2.0.12 but not in 2.1.1 struts.properties exists in 2.0.12 what other files could possibly contribute to the action mapping definitions? On 11/1/07, Brian Relph [EMAIL PROTECTED] wrote: I downloaded and installed the struts2 portlet application 2.1.1, here are the logs - [11/1/07 14:59:22:785 CDT] 0022 ApplicationMg A WSVR0200I: Starting application: struts2-portlet-2_1_1-SNAPSHOT_war [11/1/07 14:59:22:801 CDT] 0022 ApplicationMg A WSVR0204I: Application: struts2-portlet-2_1_1-SNAPSHOT_war Application build level: Unknown [11/1/07 14:59:22:910 CDT] 0022 SibMessageI [:] CWSID0017I: Configuration reload is starting for bus RepositoryTopicBus. [11/1/07 14:59:22:926 CDT] 0022 SibMessageI [:] CWSID0018I: Configuration reload is complete for bus RepositoryTopicBus. [11/1/07 14:59:22:941 CDT] 0022 SibMessageI [:] CWSID0019I: Configuration reload is starting for messaging engine CERN-BR014532Node02.server1-RepositoryTopicBus. [11/1/07 14:59:23:019 CDT] 0022 SibMessageI [:] CWSID0020I: Configuration reload is complete for messaging engine CERN-BR014532Node02.server1-RepositoryTopicBus. [11/1/07 14:59:23:035 CDT] 0022 SibMessageI [:] CWSIS1569I: Messaging engine CERN-BR014532Node02.server1-RepositoryTopicBus is using a file store. [11/1/07 14:59:23:487 CDT] 0022 WebGroup A SRVE0169I: Loading Web Module: struts2-portlet-2.1.1-SNAPSHOT.war. [11/1/07 14:59:23:893 CDT] 0022 WebAppA SRVE0180I: [struts2-portlet-2_1_1-SNAPSHOT_war#struts2-portlet-2.1.1-SNAPSHOT.war] [/struts2-portlet-211] [Servlet.LOG]: Initializing Spring root WebApplicationContext [11/1/07 14:59:24:252 CDT] 0022 VirtualHost I SRVE0250I: Web Module null has been bound to default_host[*:9081,*:80,*:9444,*:5060,*:5061,*:443,*:9088,*:9451,*:5073,*:5072,*:9083,*:9446,*:5063,*:5062,*:9084,*:9447,*:5065,*:5064]. [11/1/07 14:59:24:268 CDT] 0022 ApplicationMg A WSVR0221I: Application started: struts2-portlet-2_1_1-SNAPSHOT_war [11/1/07 15:01:54:195 CDT] 0022 SystemOut O 15:01:54,195 ERROR [ org.apache.struts2.dispatcher.Dispatcher ] Could not find action or result There is no Action mapped for action name StrutsPortlet/. - [unknown location] at com.opensymphony.xwork2.DefaultActionProxy.prepare( DefaultActionProxy.java:185) I am accessing the portlet with http://localhost:9081/struts2-portlet-211/StrutsPortlet/ On the struts2 wiki, there is a comment under the tutorial section for portlets, that mentions a WAS 6.1 bugfix - I am running Was 6.1.0.11, and i applied the custom property com.ibm.ws.webcontainer.invokefilterscompatibility=true to both the webserver container and the portlet container, but it did not seem to make a difference On 11/1/07, Nils-Helge Garli Hegvik [EMAIL PROTECTED] wrote: Hi! In version 2.1, the portlet support was moved into a plugin. It could be related to that. Can you find any exceptions or traces of error in the logs somewhere? Nils-H On 11/1/07, Brian Relph [EMAIL PROTECTED] wrote: I was hoping to get help deploying a struts2 portlet. I have been developing based on the portlet archetype with the embedded jetty/pluto portlet container as detailed at http://portletwork.blogspot.com/ This archetype is based on struts 2.1.0, and developing with it has been great. However, when deploying to a WAS 6.1 server, i would get Error 404: There is no Action mapped for action name HealtheAdmin/, HealtheAdmin being the name of my portlet. While trying to solve this problem, I downloaded the same archetype with struts 2.0.9 dependencies/config, and it deployed on my server no problem. So basically, I have been developing with struts 2.1.0 b/c of how easy the embedded portlet container makes it, and then deploying with 2.0.9. However, I would like to not have the mis-matched versions. I was hoping someone could help clarify the changes i need to make for my 2.1.0portlet to work so that i can get stop deploying with 2.0.9. I have also looked at the 2.1.1 portlet sample application, and tried deploying it. I built it with no profiles, but got the same error as before (Error 404: There is no Action mapped for action name HealtheAdmin/). If i build it with the
Re: struts2 portlet support
this is the sample webapp downloaded from http://people.apache.org/repo/m2-snapshot-repository/org/apache/struts/struts2-portlet/2.1.1-SNAPSHOT/ can i assume it was built with that struts2-portlet-plugin.jar on the classpath? On 11/1/07, Nils-Helge Garli Hegvik [EMAIL PROTECTED] wrote: The only real difference I can think of is that portlet support is a plugin in 2.1. Is the struts2-portlet-plugin jar file in the classpath of the application? Nils-H On 11/1/07, Brian Relph [EMAIL PROTECTED] wrote: Downloading and installing the struts2 portlet application 2.0.12 works fine. The differences between 2.0.12 and 2.1.1 are minimal: web.xml has no difference ( i did not uncomment the dispatcher servlet ) portlet.xml has no difference struts.xml includes struts-portlet-default.xml in 2.0.12 but not in 2.1.1 struts.properties exists in 2.0.12 what other files could possibly contribute to the action mapping definitions? On 11/1/07, Brian Relph [EMAIL PROTECTED] wrote: I downloaded and installed the struts2 portlet application 2.1.1, here are the logs - [11/1/07 14:59:22:785 CDT] 0022 ApplicationMg A WSVR0200I: Starting application: struts2-portlet-2_1_1-SNAPSHOT_war [11/1/07 14:59:22:801 CDT] 0022 ApplicationMg A WSVR0204I: Application: struts2-portlet-2_1_1-SNAPSHOT_war Application build level: Unknown [11/1/07 14:59:22:910 CDT] 0022 SibMessageI [:] CWSID0017I: Configuration reload is starting for bus RepositoryTopicBus. [11/1/07 14:59:22:926 CDT] 0022 SibMessageI [:] CWSID0018I: Configuration reload is complete for bus RepositoryTopicBus. [11/1/07 14:59:22:941 CDT] 0022 SibMessageI [:] CWSID0019I: Configuration reload is starting for messaging engine CERN-BR014532Node02.server1-RepositoryTopicBus. [11/1/07 14:59:23:019 CDT] 0022 SibMessageI [:] CWSID0020I: Configuration reload is complete for messaging engine CERN-BR014532Node02.server1-RepositoryTopicBus. [11/1/07 14:59:23:035 CDT] 0022 SibMessageI [:] CWSIS1569I: Messaging engine CERN-BR014532Node02.server1-RepositoryTopicBus is using a file store. [11/1/07 14:59:23:487 CDT] 0022 WebGroup A SRVE0169I: Loading Web Module: struts2-portlet-2.1.1-SNAPSHOT.war. [11/1/07 14:59:23:893 CDT] 0022 WebAppA SRVE0180I: [struts2-portlet-2_1_1-SNAPSHOT_war#struts2-portlet-2.1.1-SNAPSHOT.war ] [/struts2-portlet-211] [Servlet.LOG]: Initializing Spring root WebApplicationContext [11/1/07 14:59:24:252 CDT] 0022 VirtualHost I SRVE0250I: Web Module null has been bound to default_host[*:9081,*:80,*:9444,*:5060,*:5061,*:443,*:9088,*:9451,*:5073,*:5072,*:9083,*:9446,*:5063,*:5062,*:9084,*:9447,*:5065,*:5064]. [11/1/07 14:59:24:268 CDT] 0022 ApplicationMg A WSVR0221I: Application started: struts2-portlet-2_1_1-SNAPSHOT_war [11/1/07 15:01:54:195 CDT] 0022 SystemOut O 15:01:54,195 ERROR [ org.apache.struts2.dispatcher.Dispatcher ] Could not find action or result There is no Action mapped for action name StrutsPortlet/. - [unknown location] at com.opensymphony.xwork2.DefaultActionProxy.prepare( DefaultActionProxy.java:185) I am accessing the portlet with http://localhost:9081/struts2-portlet-211/StrutsPortlet/ On the struts2 wiki, there is a comment under the tutorial section for portlets, that mentions a WAS 6.1 bugfix - I am running Was 6.1.0.11, and i applied the custom property com.ibm.ws.webcontainer.invokefilterscompatibility=true to both the webserver container and the portlet container, but it did not seem to make a difference On 11/1/07, Nils-Helge Garli Hegvik [EMAIL PROTECTED] wrote: Hi! In version 2.1, the portlet support was moved into a plugin. It could be related to that. Can you find any exceptions or traces of error in the logs somewhere? Nils-H On 11/1/07, Brian Relph [EMAIL PROTECTED] wrote: I was hoping to get help deploying a struts2 portlet. I have been developing based on the portlet archetype with the embedded jetty/pluto portlet container as detailed at http://portletwork.blogspot.com/ This archetype is based on struts 2.1.0, and developing with it has been great. However, when deploying to a WAS 6.1 server, i would get Error 404: There is no Action mapped for action name HealtheAdmin/, HealtheAdmin being the name of my portlet. While trying to solve this problem, I downloaded the same archetype with struts 2.0.9dependencies/config, and it deployed on my server no problem. So basically, I have been developing with struts 2.1.0 b/c of how easy the embedded portlet container makes it, and then deploying with 2.0.9. However, I would like to not have the mis-matched versions. I was hoping
Re: Struts2 and Portlets + GWT
Err, a stupid question... where do I send the CLA? And I have to send it in PDF format, right? On 10/31/07, Musachy Barroso [EMAIL PROTECTED] wrote: it would be great if you write something up :), you can do it on the GWT plugin page, or setup a new page on the wiki. You would need to file a CLA (http://www.apache.org/licenses/index.html#clas) if you haven't. regards musachy On 10/31/07, Miguel Ping [EMAIL PROTECTED] wrote: By the way, if anyone ever want to know how to use GWT and struts2 for portlet development, I'll be glad to write something up. On 10/31/07, Miguel Ping [EMAIL PROTECTED] wrote: - But doesn't that share the object in ALL sessions? I want to share a specific object per user session. Besides, I don't know how to acess the PortletSession. By using SessionAware I can only get a Map, the PortletSessionMap. The Portlet specs show an example with 3 arguments: session.setAttribute(home.url,url,PortletSession.APPLICATION_SCOPE); session.setAttribute(bkg.color,RED,PortletSession.PORTLET_SCOPE); but the map provided by the SessionAware interface is a regular Map. Thanks once more, Miguel On 10/31/07, Nils-Helge Garli Hegvik [EMAIL PROTECTED] wrote: If you need to share data between the servlet and the portlet, you have to put it in the application scope, using the PortletSession.APPLICATION_SCOPE constant in the setAttribute operation. Nils-H On 10/31/07, Miguel Ping [EMAIL PROTECTED] wrote: I am already using the plugin :) Nice work, by the way ;) I'm having some issue sharing data between portlet sessions and servlet sessions... The portlet api says that the data in servlet session must be acessible from the portlet session. But if i put something in the session map by means of the SessionAware interface, when I'm in the GWT actions, the data is not acessible. Am I doing something wrong? On 10/31/07, Musachy Barroso [EMAIL PROTECTED] wrote: not sure if you can use it for this, but there is a GWT plugin for struts: http://cwiki.apache.org/S2PLUGINS/gwt-plugin.html musachy On 10/31/07, Miguel Ping [EMAIL PROTECTED] wrote: Hi, thanks for the answer. Yes you are correct, GWT makes special requests that update a part of a page. I am reading the Portlet spec and I didn't knew that portlets had custom urls, thanks for the pointer :) So I guess in order to have access to portlet preferences / principal info / etc, the best is to store them in the http session. Is it an option to write a custom GWT request that passes as a regular portlet url, so the dispatcher can process it? I understand that this is not directly related to struts, I just want to be sure that the Jsr168RequestDispatcher works by inspecting urls... On 10/31/07, Nils-Helge Garli Hegvik [EMAIL PROTECTED] wrote: Hi! The Jsr168Dispatcher only handles requests created as Portlet URLs. I'm not familiar with GWT so apoligies if my assumptions are incorrect, but I assume that you're referring to some sort of partial request that updates a section of the page? In that case, it's correct that it should be invoked as a servlet request, since invoking it through a portlet url will change the state and corrupt your entire portlet (you would get the contents of the entire portal page from the request). So I would recommend that you build your application so that the AJAX part is working as a servlet. The Portlet 2.0 specification has better support for this kind of stuff, so it will improve in the future :) Nils-H On 10/31/07, Miguel Ping [EMAIL PROTECTED] wrote: Hi all, this is my first post to struts2 mailing list :) I'm using Struts2 and the gwt plugin by Musachy Barroso, in a portlet project, and for the front end I'm using Google Web Toolkit (gwt). So I'm using struts only for the actions, except for the 'default' action, which is a jsp with struts taglibs. In my portlet project, I have an action that implements the PrincipalAware interface, that is the default action for my portlet. This action calls the jsp. When I debug this action, I can see that the PrincipalProxy object is a portlet proxy object; however all gwt calls to struts2 actions that implement the PrincipalAware interface gives me only Serlver proxy objects. I think that this happens because GWT calls the action directly,
interceptor and converter cycle
We have a pojo with a birthDate property whose setter is going to parse the String value and throw an exception if it cannot be parsed. We are not using a date picker, the value must be typed in as a String. The ParametersInterceptor always picks up the Exception even though I've tried implementing a converter. I've read several posts on converters, but none seem to have the same kind of model implemented that we do where the incoming value is enforced by the setter in the pojo. I'm not sure when the framework is trying to set the posted value and how I can get in front of it with the converter. I'd prefer not to have to put an interceptor in just for this, but would if there was a good case for it. Is anyone else using the pattern? What else might I try? BTW - I just started using S2 and I'm totally psyched about it after using Tapestry for the last 2 years. S2 seems mostly easy to learn (it lives up to the hype, at least in my opinion) but I'm totally stumped on this one. Thanks, Andrew
DateTimePIcker Error
We are having two issues with the datetimepicker in struts 2.0.9 The first is when using the datetime picker the calendar displays 1901 when the date is actually 2001. I'm sure there has to be a simple solution to this. I tried setting the start date to 1930 but that didn't help. The second is that we are getting [RangeError: Maximum call stack size exceeded.] with Safari. Anybody know of any workarounds. I hate to have to go back to using a custom solution. Z. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]