How to hide a link

2009-04-30 Thread taj uddin
Hi In my application there is a need to hide a link. I have used the tag to generate a link and the necessity is to hide this link. can any one pls help out in this regard

Problem with Spring plugin

2009-04-30 Thread yarongolan
Hi, I'm having some problems using Struts2 and the Spring plugin using Tomcat. I'm using Struts 2.1.6 (and its appropriate plugin) and Spring Framework 2.5.6.SEC1 (spring.jar). When I try to add the listener to web.xml like so: org.springframework.web.context.ContextLoaderListener

Re: @Transactional Spring Annotation in a Struts2 Action does not work

2009-04-30 Thread Jeroen De Ridder
I'll agree that a service layer alone won't cut it, simply because of the way JPA/Hibernate works. Updating an instance for example is just something that doesn't belong in a service. I'm by no means an expert of best practices in JPA/Hibernate and Spring, but I've found a combination of servic

Re: @Transactional Spring Annotation in a Struts2 Action does not work

2009-04-30 Thread Mauricio Aniche
Hi Jeroen, The problem is that I am not a big fan of services layer. Sometimes it looks very anemic to me. But I totally agree with you when you say the action should not know about persistence problems, and that's why I want to do it via AOP. I had the same thought about the problem: the Spring

Re: [s2] multiple submit buttons using action and method

2009-04-30 Thread Stephiems
/customerDataList.jsp /customerDataList.jsp /error.jsp MakePayment!input Then with the save() method in ListCustomerDataAction I return SUCCESS. With the pay() method I do some value checking..just to make sure some elements have been selected to pay and that the amount is greater then zero. I

Re: @Transactional Spring Annotation in a Struts2 Action does not work

2009-04-30 Thread Jeroen De Ridder
You really shouldn't be making your Struts 2 actions @Transactional. Doing that causes Spring to create a proxy so it can put some extra transaction-handling logic between the method call and the actual method. The thing is, Struts 2 and OGNL rely heavily on reflection on the action classes whi

Re: [s2] multiple submit buttons using action and method

2009-04-30 Thread Dave Newton
*and* configuration. Stephiems wrote: Oh, sorry, I was experimenting and changed the code: Here is what I have for the submits, all the rest is the same: method="save" cssClass="button"/> value="%{getText('button.label.paynow')}" action="ListCustomerData" method="pay" cssClass="button"/> Th

Re: [s2] multiple submit buttons using action and method

2009-04-30 Thread Stephiems
Oh, sorry, I was experimenting and changed the code: Here is what I have for the submits, all the rest is the same: Thanks newton.dave wrote: > > Stephiems wrote: >> Both submits go to the same action, just different methods, so I can't >> have >> different forms. I might have to change h

Re: [s2] multiple submit buttons using action and method

2009-04-30 Thread Dave Newton
Stephiems wrote: Both submits go to the same action, just different methods, so I can't have different forms. I might have to change how it works. I don't like it as it is, but that is what the client wanted, and as much as I tried to get them to chanage, in the end I have to do what they want.

RE: Any hint of JQuery on struts2 tutorial, thanks!

2009-04-30 Thread Andy
I agree with you 100%. For me, same goes for DWR. Andy > Date: Fri, 1 May 2009 11:11:02 +1000 > Subject: Re: Any hint of JQuery on struts2 tutorial, thanks! > From: zo...@sparecreative.com > To: user@struts.apache.org > > We¹ve been using jQuery in a Struts2 project without any real issues. W

Re: [s2] multiple submit buttons using action and method

2009-04-30 Thread Stephiems
Both submits go to the same action, just different methods, so I can't have different forms. I might have to change how it works. I don't like it as it is, but that is what the client wanted, and as much as I tried to get them to chanage, in the end I have to do what they want. Here is basically

Re: Any hint of JQuery on struts2 tutorial, thanks!

2009-04-30 Thread Zoran Avtarovski
We¹ve been using jQuery in a Struts2 project without any real issues. We¹re not using the plugin. If you¹ve got your head around struts and jQuery, I don¹t see what the problem is. Using jQuery with S2 is just like using jQuery anywhere. In fact it¹s quite liberating not to be limited by the prede

