Re: struts2 and dojo
2009/3/11 Mohan Radhakrishnan : > Are you supporting JQuery in the future ? There is work-in-progress on jquery-plugin > I know I should be expecting only voluntary support from a open-source > project. Will the developers who are still working on DOJO support in Struts > tags suddenly stop working ? Has the bug fixing stopped ? As I know no, bugs regarding Dojo still will be solved. Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Get jsp content in struts action
I don't know how to solve your problem, but you can look at this thread for some good advice: http://www.mail-archive.com/user@struts.apache.org/msg85536.html Maybe you'll find this useful as well: http://forums.sun.com/thread.jspa?threadID=730559&messageID=4220069 Nils-H On Tue, Mar 10, 2009 at 8:10 AM, D1vy@@Ind1@ wrote: > > Our application is a simple online form, in which users enters details about > various books maintained in a library, hence when updated/new editions of > book arrive, we would be mailing the concerned people about the updated > version of the book. Before the user updates the existing record, when he > click preview he could see the details of the book, with the changes in the > edition highlighted. Now when these details are mailed programmatically (the > content would be the same they see in the preview page with the changes > highlighted), hence we wanted to call the JSP from the Struts action class. > > -D > > > Nils-Helge Garli wrote: >> >> Why do you need the contents of the JSP? I'd consider a Servlet Filter >> instead if you need to process the output before it's returned to the >> browser. >> >> Nils-H >> >> On Tue, Mar 10, 2009 at 7:29 AM, D1vy@@Ind1@ >> wrote: >>> >>> Hmm.. I am not sure if the code is problematic because with the same code >>> I >>> am able to read the contents of all JSP pages. Only for JSPs using struts >>> tags I get an exception as mentioned previously, I wanted to know how can >>> I >>> get rid of that exception. >>> >>> -D >>> >>> >>> mgainty wrote: the input stream comes from Request the output stream comes from Response response.getOutputStream(); http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletResponse.html#getOutputStream() this code is problematic as it is NOT associated with output stream from HttpServletResponse response > baos = new ByteArrayOutputStream(); > pw = new PrintWriter(baos); Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. > Date: Fri, 6 Mar 2009 05:32:21 -0800 > From: divya.rajendran...@gmail.com > To: user@struts.apache.org > Subject: Get jsp content in struts action > > > Hello, > > I have a JSP with struts tags in it. I want to get its contents from > the > struts action class. I did it using RequestDispatcher. > > I wrote the following code .. > > == > // Creates a response wrapper object. > BufferedHttpResponseWrapper responseWrapper = new > BufferedHttpResponseWrapper(response); > > // Creates a requestDispatcher object. > ServletContext sc = request.getSession().getServletContext(); > String url = > response.encodeRedirectURL("/web/jsp/osf/ShowStaffingForm.jsp"); > RequestDispatcher dispatcher = sc.getRequestDispatcher(url); > try { > dispatcher.include(request,responseWrapper); > } catch (Exception e) { > e.printStackTrace(); > } > try { > String result = new String(responseWrapper.getOutput()); > System.out.println("Result :: "+result); > } catch (Exception e) { > System.out.println("Exception occurring here..."); > e.printStackTrace(); > } > > //This is the reponse wrapper class. > /* > * BufferedHttpResponseWrapper class > * * > */ > public class BufferedHttpResponseWrapper extends > HttpServletResponseWrapper > { > > PrintWriter pw = null; > ByteArrayOutputStream baos = null; > > public BufferedHttpResponseWrapper(HttpServletResponse > response) { > > super(response); > baos = new ByteArrayOutputStream(); > pw = new PrintWriter(baos); > } > > public PrintWriter getWriter() throws IOException { > return pw; > } > > public String getOutput() { > pw.flush(); > pw.close(); > return baos.toString(); > } > > } > > > I get the jsp content in my log files, but I get an exception on the > browser > when I call this action. > Please note that when the JSP has simple HTML tags
Re: logic:iterate issue
Hi Joe, You can try to output authorId, without property set on, maybe these objects are empty inside. Also, did You imported logic tags into jsp? Best greetings, Pawel Wielgus. 2009/3/10, Russo, Joe : > The following bean:write code outputs: > [com.cadmus.rpm.domain.custom.authorsc...@d08faa] > > I am using a (allAdditionalAuthors) ArrayList to store AuthorsCDTO. > Should I be using another collection type? > Not sure why this is not working and would really appreciate any help. > > > -Original Message- > From: Russo, Joe [mailto:rus...@cadmus.com] > Sent: Tuesday, March 10, 2009 2:28 PM > To: Struts Users Mailing List > Subject: logic:iterate issue > > > Sorry forgot to change subject. > > -Original Message- > From: Russo, Joe [mailto:rus...@cadmus.com] > Sent: Tuesday, March 10, 2009 2:25 PM > To: Struts Users Mailing List > Subject: RE: Convention Plugin and Action Chaining > > I defined the below code and would like to use the iterate functionality > witin the jsp. This code does not cause any error, but does not display > any data. Any ideas why? > > package com.cadmus.rpm.domain.custom; > > import java.io.Serializable; > import java.util.Date; > import java.util.ArrayList; > > > public class AuthorsCDTO implements Serializable { > private String addAuthorFirstName; > private String addAuthorLastName; > private String addAuthorMiddleInitial; > public String getAddAuthorFirstName() { > return addAuthorFirstName; > } > public void setAddAuthorFirstName(String addAuthorFirstName) { > this.addAuthorFirstName = addAuthorFirstName; > } > public String getAddAuthorLastName() { > return addAuthorLastName; > } > public void setAddAuthorLastName(String addAuthorLastName) { > this.addAuthorLastName = addAuthorLastName; > } > public String getAddAuthorMiddleInitial() { > return addAuthorMiddleInitial; > } > public void setAddAuthorMiddleInitial(String addAuthorMiddleInitial) { > this.addAuthorMiddleInitial = addAuthorMiddleInitial; > } > > > } > > private ArrayList allAdditionalAuthors; > public ArrayList getAllAdditionalAuthors() { > return allAdditionalAuthors; > } > public void setAllAdditionalAuthors(ArrayList allAdditionalAuthors) { > this.allAdditionalAuthors = allAdditionalAuthors; > } > > scope="session"> >property="allAdditionalAuthors" > type="com.cadmus.rpm.domain.custom.AuthorsCDTO" scope="session"> > > >property="addAuthorFirstName"/> > > >property="addAuthorMiddleInitial"/> > >property="addAuthorLastName"/> > > > > > > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > > > > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > > > > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
select problem
Hello, i have a select component associated with a property selectedProject the problem is after calling the action (with an onchange event), in the action i get the correct project id , but i lost the project label so , after the action call, it displays the wrong project (as i said but the project id is corect) here is the code in the jsp and the getter and the setter of the properties public Projet getSelectedProject() { return selectedProject; } public void setSelectedProject(Projet selectedProject) { this.selectedProject = selectedProject; } java.util.List projetList = new ArrayList(); public java.util.List getProjetList() { return projetList; } public void setProjetList(java.util.List projetList) { this.projetList = projetList; } Any one has an idea why? Thanks Regards Elyes.
addActionError will vanish Tree in JSP
Hi I am using other fileds with Tree when we do submit i am checking whether the field is empty or not if empty i add action error and redirect it to same jsp.in this case tree vanish. so i tried to declare a variable (Category treeRootNode) in action class(where i evaluate the field) with setter/getter and following lines treeRootNode=(Category)session.getAttribute("tree"); setTreeRootNode(treeRootNode); in JSP Please help to figure out how i can show Tree after adding error's to action when same jsp is rendered Thanks, Sajid -- View this message in context: http://www.nabble.com/addActionError-will-vanish-Tree-in-JSP-tp22452518p22452518.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Have a
Hi all, There is a requirement of having a http link as the label of Struts CheckBox, so the the user can either select the checkbox or click the label and go to a different page. Thanks, Ransika
Re: Have a
...and so I have to guess that your question is: How can I make a hyperlink be the label for a checkbox? Sometimes it helps to actually ask a question in your question. Anyway: Don't have the hyperlink actually be the label per se. Give the checkbox no label and just put the hyperlink next to the checkbox. jk On Wed, Mar 11, 2009 at 8:55 AM, Ransika de Silva wrote: > Hi all, > There is a requirement of having a http link as the label of Struts > CheckBox, so the the user can either select the checkbox or click the label > and go to a different page. > > Thanks, > Ransika > -- Jim Kiley Technical Consultant | Summa [p] 412.258.3346 [m] 412.445.1729 http://www.summa-tech.com
Re: Have a
Yes, your assumption is absolutely correct. Thanks for the reply but sadly that technique is not good enough for us, we want the label to be a hyperlink. Regards, On Wed, Mar 11, 2009 at 6:32 PM, Jim Kiley wrote: > ...and so I have to guess that your question is: How can I make a hyperlink > be the label for a checkbox? Sometimes it helps to actually ask a question > in your question. > Anyway: Don't have the hyperlink actually be the label per se. Give the > checkbox no label and just put the hyperlink next to the checkbox. > jk > > On Wed, Mar 11, 2009 at 8:55 AM, Ransika de Silva > wrote: > > > Hi all, > > There is a requirement of having a http link as the label of Struts > > CheckBox, so the the user can either select the checkbox or click the > label > > and go to a different page. > > > > Thanks, > > Ransika > > > > > > -- > Jim Kiley > Technical Consultant | Summa > [p] 412.258.3346 [m] 412.445.1729 > http://www.summa-tech.com > -- Ransika De Silva SCMAD 1.0, SCJP 1.4, BSc.(Hons) Information Systems
Re: Have a
Can you solve this problem with ? On Wed, Mar 11, 2009 at 9:07 AM, Ransika de Silva wrote: > Yes, your assumption is absolutely correct. > Thanks for the reply but sadly that technique is not good enough for us, we > want the label to be a hyperlink. > > Regards, > > On Wed, Mar 11, 2009 at 6:32 PM, Jim Kiley wrote: > > > ...and so I have to guess that your question is: How can I make a > hyperlink > > be the label for a checkbox? Sometimes it helps to actually ask a > question > > in your question. > > Anyway: Don't have the hyperlink actually be the label per se. Give the > > checkbox no label and just put the hyperlink next to the checkbox. > > jk > > > > On Wed, Mar 11, 2009 at 8:55 AM, Ransika de Silva > > wrote: > > > > > Hi all, > > > There is a requirement of having a http link as the label of Struts > > > CheckBox, so the the user can either select the checkbox or click the > > label > > > and go to a different page. > > > > > > Thanks, > > > Ransika > > > > > > > > > > > -- > > Jim Kiley > > Technical Consultant | Summa > > [p] 412.258.3346 [m] 412.445.1729 > > http://www.summa-tech.com > > > > > > -- > Ransika De Silva > SCMAD 1.0, SCJP 1.4, > BSc.(Hons) Information Systems > -- Jim Kiley Senior Technical Consultant | Summa [p] 412.258.3346 http://www.summa-tech.com
RE: logic:iterate issue
Pawel, Thank you very much for responding. I tried the following and it worked. Thanks again, Joe -Original Message- From: Pawel Wielgus [mailto:poulw...@gmail.com] Sent: Wednesday, March 11, 2009 6:46 AM To: Struts Users Mailing List Subject: Re: logic:iterate issue Hi Joe, You can try to output authorId, without property set on, maybe these objects are empty inside. Also, did You imported logic tags into jsp? Best greetings, Pawel Wielgus. 2009/3/10, Russo, Joe : > The following bean:write code outputs: > [com.cadmus.rpm.domain.custom.authorsc...@d08faa] > > I am using a (allAdditionalAuthors) ArrayList to store AuthorsCDTO. > Should I be using another collection type? > Not sure why this is not working and would really appreciate any help. > > > -Original Message- > From: Russo, Joe [mailto:rus...@cadmus.com] > Sent: Tuesday, March 10, 2009 2:28 PM > To: Struts Users Mailing List > Subject: logic:iterate issue > > > Sorry forgot to change subject. > > -Original Message- > From: Russo, Joe [mailto:rus...@cadmus.com] > Sent: Tuesday, March 10, 2009 2:25 PM > To: Struts Users Mailing List > Subject: RE: Convention Plugin and Action Chaining > > I defined the below code and would like to use the iterate functionality > witin the jsp. This code does not cause any error, but does not display > any data. Any ideas why? > > package com.cadmus.rpm.domain.custom; > > import java.io.Serializable; > import java.util.Date; > import java.util.ArrayList; > > > public class AuthorsCDTO implements Serializable { > private String addAuthorFirstName; > private String addAuthorLastName; > private String addAuthorMiddleInitial; > public String getAddAuthorFirstName() { > return addAuthorFirstName; > } > public void setAddAuthorFirstName(String addAuthorFirstName) { > this.addAuthorFirstName = addAuthorFirstName; > } > public String getAddAuthorLastName() { > return addAuthorLastName; > } > public void setAddAuthorLastName(String addAuthorLastName) { > this.addAuthorLastName = addAuthorLastName; > } > public String getAddAuthorMiddleInitial() { > return addAuthorMiddleInitial; > } > public void setAddAuthorMiddleInitial(String addAuthorMiddleInitial) { > this.addAuthorMiddleInitial = addAuthorMiddleInitial; > } > > > } > > private ArrayList allAdditionalAuthors; > public ArrayList getAllAdditionalAuthors() { > return allAdditionalAuthors; > } > public void setAllAdditionalAuthors(ArrayList allAdditionalAuthors) { > this.allAdditionalAuthors = allAdditionalAuthors; > } > > scope="session"> >property="allAdditionalAuthors" > type="com.cadmus.rpm.domain.custom.AuthorsCDTO" scope="session"> > > >property="addAuthorFirstName"/> > > >property="addAuthorMiddleInitial"/> > >property="addAuthorLastName"/> > > > > > > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > > > > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > > > > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: [S2] Famoso Double conversion problem in S2 2.0.11.1!
I think this may be caused by this bug : https://issues.apache.org/struts/browse/WW-3018 On Sat, Feb 28, 2009 at 9:25 PM, Milan Milanovic wrote: > > No solutions ? > > Could maybe this be a problem, in this code: > > ... > > > > ... > > > refValue1 is of type Double in my action class, and I have DoubleConverter > defined for its conversion, but my refValue is of simple type double, which > is read from the list in iterator. When I click to this link, conversion is > not invoked, why ? > > -- > Thx, M. > > > Milan Milanovic wrote: >> >> When generated in jsp, this link looks like this: >> >> <\a id="c_5442.00" showerror="true" targets="refValues" >> dojotype="struts:BindAnchor" href="#"> Set value " >> >> But when clicked nothing happes, it doesn't event came to conversion. >> (Note: I added \ before a because this forum show this code as a link >> only). >> >> -- >> M. >> >> >> Milan Milanovic wrote: >>> >>> Hi, >>> >>> I have again problem with Double conversion. I have a link in my page for >>> double values: >>> >>> >>> ... >>> >>> >>> >>> >>> >> targets="refValues">Set value >>> ... >>> >>> >>> In the form where refValue is entered I'm using my DoubleConverter >>> conversion, and I checked with Firebug, refValue is set good, e.g., >>> c_4550.0. But when I click to this link above, I get 45500.0. Famoso zero >>> is added!! >>> >>> Then I tried to define conversion properties for a class who have >>> refValue attribute to my custom DoubleConvereter, but in this case click >>> on the link "Set value" doesn't do anything! It is like a dead link. >>> I checked also with Firebug and it is e.g., c_4550. >>> >>> What is the problem here and how can I solve it ? >>> >>> -- >>> Regards, M. >>> >> >> > > -- > View this message in context: > http://www.nabble.com/-S2--Famoso-Double-conversion-problem-in-S2-2.0.11.1%21-tp22248310p22266388.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: [OT] Authorization and Authentication Question
HiThanks for the suggestion, this application which i need to do this is developed using Struts 1.2.6, can i add Spring Security to this, just as a drop in, is there any how to documents to add spring support to struts web application Ashish On Tue, Mar 10, 2009 at 7:43 PM, Jim Kiley wrote: > I'd agree. Have your UserDetailsService implementation hit LDAP for > authentication, and pass GrantedAuthorities[] on to the returned object by > asking DB2 about that info if the user is authenticated. > jk > > On Tue, Mar 10, 2009 at 6:44 PM, Wes Wannemacher wrote: > > > On Tuesday 10 March 2009 17:56:30 Ashish Kulkarni wrote: > > > HiIs it possible to Authenticate user using LDAP, but authorize using a > > DB2 > > > database, > > > I have situation where i need to authenticate and authorize some web > > pages. > > > > > > I want to authenticate users against LDAP, but have to maintain > > > authorization list, roles etc in DB2 database > > > > > > Has anyone done anything like this before, i am using Weblogic and > tomcat > > > application servers > > > > > > > I would suggest using Spring Security. I think what you'll need to do is > > create a bean that implements the > > org.springframework.security.userdetails.UserDetailsService interface, > then > > wire it into your configuration. > > > > -- > > > > Wes Wannemacher > > Author - Struts 2 In Practice > > Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more > > http://www.manning.com/wannemacher > > > > > > - > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > > For additional commands, e-mail: user-h...@struts.apache.org > > > > > > > -- > Jim Kiley > Technical Consultant | Summa > [p] 412.258.3346 [m] 412.445.1729 > http://www.summa-tech.com >
Re: [OT] Authorization and Authentication Question
Spring Security is it's own filter, and my experience is that it is pretty easy to integrate with just about any type of web-app. As far as existing tutorials, I'd say to check google. -Wes On Wed, Mar 11, 2009 at 9:52 AM, Ashish Kulkarni wrote: > HiThanks for the suggestion, this application which i need to do this is > developed using Struts 1.2.6, can i add Spring Security to this, just as a > drop in, is there any how to documents to add spring support to struts web > application > > Ashish > > On Tue, Mar 10, 2009 at 7:43 PM, Jim Kiley wrote: > -- Wes Wannemacher Author - Struts 2 In Practice Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more http://www.manning.com/wannemacher - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
springOpenEntityManagerInViewFilter (with Hibernate)
Hi, do you know how this filter manage the rollback when a db error occurres? Is it simple to add an struts 2 error message? Right now, I'm using a struts 2 interceptor, and I can manage the error message. (If you are interesting by my code...just ask) And I wonder if it's better to use the spring filter thanks fr/ -- View this message in context: http://www.nabble.com/springOpenEntityManagerInViewFilter-%28with-Hibernate%29-tp22455668p22455668.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: [OT] Authorization and Authentication Question
I got it working in less than a day using the docs. The "petshop" tutorial page got me going. -Original Message- From: Ashish Kulkarni [mailto:ashish.kulkarn...@gmail.com] Sent: Wednesday, March 11, 2009 9:53 AM To: Struts Users Mailing List Subject: Re: [OT] Authorization and Authentication Question HiThanks for the suggestion, this application which i need to do this is developed using Struts 1.2.6, can i add Spring Security to this, just as a drop in, is there any how to documents to add spring support to struts web application Ashish On Tue, Mar 10, 2009 at 7:43 PM, Jim Kiley wrote: > I'd agree. Have your UserDetailsService implementation hit LDAP for > authentication, and pass GrantedAuthorities[] on to the returned object by > asking DB2 about that info if the user is authenticated. > jk > > On Tue, Mar 10, 2009 at 6:44 PM, Wes Wannemacher wrote: > > > On Tuesday 10 March 2009 17:56:30 Ashish Kulkarni wrote: > > > HiIs it possible to Authenticate user using LDAP, but authorize using a > > DB2 > > > database, > > > I have situation where i need to authenticate and authorize some web > > pages. > > > > > > I want to authenticate users against LDAP, but have to maintain > > > authorization list, roles etc in DB2 database > > > > > > Has anyone done anything like this before, i am using Weblogic and > tomcat > > > application servers > > > > > > > I would suggest using Spring Security. I think what you'll need to do is > > create a bean that implements the > > org.springframework.security.userdetails.UserDetailsService interface, > then > > wire it into your configuration. > > > > -- > > > > Wes Wannemacher > > Author - Struts 2 In Practice > > Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more > > http://www.manning.com/wannemacher > > > > > > - > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > > For additional commands, e-mail: user-h...@struts.apache.org > > > > > > > -- > Jim Kiley > Technical Consultant | Summa > [p] 412.258.3346 [m] 412.445.1729 > http://www.summa-tech.com > - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
s:radio and s:checkboxlist - how to customize listValue property.
When I use that 2 components in my form I need to set attributes listValue and listKey. That attributes as I understand require a field of a bean that is a member of collection represented by list attribute. Example: That means: 1) there will be one radiobutton for each element of collection getTypes(). 2) Each html radiobutton will have value = getId() and label = getName() . I want to compose label from several fields of my bean. So I can't write because that class doesn't have getSomeField() method. How can I do this ? -- View this message in context: http://www.nabble.com/s%3Aradio-and-s%3Acheckboxlist---how-to-customize-listValue-property.-tp22455829p22455829.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: s:radio and s:checkboxlist - how to customize listValue property.
The easiest (I'm not going to say "best") solution is to make a "fake" getter on your bean. Make a "getListLabel()" method that composes a String from the values that you want to display in the list label, and then set the listValue to be "listLabel". This is the way I've done this in the past and it works OK. It isn't ideal if you want to keep your model carefully isolated from your UI but my own designs are a little less pure than that. jk On Wed, Mar 11, 2009 at 10:05 AM, boraldo wrote: > > When I use that 2 components in my form I need to set attributes listValue > and listKey. > That attributes as I understand require a field of a bean that is a member > of collection represented by list attribute. > > Example: > > listKey="id" /> > > That means: > 1) there will be one radiobutton for each element of collection getTypes(). > 2) Each html radiobutton will have value = getId() and label = getName() . > > I want to compose label from several fields of my bean. So I can't write > > > > because that class doesn't have getSomeField() method. > > How can I do this ? > -- > View this message in context: > http://www.nabble.com/s%3Aradio-and-s%3Acheckboxlist---how-to-customize-listValue-property.-tp22455829p22455829.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > -- Jim Kiley Senior Technical Consultant | Summa [p] 412.258.3346 http://www.summa-tech.com
Re: Mapping FreeMarker results in struts-rest-plugin
Thanks Bill - my action class is actually called SubdivisionController. Interesting you're getting responses for ftl requests. These URI's resolve for me: http://localhost:8080/lotmap/subdivision/id1 http://localhost:8080/lotmap/subdivision/id1.xml and these fail with a 404 http://localhost:8080/lotmap/subdivision/id1.jsp (can't find local file - see below) http://localhost:8080/lotmap/subdivision/id1.ftl(nothing logged at all) and these are what I think should be the relevant templates WEB-INF/content/subdivision-show.jsp WEB-INF/content/subdivision-show.ftl The URI with no extension is resolved via a forward from ServletDispatcherResult. It is the only one of this group that is handled this way though. Of note, for the cases that succeed, the action method appears to be unknown in the ActionInvocation: DEBUG [btpool0-2] RestWorkflowInterceptor.debug(57) | Skipping Interceptor... Method [show] found in exclude list. DEBUG [btpool0-2] RestActionInvocation.debug(57) | Executing action method = null which I think means that a registered UnknownHandler should process this Result, based on the RestActionInvocation class's invokeAction() method. And the only UnknownHandler candidate I see is Convention's, and it seems to give up on unknown methods. So I don't think I found the right handler. It's a bit confusing that with no extension the result is processed, and with a .jsp extension, this error is logged: 2009-03-11 07:11:51.703::WARN: PWC6117: File "D:\projects\lotmap-restful-ep\src\main\webapp\subdivision\F11.jsp" not found And for the .ftl extension there is nothing logged at all. Musachy - thanks for the reminder, in haste I had blurred the distinction. It appears that the Rest plugin's strategy for result handling defers to Convention or struts core definitions, but this appears to be working only for the rest-plugin's default extension "" (or "xhtml" to be more correct). The rest plugin does properly handle different ContentTypes based on extension via its Interceptor, which is much different than the Action mechanism's use of extension to map result type. I think my URL's above and their content templates are accurate. I have also tried some nonsensical templates (for a rest-plugin action) like WEB-INF/content/subdivision-success.ftl WEB-INF/content/subdivision.ftl I wonder if something else is required to invoke the FreemarkerTemplateEngine for the ftl extension. The rest plugin seems to squash this somehow. What am I missing...? Bill Stilwell wrote: > > I'm not sure if this applies, but I have found that with the rest > plugin and freemarker, I _have_ to have a Controller. It's not clear > to me from reading the docs if this is the intention with the rest > plugin, but that's how things are working for me. > > -b > > On Tue, Mar 10, 2009 at 1:56 PM, Musachy Barroso > wrote: >> xml and json are the output types (the response sent to the client). >> JSP and FreeMarker are the result types, which are mapped by >> Convention. Check the Convention documentation for details on how the >> templates are found (same rules apply for jsp(s) and ftl(s)) > > > -- > Bill Stilwell - http://www.marginalia.org/ > bill.stilw...@gmail.com > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > > -- View this message in context: http://www.nabble.com/Mapping-FreeMarker-results-in-struts-rest-plugin-tp22443339p22456790.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: [OT] Authorization and Authentication Question
HiThanks for the help, i will check and get back to this mail with the results On Wed, Mar 11, 2009 at 10:11 AM, Security Management < list-subscripti...@secmgmt.com> wrote: > I got it working in less than a day using the docs. The "petshop" tutorial > page got me going. > > -Original Message- > From: Ashish Kulkarni [mailto:ashish.kulkarn...@gmail.com] > Sent: Wednesday, March 11, 2009 9:53 AM > To: Struts Users Mailing List > Subject: Re: [OT] Authorization and Authentication Question > > HiThanks for the suggestion, this application which i need to do this is > developed using Struts 1.2.6, can i add Spring Security to this, just as a > drop in, is there any how to documents to add spring support to struts web > application > > Ashish > > On Tue, Mar 10, 2009 at 7:43 PM, Jim Kiley wrote: > > > I'd agree. Have your UserDetailsService implementation hit LDAP for > > authentication, and pass GrantedAuthorities[] on to the returned object > by > > asking DB2 about that info if the user is authenticated. > > jk > > > > On Tue, Mar 10, 2009 at 6:44 PM, Wes Wannemacher > wrote: > > > > > On Tuesday 10 March 2009 17:56:30 Ashish Kulkarni wrote: > > > > HiIs it possible to Authenticate user using LDAP, but authorize using > a > > > DB2 > > > > database, > > > > I have situation where i need to authenticate and authorize some web > > > pages. > > > > > > > > I want to authenticate users against LDAP, but have to maintain > > > > authorization list, roles etc in DB2 database > > > > > > > > Has anyone done anything like this before, i am using Weblogic and > > tomcat > > > > application servers > > > > > > > > > > I would suggest using Spring Security. I think what you'll need to do > is > > > create a bean that implements the > > > org.springframework.security.userdetails.UserDetailsService interface, > > then > > > wire it into your configuration. > > > > > > -- > > > > > > Wes Wannemacher > > > Author - Struts 2 In Practice > > > Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more > > > http://www.manning.com/wannemacher > > > > > > > > > - > > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > > > For additional commands, e-mail: user-h...@struts.apache.org > > > > > > > > > > > > -- > > Jim Kiley > > Technical Consultant | Summa > > [p] 412.258.3346 [m] 412.445.1729 > > http://www.summa-tech.com > > > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > >
one action with two buttons
good evening, in my project i've to create a form with two buttons wich make two different process: i try this method: SOME table here or some fields Cancel but it doesn't work. Can someone help me? -- View this message in context: http://www.nabble.com/one-action-with-two-buttons-tp22456812p22456812.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: s:radio and s:checkboxlist - how to customize listValue property.
>> It isn't ideal if you want to keep your model carefully isolated from your UI Unfortunately it is the case, so I need another solution. Jim Kiley wrote: > > The easiest (I'm not going to say "best") solution is to make a "fake" > getter on your bean. Make a "getListLabel()" method that composes a > String > from the values that you want to display in the list label, and then set > the > listValue to be "listLabel". This is the way I've done this in the past > and > it works OK. It isn't ideal if you want to keep your model carefully > isolated from your UI but my own designs are a little less pure than that. > jk > > On Wed, Mar 11, 2009 at 10:05 AM, boraldo wrote: > >> >> When I use that 2 components in my form I need to set attributes >> listValue >> and listKey. >> That attributes as I understand require a field of a bean that is a >> member >> of collection represented by list attribute. >> >> Example: >> >>> listKey="id" /> >> >> That means: >> 1) there will be one radiobutton for each element of collection >> getTypes(). >> 2) Each html radiobutton will have value = getId() and label = getName() >> . >> >> I want to compose label from several fields of my bean. So I can't write >> >> >> >> because that class doesn't have getSomeField() method. >> >> How can I do this ? >> -- >> View this message in context: >> http://www.nabble.com/s%3Aradio-and-s%3Acheckboxlist---how-to-customize-listValue-property.-tp22455829p22455829.html >> Sent from the Struts - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >> For additional commands, e-mail: user-h...@struts.apache.org >> >> > > > -- > Jim Kiley > Senior Technical Consultant | Summa > [p] 412.258.3346 > http://www.summa-tech.com > > -- View this message in context: http://www.nabble.com/s%3Aradio-and-s%3Acheckboxlist---how-to-customize-listValue-property.-tp22455829p22458070.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Struts 2 and GWT in Hosted Mode?
Am i right in saying that if you use struts 2 as the server backend of gwt, you can't use the hosted mode browser!? The hosted mode browser seems only capable of launching gwt modules not normal webapps. I'm i right? Regards, Stephan -- View this message in context: http://www.nabble.com/Struts-2-and-GWT-in-Hosted-Mode--tp22458264p22458264.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: one action with two buttons
Did you try the following sample. It works for me http://struts.apache.org/2.x/docs/multiple-submit-buttons.html Regards Aimé Kra -Original Message- From: PEGASUS84 [mailto:pegasu...@hotmail.it] Sent: Wednesday, March 11, 2009 10:52 AM To: user@struts.apache.org Subject: one action with two buttons good evening, in my project i've to create a form with two buttons wich make two different process: i try this method: SOME table here or some fields Cancel but it doesn't work. Can someone help me? -- View this message in context: http://www.nabble.com/one-action-with-two-buttons-tp22456812p22456812.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: disadvantage by not using the default execute() method for ActionClass?
Most of my action classes are CRUD style so they have multiple "execute" methods, doNew(), doCreate(), doEdit(), doUpdate(), etc. I prefix these methods with 'do' so they are easy to find and recognize (eclipse outline view sorts them alphabetically so the prefix keeps them together). Wick, Dan wrote: > > We're trying to decide as a team what conventions we are going to > follow. Does anyone know if there's anything we lose by not calling the > default "execute()" method in our actionsopting for specifying > another class name in the struts config xml? For example, > executeView() and executeDo() called on the way to the page and in the > post respectively.Thinking that this might be like returning > "success" by default, instead of an arbitrary namesome interceptors > automatically call success on return. Thoughts? > > --DW > > -- View this message in context: http://www.nabble.com/disadvantage-by-not-using-the-default-execute%28%29-method-for-ActionClass--tp22441449p22458400.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: How do my Actions get to Hibernate so they can persist my objects?
Wes Wannemacher wrote: > > Spring is not as hard as it appears. The Spring libraries are dauntingly > big, > but in reality, the core of spring is actually quite easy to understand, > you > just have to wrap your mind around Inversion of Control. It will come > naturally if you've used it before, but if Spring is your first venture, > bare > with it a bit, you'll be glad you did. > Hi Wes, I took your advice and read Spring in Action to get a handle on what is going on. Its pretty clear to me now how it can be the missing-link between Struts2 an Hibernate. I have to say I'm glad I took the time to get to grips with Spring - it seems pretty handy. Wes Wannemacher wrote: > > The piece you're missing here is that Spring services can easily be wired > into > your actions. If you have a bean named springBean defined in your > applicationContext.xml, then have the spring plugin installed in your > struts > app. Then, you have a setter on your action called > setSpringBean(SpringBeanInterface sbi), the plugin will see the setter and > give you a copy of the service. It's pretty slick and saves you quite a > bit of > time and exception handling. > The other part of this patch work is that the developers of Hibernate, Spring and Struts2 have accommodated each other by providing integration points. Struts2 says I'll let you use an object factory if you want. In steps Spring. Hibernate says you can use my Session Factory to make session objects. Spring covers this. What troubled me was in Spring I couldn't see how it used Hibernate - in the config it does not reference Hibernate classes - only its own Hibernate module - which in turn (I now know) relies on Hibernate being in the classpath. In the Struts2 examples I was looking for programmatic dependencies to make sense of the relationships ("where are the imports?"). DI via Spring makes it a configured and configurable (wiring) dependency. Thanks for helping me make sense of this. I'm new to DI and I started out wanting to use Struts2 - all the examples in books heavily rely on additional tools (Ant, Maven) and frameworks. Its getting the complete system configured that has taken so much time versus using Struts2. They all aim to get the whole system going on one step. From a learning point of view I don't care if I throw away code that is tightly coupled because I didn't follow a flexible design pattern. The code served a purpose - to help me learn so when I develop the next part/version I see the value in the more powerful tools (rather than use them because all the cool kids are). What I wanted from the books I read was for an outside-looking-in explanation of all the parts to the system. I had to get inside to understand it all. I think this is missing from all the blogs and tutorials out there. Cheers, P > > I read this guys post here > http://mail-archives.apache.org/mod_mbox/struts-user/200709.mbox/ So I’m > pretty certain I need to be using Spring. > > To me it seems like Spring is a pre-requisite for Java development. Maybe > I > need to be drinking the Spring Kool-Aid. The need to use Spring really increases proportional to the size of the project. It is definitely another layer of complexity, but it is worth it if you are building an application to scale up over time. At the same time, the more you use it, the more you'll find it helping you. The wiring of dependencies is just one piece, there are also quite a few other helpful advantages, AOP, transaction management, and mock objects to name a few. Again, this will seem like a setup for my book, but I am currently writing it with the intention to introduce people into modern development techniques like this. I take the approach that Struts is a common piece, but that most applications will have the need to utilize other libraries such as Spring, Guice, EJB or any number of other helper frameworks. -Wes -- Wes Wannemacher Author - Struts 2 In Practice Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more http://www.manning.com/wannemacher - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- View this message in context: http://www.nabble.com/How-do-my-Actions-get-to-Hibernate-so-they-can-persist-my-objects--tp22404876p22459292.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: one action with two buttons
PEGASUS84 wrote: > good evening, > in my project i've to create a form with two buttons wich make two different > process: > i try this method: > > SOME table here or some fields > > > > formId="configureform">Cancel > > > but it doesn't work. > > well, lacking a clear definition of what "it doesn't work" might mean, i can make the following suggestions: Initial contents [fields...] Configure note in particular the following: 1) the presence of a div to capture the result of the Configure action. 2) the use of the "action" attribute in the tag, rather than the "value" attribute. 3) the presence of the pound sign in the value of the "href" attribute of the tag 4) the presence of the 'theme="ajax"' attribute and value in the tag 5) the presence of the 'targets="targetdiv"' attribute and value in the tag - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: one action with two buttons
the assigned value to the submit button has to be unique as illustrated here http://struts.apache.org/2.x/docs/multiple-submit-buttons.html note the distinction of buttonName to compare to 'Submit' or 'Cancel' if ("Submit".equals(buttonName))HTH Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. > Date: Wed, 11 Mar 2009 07:51:48 -0700 > From: pegasu...@hotmail.it > To: user@struts.apache.org > Subject: one action with two buttons > > > good evening, > in my project i've to create a form with two buttons wich make two different > process: > i try this method: > > SOME table here or some fields > > > > formId="configureform">Cancel > > > but it doesn't work. > > Can someone help me? > -- > View this message in context: > http://www.nabble.com/one-action-with-two-buttons-tp22456812p22456812.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > _ Access your email online and on the go with Windows Live Hotmail. http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_HM_AE_Access_022009
Struts2 Standards, guidelines, recommendations
I am working to get Struts2 approved as a production technology. Can you point me to any standards or guidelines or implementation recommendations? Norris Shelton Software Engineer Sun Certified Java 1.1 Programmer Shelton Consulting, LLC ICQ# 26487421 AIM NorrisEShelton YIM norrisshelton
Re: [OT] Authorization and Authentication Question
HiI was able to configure LDAP to do authentication, but how do i use UserDetailsService, is there any example of how to use this and implement it in my project to get user and role from DB2 database On Wed, Mar 11, 2009 at 10:50 AM, Ashish Kulkarni < ashish.kulkarn...@gmail.com> wrote: > HiThanks for the help, i will check and get back to this mail with the > results > > > On Wed, Mar 11, 2009 at 10:11 AM, Security Management < > list-subscripti...@secmgmt.com> wrote: > >> I got it working in less than a day using the docs. The "petshop" >> tutorial >> page got me going. >> >> -Original Message- >> From: Ashish Kulkarni [mailto:ashish.kulkarn...@gmail.com] >> Sent: Wednesday, March 11, 2009 9:53 AM >> To: Struts Users Mailing List >> Subject: Re: [OT] Authorization and Authentication Question >> >> HiThanks for the suggestion, this application which i need to do this is >> developed using Struts 1.2.6, can i add Spring Security to this, just as a >> drop in, is there any how to documents to add spring support to struts web >> application >> >> Ashish >> >> On Tue, Mar 10, 2009 at 7:43 PM, Jim Kiley >> wrote: >> >> > I'd agree. Have your UserDetailsService implementation hit LDAP for >> > authentication, and pass GrantedAuthorities[] on to the returned object >> by >> > asking DB2 about that info if the user is authenticated. >> > jk >> > >> > On Tue, Mar 10, 2009 at 6:44 PM, Wes Wannemacher >> wrote: >> > >> > > On Tuesday 10 March 2009 17:56:30 Ashish Kulkarni wrote: >> > > > HiIs it possible to Authenticate user using LDAP, but authorize >> using >> a >> > > DB2 >> > > > database, >> > > > I have situation where i need to authenticate and authorize some web >> > > pages. >> > > > >> > > > I want to authenticate users against LDAP, but have to maintain >> > > > authorization list, roles etc in DB2 database >> > > > >> > > > Has anyone done anything like this before, i am using Weblogic and >> > tomcat >> > > > application servers >> > > > >> > > >> > > I would suggest using Spring Security. I think what you'll need to do >> is >> > > create a bean that implements the >> > > org.springframework.security.userdetails.UserDetailsService interface, >> > then >> > > wire it into your configuration. >> > > >> > > -- >> > > >> > > Wes Wannemacher >> > > Author - Struts 2 In Practice >> > > Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and >> more >> > > http://www.manning.com/wannemacher >> > > >> > > >> > > - >> > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >> > > For additional commands, e-mail: user-h...@struts.apache.org >> > > >> > > >> > >> > >> > -- >> > Jim Kiley >> > Technical Consultant | Summa >> > [p] 412.258.3346 [m] 412.445.1729 >> > http://www.summa-tech.com >> > >> >> >> - >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >> For additional commands, e-mail: user-h...@struts.apache.org >> >> >
Re: [OT] Authorization and Authentication Question
On Wed, Mar 11, 2009 at 3:23 PM, Ashish Kulkarni wrote: > HiI was able to configure LDAP to do authentication, but how do i use > UserDetailsService, > is there any example of how to use this and implement it in my project to > get user and role from DB2 database > > UserDetailsService is an interface... You have to write an implementation. In your implementation, you can bounce the username / password against LDAP, then pull roles for the user out of DB2. Since Spring Security is open source, check the source for their LDAP implementation to see how to authorize against LDAP. As far as DB2 goes, since it is a database, you'll have to decide how you're going to talk to it (JPA, Hibernate, JDBC, iBatis, raw socket), then google for some examples. As for wiring your implementation, check the Spring docs. Past that, you may start to get flamed, this no longer has anything to do with Struts. -Wes -- Wes Wannemacher Author - Struts 2 In Practice Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more http://www.manning.com/wannemacher - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: [OT] Authorization and Authentication Question
2009/3/11 Ashish Kulkarni : > HiI was able to configure LDAP to do authentication, but how do i use > UserDetailsService, > is there any example of how to use this and implement it in my project to > get user and role from DB2 database I did that like this, extended DefaultLdapAuthoritiesPopulator and overrided getAdditionalRoles() method, in such case you can mix roles from LDAP and from DB. In my case, access to applications was assigned by LDAP group, but exact roles in application was specified in DB public class LdapAuthoritiesPopulator extends DefaultLdapAuthoritiesPopulator { private UserService userSvc; public LdapAuthoritiesPopulator(InitialDirContextFactory initialDirContextFactory, String groupSearchBase) { super(initialDirContextFactory, groupSearchBase); } @Override protected Set getAdditionalRoles(LdapUserDetails ldapUser) { Set roles = new HashSet(); User user = userSvc.getUser(ldapUser.getUsername()); if(user != null) { for (Role role : user.getRoles()) roles.add(new GrantedAuthorityImpl(role.getName())); } return roles; } public void setUserSvc(UserService userSvc) { this.userSvc = userSvc; } } applicationContext.xml (I've been using Acegi, but it should be the same for Spring Security) OU=Company,OU=Access Control Groups,OU=Data true true member={0} cn Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
this is driving me nucking futs!
okay, can anyone (musachy, david, martin, i'm looking in your direction!) tell me how to do what i'm trying to do, here? i've got a list of items i'm iterating over. for each item, i want to have one or more links to actions, with parameterization from the item's data. this means, using a unique value for each tag's id attribute. the trouble comes in trying to reference the unique id value in my tag. a trivial example will demonstrate my quandary more clearly: <%-- done to make actual code a little cleaner to read; this example doesn't really need it --%> <%-- the following correctly puts "link-1", "link-2", etc, into the stack context --%> <%-- purely for the example --%> Link # how can i get the proper "#link-" into that href field in my JSP, to be dereferenced by struts (in the resulting html sent to the browser) into the actual URL assembled specifically for that item? i've tried dozens of syntactical constructions, none of which worked. the closest i ever got was to see URLs that looked like "http://my.com/linkAction.do?link-2";... just couldn't get that "link-2" string to be properly parsed by struts as an "argument" to the "#"... i've tried various combinations with and , but ultimately, i come down to needing something like "%{#( ...%{#...})}" ...and that definitely doesn't fly! any thoughts on how to accomplish this? i can't believe i'm the first person to ever want to do something like this... - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Struts 1: Window resizing issue
When I resize the the IE explorer window, the JSP goes blank sometimes. Does anyone knows this issue? May be some blank call is going to action? -- View this message in context: http://www.nabble.com/Struts-1%3A-Window-resizing-issue-tp22463249p22463249.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: this is driving me nucking futs!
mitch gorman wrote: > okay, can anyone (musachy, david, martin, i'm looking in your > direction!) tell me how to do what i'm trying to do, here? > > i've got a list of items i'm iterating over. for each item, i want > to have one or more links to actions, with parameterization from the > item's data. this means, using a unique value for each tag's id > attribute. the trouble comes in trying to reference the unique id value > in my tag. > forgot to mention, v2.0.14. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: this is driving me nucking futs!
It seems like you are created a variable variable name... I am assuming that there is a reason why you are using and wanting to refer to the constructed URL by id, rather than just doing the following - ">blah In an iterator, rather than constructing a name and trying to use OGNL to unravel that name, I'd just construct the URL in a plain ol' tag. -Wes On Wed, Mar 11, 2009 at 4:21 PM, mitch gorman wrote: > mitch gorman wrote: >> okay, can anyone (musachy, david, martin, i'm looking in your >> direction!) tell me how to do what i'm trying to do, here? >> >> i've got a list of items i'm iterating over. for each item, i want >> to have one or more links to actions, with parameterization from the >> item's data. this means, using a unique value for each tag's id >> attribute. the trouble comes in trying to reference the unique id value >> in my tag. >> > > forgot to mention, v2.0.14. > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > -- Wes Wannemacher Author - Struts 2 In Practice Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more http://www.manning.com/wannemacher - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: this is driving me nucking futs!
Ok, first, you don't need to define variable for each url, you can just do somelink musachy On Wed, Mar 11, 2009 at 3:58 PM, mitch gorman wrote: > okay, can anyone (musachy, david, martin, i'm looking in your > direction!) tell me how to do what i'm trying to do, here? > > i've got a list of items i'm iterating over. for each item, i want > to have one or more links to actions, with parameterization from the > item's data. this means, using a unique value for each tag's id > attribute. the trouble comes in trying to reference the unique id value > in my tag. > > a trivial example will demonstrate my quandary more clearly: > > > <%-- done to make actual code a > little cleaner to read; this > example > doesn't really need it --%> > > <%-- the following correctly puts "link-1", "link-2", etc, into > the stack context --%> > > <%-- purely for > the example --%> > > > > Link # > > > > > how can i get the proper "#link-" into that href field > in my JSP, to be dereferenced by struts (in the resulting html sent to > the browser) into the actual URL assembled specifically for that item? > i've tried dozens of syntactical constructions, none of which worked. > the closest i ever got was to see URLs that looked like > "http://my.com/linkAction.do?link-2";... just couldn't get that "link-2" > string to be properly parsed by struts as an "argument" to the "#"... > i've tried various combinations with and , but > ultimately, i come down to needing something like "%{#( ...%{#...})}" > ...and that definitely doesn't fly! > > any thoughts on how to accomplish this? i can't believe i'm the > first person to ever want to do something like this... > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > -- "Hey you! Would you help me to carry the stone?" Pink Floyd - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
okay, this is driving me nuts
is there any syntactical construct that will allow me to do the following (in v2.0.14): click for count # i want unique URL references for each iteration over the list. the above is a dumbed-down version of what i typically want to do, which would be to have a form that applies to the data of that row, and have a set of action buttons to apply to that row, e.g., edit the item, add it to inventory, publish it, etc. i've tried a wide array of syntactical structures, but none of them seem to handle the double-dereference. the closest i've gotten was something that looked like "[current URL]/link-3" as the URL. i've tried using , ... nada. anyone know the secret arcane formula to use? (musachy, david, martin, i'm looking in your direction!) i've got the bucket of goat's blood standing by... TIA. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: this is driving me nucking futs!
Musachy Barroso wrote: > Ok, first, you don't need to define variable for each url, you can just do > > this was the very first thing i attempted... it was the logical first attempt. unfortunately, what i ended up with when i did that was a set of links to the last loop iteration's URL. now, granted, i hadn't been using struts very long at that point, so maybe i'd screwed something else up. i can certainly try this again... > inside the iterator, that will make your life easier. Assuming the > code was just an example, and you *really* need to create a bunch of > URLs and then use them, you can do it like this: > > > > > > > somelink >
Re: this is driving me nucking futs!
Wes Wannemacher wrote: > It seems like you are created a variable variable name... I am > assuming that there is a reason why you are using and wanting > to refer to the constructed URL by id, rather than just doing the > following - > > > >">blah > > In an iterator, rather than constructing a name and trying to use OGNL > to unravel that name, I'd just construct the URL in a plain ol' > tag. > readability. i think the above is tougher to maintain than using a reference to a tag, especially when you consider that that was a trivial example... there may be multiple params, and some of the values to be passed may, themselves, be somewhat convoluted. would it work? sure... i was just hoping for something a little more slick and concise. as musachy pointed out, it may be that i'm overcomplicating, and i'm going to test that out straight away... thanks! - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: this is driving me nucking futs!
On Wed, Mar 11, 2009 at 4:39 PM, mitch gorman wrote: > Musachy Barroso wrote: >> Ok, first, you don't need to define variable for each url, you can just do >> >> > > > this was the very first thing i attempted... it was the logical > first attempt. unfortunately, what i ended up with when i did that was > a set of links to the last loop iteration's URL. now, granted, i hadn't > been using struts very long at that point, so maybe i'd screwed > something else up. i can certainly try this again... This would probably happen if you were outside of the closing iterator tag. -- Wes Wannemacher Author - Struts 2 In Practice Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more http://www.manning.com/wannemacher - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: this is driving me nucking futs!
yeah, the for loop is just to illustrate the point. The #context thingie will work in any version. On Wed, Mar 11, 2009 at 4:39 PM, mitch gorman wrote: > Musachy Barroso wrote: >> Ok, first, you don't need to define variable for each url, you can just do >> >> > > > this was the very first thing i attempted... it was the logical > first attempt. unfortunately, what i ended up with when i did that was > a set of links to the last loop iteration's URL. now, granted, i hadn't > been using struts very long at that point, so maybe i'd screwed > something else up. i can certainly try this again... > >> inside the iterator, that will make your life easier. Assuming the >> code was just an example, and you *really* need to create a bunch of >> URLs and then use them, you can do it like this: >> >> >> >> >> >> >> somelink >> well, i can't do that exactly, since i'm using v2.0.14 (no "begin", > "end" attributes). however, > > "%{#context['link'+ #i]}" > > is intriguing. would such a construct work in v2.0.14? > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > -- "Hey you! Would you help me to carry the stone?" Pink Floyd - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: this is driving me nucking futs!
Wes Wannemacher wrote: > On Wed, Mar 11, 2009 at 4:39 PM, mitch gorman wrote: > >> Musachy Barroso wrote: >> >>> Ok, first, you don't need to define variable for each url, you can just do >>> >>> >> >> >>> >>this was the very first thing i attempted... it was the logical >> first attempt. unfortunately, what i ended up with when i did that was >> a set of links to the last loop iteration's URL. now, granted, i hadn't >> been using struts very long at that point, so maybe i'd screwed >> something else up. i can certainly try this again... >> > > This would probably happen if you were outside of the closing iterator tag. > yup. color me "embarrassed"... it just worked perfectly! clearly, i'd messed something else up when i tried it the first go-round. *sigh* thanks for your responses, wes! - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: this is driving me nucking futs!
On Wed, Mar 11, 2009 at 4:47 PM, mitch gorman wrote: > > thanks for your responses, wes! > No problem, next time, include me in your list of gurus and I'll be happy. -Wes -- Wes Wannemacher Author - Struts 2 In Practice Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more http://www.manning.com/wannemacher - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: one action with two buttons
it doesnt work mean that the action go to a jsp page but the data in the form there aren't in the jsp page -- View this message in context: http://www.nabble.com/one-action-with-two-buttons-tp22456812p22464237.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: this is driving me nucking futs!
Musachy Barroso wrote: > yeah, the for loop is just to illustrate the point. The #context > thingie will work in any version okay, well, as i just noted in my response to wes, i clearly must've boneheaded something else when i tried it the first time, because the simple, un-overthought approach,
Re: this is driving me nucking futs!
Wes Wannemacher wrote: > On Wed, Mar 11, 2009 at 4:47 PM, mitch gorman wrote: > >>thanks for your responses, wes! >> >> > > No problem, next time, include me in your list of gurus and I'll be happy lol! you got it! (i knew for sure i was probably inadvertently dissing at least a couple people here... my apologies to any *other* deserving souls!)
Re: okay, this is driving me nuts
doh... this one didn't show up in my business-gmail->thunderbird-filtered reader until just now. please ignore this thread... i re-asked the question in the "nucking futs" thread, and was quickly answered! - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: this is driving me nucking futs!
I guess one question I would ask is why doesn't have an action paramter and allow nested elements? That way there would be no need to create any variables. (*Chris*) On Wed, Mar 11, 2009 at 1:56 PM, mitch gorman wrote: > Wes Wannemacher wrote: > > On Wed, Mar 11, 2009 at 4:47 PM, mitch gorman > wrote: > > > >>thanks for your responses, wes! > >> > >> > > > > No problem, next time, include me in your list of gurus and I'll be happy > > lol! you got it! > >(i knew for sure i was probably inadvertently dissing at least a > couple people here... my apologies to any *other* deserving souls!) >
Re: Struts2 Standards, guidelines, recommendations
Norris Shelton wrote: I am working to get Struts2 approved as a production technology. Can you point me > to any standards or guidelines or implementation recommendations? What kind of standards? What kind of guidelines or implementation recommendations are you looking for? Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts 1: Window resizing issue
SanJ.SANJAY wrote: When I resize the the IE explorer window, the JSP goes blank sometimes. Does anyone knows this issue? May be some blank call is going to action? Unlikely. You can find out, you know, by snooping the wire via a proxy or IE tool. Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: this is driving me nucking futs!
That is something I have complained about for a long time, time to do something about it I guess. musachy On Wed, Mar 11, 2009 at 5:08 PM, Chris Pratt wrote: > I guess one question I would ask is why doesn't have an action > paramter and allow nested elements? That way there would be no > need to create any variables. > (*Chris*) > > On Wed, Mar 11, 2009 at 1:56 PM, mitch gorman wrote: > >> Wes Wannemacher wrote: >> > On Wed, Mar 11, 2009 at 4:47 PM, mitch gorman >> wrote: >> > >> >> thanks for your responses, wes! >> >> >> >> >> > >> > No problem, next time, include me in your list of gurus and I'll be happy >> >> lol! you got it! >> >> (i knew for sure i was probably inadvertently dissing at least a >> couple people here... my apologies to any *other* deserving souls!) >> > -- "Hey you! Would you help me to carry the stone?" Pink Floyd - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: one action with two buttons
PEGASUS84 wrote: > it doesnt work mean that the action go to a jsp page but the data in the form > there aren't in the jsp page > okay, i just took another look through my code, and it looks like i incorrectly constructed the example in my response. what i *should* have suggested you try was something along the lines of the following: " action="" > [ fields... ] that is a trimmed-down version of an actual working form in my current application, which refreshes the contents of a div with the id "targetDiv". (bear in mind, you're gonna need to include the (for v2.0.x) in your tag, for all this ajax hooey to work correctly...) (shouldn't have tried to wing it, should've just gone straight to my code for a working example in the first place. sorry 'bout that.) - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: this is driving me nucking futs!
Musachy Barroso wrote: > That is something I have complained about for a long time, time to do > something about it I guess. > I AM AN INSTRUMENT OF CHANGE!!! ;) - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: one action with two buttons
thanks but it doesn't take data from form yet -- View this message in context: http://www.nabble.com/one-action-with-two-buttons-tp22456812p22465024.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: this is driving me nucking futs!
Musachy, I would refer to you as "a cool dude" if you did that. jk On Wed, Mar 11, 2009 at 5:10 PM, Musachy Barroso wrote: > That is something I have complained about for a long time, time to do > something about it I guess. > > musachy > > On Wed, Mar 11, 2009 at 5:08 PM, Chris Pratt > wrote: > > I guess one question I would ask is why doesn't have an action > > paramter and allow nested elements? That way there would be no > > need to create any variables. > > (*Chris*) > > > > On Wed, Mar 11, 2009 at 1:56 PM, mitch gorman > wrote: > > > >> Wes Wannemacher wrote: > >> > On Wed, Mar 11, 2009 at 4:47 PM, mitch gorman > >> wrote: > >> > > >> >>thanks for your responses, wes! > >> >> > >> >> > >> > > >> > No problem, next time, include me in your list of gurus and I'll be > happy > >> > >> lol! you got it! > >> > >>(i knew for sure i was probably inadvertently dissing at least a > >> couple people here... my apologies to any *other* deserving souls!) > >> > > > > > > -- > "Hey you! Would you help me to carry the stone?" Pink Floyd > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > -- Jim Kiley Senior Technical Consultant | Summa [p] 412.258.3346 http://www.summa-tech.com
Re: this is driving me nucking futs!
my list of annoyances: 1. iterator tag no having "begin" and "end" 2. "a" not able to build a url 3. "validateAnnotatedMethodOnly" in "validation" interceptor should be "true" by default first one is down, I gotta tackle the other 2. musachy On Wed, Mar 11, 2009 at 5:32 PM, Jim Kiley wrote: > Musachy, I would refer to you as "a cool dude" if you did that. > jk > > On Wed, Mar 11, 2009 at 5:10 PM, Musachy Barroso wrote: > >> That is something I have complained about for a long time, time to do >> something about it I guess. >> >> musachy >> >> On Wed, Mar 11, 2009 at 5:08 PM, Chris Pratt >> wrote: >> > I guess one question I would ask is why doesn't have an action >> > paramter and allow nested elements? That way there would be no >> > need to create any variables. >> > (*Chris*) >> > >> > On Wed, Mar 11, 2009 at 1:56 PM, mitch gorman >> wrote: >> > >> >> Wes Wannemacher wrote: >> >> > On Wed, Mar 11, 2009 at 4:47 PM, mitch gorman >> >> wrote: >> >> > >> >> >> thanks for your responses, wes! >> >> >> >> >> >> >> >> > >> >> > No problem, next time, include me in your list of gurus and I'll be >> happy >> >> >> >> lol! you got it! >> >> >> >> (i knew for sure i was probably inadvertently dissing at least a >> >> couple people here... my apologies to any *other* deserving souls!) >> >> >> > >> >> >> >> -- >> "Hey you! Would you help me to carry the stone?" Pink Floyd >> >> - >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >> For additional commands, e-mail: user-h...@struts.apache.org >> >> > > > -- > Jim Kiley > Senior Technical Consultant | Summa > [p] 412.258.3346 > http://www.summa-tech.com > -- "Hey you! Would you help me to carry the stone?" Pink Floyd - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: struts2 and dojo
On Wednesday 11 March 2009 01:00:14 Mohan Radhakrishnan wrote: > newton.dave wrote: > > pascal.gehr...@freenet.de wrote: > >> So please don't say that dojo-support is deprecated. This is wrong. Dojo > >> just has moved!! > > > > Dojo is most certainly deprecated: deprecated means that support still > > exists, but may, or will, stop being supported at some point in the > > future. > > > > Dave > > Somehow I have missed that announcement. What does it actually mean ? Mostly it means that we are _not_ planning on re-writing to support Dojo X (where X > 0.4) > What are the implications of this for projects that have to be in > production for a long time ? If your app is in production, then I would assume that you've QE'd it sufficiently to make it there. There are no time-bombs that will cause your app to fail because you are using a deprecated feature. There are plenty of apps in the wild currently using Struts 1.2 (and we even hear of 1.1 periodically) > Are you supporting JQuery in the future ? Javascript and its frameworks tend to move at a different pace than the java world. One of the recurring themes in Java is backward compatibility. This means that sometimes things move slower, to make sure that all angles are considered. I've started and received significant contributions to a JQuery plugin. JQuery is a better fit for us than Dojo was because it is slim, well-tested, and seems to stay mostly API compatible. There are a few design decisions being made differently with this plugin. Mostly, rather than providing a complete abstraction from Javascript, the goal will be to provide some helpful tags, but expose as much as possible. Rather than trying to fit everything into the tags, we want users to embrace and know JQuery. > I know I should be expecting only voluntary support from a open-source > project. Will the developers who are still working on DOJO support in > Struts tags suddenly stop working ? Has the bug fixing stopped ? I can say that you won't be getting any new features. Also, if progress of the core library is hindered by supporting Dojo, it is likely we'll let the Dojo plugin go. If you have a significant interest in the Dojo tags, feel free to pull down the source and make changes or contributions. A significant part of deciding to deprecate the plugin is that the original developers find it difficult to support. More than one person has attempted to upgrade it to Dojo 1.x and we often find it requires a complete re-write. Rather than do that, we've decided to go with JQuery as it has become very popular and very easy to extend. -Wes -- Wes Wannemacher Author - Struts 2 In Practice Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more http://www.manning.com/wannemacher - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org