Re: @Transactional Spring Annotation in a Struts2 Action does not work

2009-04-30 Thread Mauricio Aniche
Yes, I am. Everything works fine when I don't try to use Spring transactional AOP! Mauricio On Thu, Apr 30, 2009 at 9:43 PM, Dave Newton wrote: > Mauricio Aniche wrote: > >> I am using Struts2+Spring+JPA/Hibernate. When I use the @Transactional to >> mark an execute() method in a Struts2 Action

Re: Submitting a Date to an Action

2009-04-30 Thread Zoran Avtarovski
That¹s exactly right but sometimes you want to use a format that isn¹t the short format for the locale and I suspect that¹s what is happening with Richard. He has two choices, either configure his date time picker to produce the date in the required format, or as suggested write your own converter

Re: OGNL & DisplayTag = inappropriate expressions

2009-04-30 Thread Andy Sykes
Ah, of course. I forgot about that. Thanks. Next time I'll remember to search the list first.. A. On 30 Apr 2009, at 21:10, Musachy Barroso wrote: The parameters interceptor has an attribute (excludeParams), that can take a list of regular expressions. Any param whose name matches on of the r

Re: @Transactional Spring Annotation in a Struts2 Action does not work

2009-04-30 Thread Dave Newton
Mauricio Aniche wrote: I am using Struts2+Spring+JPA/Hibernate. When I use the @Transactional to mark an execute() method in a Struts2 Action, the action stops working properly (i.e. the attributes in the action are not automatically setted). It does not work with Spring AOP transactions as well.

@Transactional Spring Annotation in a Struts2 Action does not work

2009-04-30 Thread Mauricio Aniche
Hi, I am using Struts2+Spring+JPA/Hibernate. When I use the @Transactional to mark an execute() method in a Struts2 Action, the action stops working properly (i.e. the attributes in the action are not automatically setted). It does not work with Spring AOP transactions as well. In my struts.confi

Re: What is wrong with my with OGNL Map expression??

2009-04-30 Thread Zoran Avtarovski
Just to reiterate what Dale said, we¹ve taken to using the %{} across the board as we were having problems with conflicts. In my experience this has slowed my hair loss significantly. Z. > > Michael Griffith wrote: >> > I have a Map in the HttpSession >> > The map is stored in the session as an

Re:Re: How to forward request in struts 2.1.6?

2009-04-30 Thread xnpeng
by the idea of Convention-plugin(CodeBehind-plugin)--"Zero Config",it provides: Action location by package naming conventions Result (JSP, FreeMarker, etc) location by naming conventions Class name to URL naming convention Package name to namespace convention SEO compliant URLs (i.e. my-action

Re: How to forward request in struts 2.1.6?

2009-04-30 Thread Dave Newton
xnpeng wrote: public class PublishController extends PublishAction implements Preparable { private static String message_url = "/post/message/"; private static String affair_url = "/post/affair/"; private static String business_url = "/post/business/"; private static String activi

Re: Struts 2: Redisplaying Invalid Form and Displaying Errors

2009-04-30 Thread Steven Hansen
Thanks Dave, Your suggestion fixed it! Best, Steven Dave Newton wrote: Steven Hansen wrote: The next problem, is that if I don't enter a value for the Age field (int), when the form is redisplayed the Age field has been populated with 0. If the Age field is left empty, I'd like the field

Re:Re: Re: How to forward request in struts 2.1.6?

2009-04-30 Thread xnpeng
so many thanks. forgive my poor english. there are some words in this document: http://struts.apache.org/2.1.6/docs/rest-plugin.html Also, notice we aren't returning the usual "success" result code in either method. This allows us to use the special features of the Codebehind Plugin to intui

Re: Re: How to forward request in struts 2.1.6?

2009-04-30 Thread Nils-Helge Garli Hegvik
I'm not sure I understand your problem. Maybe you can give an example? I would be surprised if you couldn't handle this with regular Struts 2 results. http://struts.apache.org/2.1.6/docs/result-types.html http://struts.apache.org/2.1.6/docs/result-configuration.html http://struts.apache.org/2.1.6/

Re: OGNL in HTML tags

2009-04-30 Thread Dave Newton
Dave Newton wrote: "> Minor addendum: IMO when iterating over a collection of model objects a status lookup like this would be a matter of querying the device, rather than providing a lookup based on the device ID. If device statuses need to be mapped to CSS classnames I'd pass the device

Re:Re: How to forward request in struts 2.1.6?

2009-04-30 Thread xnpeng
thanks for your reply. the result types cannot do my jobs in struts2+rest environment. in this environment, the "success","error",... did not work, only "index","show" ,... are the default result types. I can manage this. my situation is, I need to forward request to action conditionally,ie,de

Re: OGNL in HTML tags

2009-04-30 Thread Dave Newton
Jon Pearson wrote: I'm trying to colorize table rows in a JSP based on the result of a function call into the Action. Here's what I want to do: ... And have the function "String getStatus(long deviceID) { ... }" look up the status of a device and return a CSS class name (such as 'normal', 'wa

OGNL in HTML tags

2009-04-30 Thread Jon Pearson
I'm trying to colorize table rows in a JSP based on the result of a function call into the Action. Here's what I want to do: ... And have the function "String getStatus(long deviceID) { ... }" look up the status of a device and return a CSS class name (such as 'normal', 'warning', or 'error').

Re: OGNL & DisplayTag = inappropriate expressions

2009-04-30 Thread Musachy Barroso
The parameters interceptor has an attribute (excludeParams), that can take a list of regular expressions. Any param whose name matches on of the regex, will be ignored. We should make a FAQ out of this question. musachy On Thu, Apr 30, 2009 at 3:47 PM, Andy Sykes wrote: > Hi all, > > Is there a

Re: Struts 2: Redisplaying Invalid Form and Displaying Errors

2009-04-30 Thread Dave Newton
Steven Hansen wrote: The next problem, is that if I don't enter a value for the Age field (int), when the form is redisplayed the Age field has been populated with 0. If the Age field is left empty, I'd like the field to stay empty when the form is redisplayed. Use Integer, not int: the defa

OGNL & DisplayTag = inappropriate expressions

2009-04-30 Thread Andy Sykes
Hi all, Is there a way to prevent OGNL from analysing GET parameters as expressions? Reason for asking: DisplayTag generates URLs like this: action?d-49653-p=2 I'm getting tons of errors in the log, where it looks like OGNL is trying to evaluate this as: (d minus 49653 minus p). Naturally

Struts 2: Redisplaying Invalid Form and Displaying Errors

2009-04-30 Thread Steven Hansen
Hi, I'm new to Struts 2 and am still trying to figure out some of the basics. The first problem I'm having, is with an action that uses ModelDriven. The model that I'm using has 2 fields that are both required, one is a string and one is an int. I'm stuck on two things. The first is that

tag.

2009-04-30 Thread Edward Song
Thanks in advance for reading, I have a register.jsp page.  Here is a short snippet. <%-- other unrelated fields here --%>         The action is simply a method that sets a List of states and forwards it to a jsp to be rendered. The action mappings are not defined through the struts.xml,

Re: How to develop a Wireframe using Struts UI?

2009-04-30 Thread Jim Kiley
The members of this mailing lists are users and volunteers; they are not very likely to take a lot of their personal time to provide step-by-step instructions based on an image file. Specific questions are welcome but general queries like this are not liable to get the detailed response that you

Re: How to develop a Wireframe using Struts UI?

2009-04-30 Thread kunduruswaroop
Please see the UI drawing below and let me know the steps to follow to develop a wireframe. I need a expand and collapse version too as shown picture below. http://www.nabble.com/file/p23318872/Temp1.PNG Temp1.PNG Thanks in advance. Regards, Swaroop Kunduru -- View this message in cont

Re: How to develop a Wireframe using Struts UI?

2009-04-30 Thread Nils-Helge Garli Hegvik
Um Maybe start with http://struts.apache.org/2.1.6/docs/tutorials.html and read the docs for the various ui tags? Nils-H On Thu, Apr 30, 2009 at 5:30 PM, kunduruswaroop wrote: > > Please see the UI drawing below and let me know the steps to follow to > develop a wireframe. > http://www.nabbl

How to develop a Wireframe using Struts UI?

2009-04-30 Thread kunduruswaroop
Please see the UI drawing below and let me know the steps to follow to develop a wireframe. http://www.nabble.com/file/p23317576/Temp.PNG Temp.PNG Thanks in advance. Regards, Swaroop Kunduru -- View this message in context: http://www.nabble.com/How-to-develop-a-Wireframe-using-Struts-UI

Re: What is wrong with my with OGNL Map expression??

2009-04-30 Thread Musachy Barroso
http://struts.apache.org/2.x/docs/debugginginterceptor.html On Thu, Apr 30, 2009 at 10:48 AM, Musachy Barroso wrote: > if you have the debugging interceptor applied to your action, you can > add debug=console to the url, and you will get a console where you can > type OGNL expressions, and see th

Re: What is wrong with my with OGNL Map expression??

2009-04-30 Thread Musachy Barroso
if you have the debugging interceptor applied to your action, you can add debug=console to the url, and you will get a console where you can type OGNL expressions, and see the result. musachy On Thu, Apr 30, 2009 at 10:40 AM, Griffith, Michael * wrote: > Ding! Sorry I didn't see this reply earli

RE: [s2] multiple submit buttons using action and method

2009-04-30 Thread Kofford, C Todd
You may want to re-consider the design of having multiple submit buttons on the same page. This can be tricky for users that like to use the "enter" key instead of the mouse click, and make it hard for the user to figure out which submit button was executed. I won't even get into browser issues. T

RE: What is wrong with my with OGNL Map expression??

2009-04-30 Thread Griffith, Michael *
Ding! Sorry I didn't see this reply earlier when I repeated how do I get the map value. Again, thanks Dave! Is there such a thing as an OGNL expression validator? It would be nice to be able to fool around with the expression interactively until I am able to get to the correct expression. Cheers~

Re: Sending back HTML with Struts 2 while shutting down the server

2009-04-30 Thread Russell Neufeld
Thanks Dave. Worked like a charm. Dave Newton wrote: Russell Neufeld wrote: One of the struts actions I'm implementing shuts down the server. Hmm. Is there a special value I can return from a Struts 2 execute() > method, say null, which tells the framework not to send any

RE: What is wrong with my with OGNL Map expression??

2009-04-30 Thread Griffith, Michael *
Assuming the attribute in the session scope is a map, how would I get the value for the map entry called url? Would it be something like this: MG -Original Message- From: Kishan G. Chellap Paandy [mailto:kishanchellapaand...@spanservices.com] Sent: Thursday, April 30, 2009 7:14 AM To:

Re: [s2] Difficulty using Velocity with Struts 2 [SOLVED]

2009-04-30 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 All, On 4/30/2009 10:01 AM, Christopher Schultz wrote: > Seems pretty obvious, right? Velocity needs the > org.apache.log.format.Formatter class. Well, I don't have this class > anywhere in my (working) project, so I'm wondering what's going on? The >

Re: What is wrong with my with OGNL Map expression??

2009-04-30 Thread Dale Newfield
Michael Griffith wrote: > I have a Map in the HttpSession > The map is stored in the session as an attribute named > genieProperties... Kishan G. Chellap Paandy wrote: Assuming there's an attribute with name 'mySessionAttribute' in the Session scope Which gets you half way there. It gets yo

[s2] Difficulty using Velocity with Struts 2

2009-04-30 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 All, I'm trying to get a simple webapp up and running with Velocity. Here are the steps I've taken so far: 1. Obtained the current trunk source from svn (I'm attempting to submit a patch, which is why I'm going through svn instead of grabbing t

Re: What is wrong with my with OGNL Map expression??

2009-04-30 Thread Musachy Barroso
Actually the name is Unified Expression Language, JUEL is just an implementation of it. musachy On Thu, Apr 30, 2009 at 9:06 AM, Musachy Barroso wrote: > It could be a conflict with JUEL which uses "#", try the other > notation (I think you can disable JUEL somewhere): > > #...@java.util.linkedh

Re: What is wrong with my with OGNL Map expression??

2009-04-30 Thread Musachy Barroso
It could be a conflict with JUEL which uses "#", try the other notation (I think you can disable JUEL somewhere): #...@java.util.linkedhashmap@{ "foo" : "foo value", "bar" : "bar value" } musachy On Wed, Apr 29, 2009 at 3:33 PM, Griffith, Michael * wrote: > Hello all, > > It seems as if I am al

Re: [s2] multiple submit buttons using action and method

2009-04-30 Thread Dave Newton
Stephiems wrote: I'm having a problem with the action and method values on the s:submit tag. I have a form where I have two submits, Save and Pay Now. Save submits to the actions save() method and Pay Now submits to the actions pay() method. In the pay() method I have some of my own validation,

RE: Strange problem with WW_TRANS_I18N_LOCALE in session

2009-04-30 Thread Kishan G. Chellap Paandy
Hi Vinfer, For that action which is not working, make sure that you have the struts 2 built in interceptors and/or that action is session aware. May be this will point you in the right direction. Thank you. Regards, Kishan.G Senior Software Engineer. www.spansystems.com -Original Messa

RE: What is wrong with my with OGNL Map expression??

2009-04-30 Thread Kishan G. Chellap Paandy
Hi Griffith, Assuming there's an attribute with name 'mySessionAttribute' in the Session scope and you can access the same in you jsp as below: May be this will help. Thank you. Regards, Kishan.G Senior Software Engineer. www.spansystems.com -Original Message- From: Griffith, M

RE: Adding Text & Image to struts tag

2009-04-30 Thread Kishan G. Chellap Paandy
And also have a look at http://struts.apache.org/2.1.6/docs/submit.html Thank you. Regards, Kishan.G Senior Software Engineer. www.spansystems.com -Original Message- From: Kishan G. Chellap Paandy Sent: Thursday, April 30, 2009 5:33 PM To: 'Struts Users Mailing List' Subject: RE: A

RE: Adding Text & Image to struts tag

2009-04-30 Thread Kishan G. Chellap Paandy
Hi Sreenivas, For image use submit "type" as image and "src" (this image you will design with the text you want), if you want to use text use submit type as input or button. If you want to use both make use of submit tag's cssClass and type as input or button. May be this will help. Thank you.

RE: Submitting a Date to an Action

2009-04-30 Thread Kishan G. Chellap Paandy
Hi Richard, Have a look at http://struts.apache.org/2.1.6/docs/type-conversion.html It says that "dates - uses the SHORT format for the Locale associated with the current request" May be this will help. Thank you. Regards, Kishan.G Senior Software Engineer. www.spansystems.com -Orig

RE: [s2] multiple submit buttons using action and method

2009-04-30 Thread Kishan G. Chellap Paandy
Hi Stephiems, Are you using same action class for pay() and save()? If you are using different actions, then have you tried to associate each submit with a form/s:form? Do you have mentioned any action in your current form/s:form? Since you are not getting an error, it may because of the above pr

RE: Struts 2.1.6 - Alternative Template Engines - JSP

2009-04-30 Thread Kishan G. Chellap Paandy
If that is the case, I'm setting struts.ui.templateSuffix=jsp in struts.properties. And, in the struts 2 tags, take for example ComboBox, does it expects combobox.jsp to be present in the templateDir? (Since combobox is the name of the template for the combobox tag and JspTemplateEngine class r

Re: Submitting a Date to an Action

2009-04-30 Thread Richard Sayre
Thank you. I will give it a try. On Thu, Apr 30, 2009 at 1:22 AM, Matt Jiang wrote: > Hi > > It is nothing about date picker tag. You can have a Converter to convert > String to Date and vice versa. > Below is my implementation for your reference: > (For DateUtil, please replace with yours) > >

Re: Submitting a Date to an Action

2009-04-30 Thread Richard Sayre
Yes I can Get it to work with the S2 date picker, I just cant figure out what is telling it to convert the String to a date. 2009/4/30 Paweł Wielgus : > Hi all, > as far as i know, date has its converter inside struts2 distribution, > so one shoul do nothing to make it work. > > Best greetings, >

[s2] multiple submit buttons using action and method

2009-04-30 Thread Stephiems
I'm having a problem with the action and method values on the s:submit tag. I have a form where I have two submits, Save and Pay Now. Save submits to the actions save() method and Pay Now submits to the actions pay() method. In the pay() method I have some of my own validation, if it passes, I fo