Result Annotations

2008-08-29 Thread rakeshxp
Hi, I am using Result annotations in the following manner ( static way ) @Results({ @Result(name = index, value = /jsp/en_US/help.jsp) }) How can I pass a dynamic value to the result annotation, so that I can achieve something like this @Results({ @Result(name = index, value =

Re: I need generic html table structure with theme ajax in struts 2

2008-08-29 Thread MyAshok
Hi Harper, Thanks for ur quick reply. Is there any other possibilities or any plugins to make this possible. Because, I dont want to make ajax theme obselete by extending it by my code. Applause for the solution, With Hope, Ashok. Laurie Harper wrote: MyAshok wrote: Hi all, Again

Re: Result Annotations

2008-08-29 Thread mujoko mujoko
Annotation Result is a part of of configuration (struts config) that read on start up and load on startup, I dont think you can use dinamic value on annotation. Mujoko On 8/29/08, rakeshxp [EMAIL PROTECTED] wrote: Hi, I am using Result annotations in the following manner ( static way )

[OT] Web app confirm changes

2008-08-29 Thread Pablo Vázquez Blázquez
Hi! I have a question nothing to do with struts2, but with web apps design and I would be gratefull if you could help me with this problem: Well, in my app there are some forms. Imagine you click an item to edit its configuration. Then, the edition form appears. Then, you change some value

ServletActionRedirectResult and request params

2008-08-29 Thread Lukasz Lenart
Hi, I'm trying to pass request params to an action when redirecting, but I'm getting OgnlException with messages: 1. org.apache.struts2.dispatcher.ServletActionRedirectResult.employeeId 2. Caught OgnlException while setting property 'employeeId' on type

RE: Re: Ampersand sign problem

2008-08-29 Thread Nayyer Kamran
Hello, Thanks for your answer. You are right that's what happening. On submission input text sterling sign £ escaped to the ISO-8859-1 #163; and when try to display it again in the same html:text box it escape it again. So how can I avoid it what should I do. UTF8 work fine but it put some

Re: Result Annotations

2008-08-29 Thread Dave Newton
--- On Fri, 8/29/08, rakeshxp wrote: I am using Result annotations in the following manner (static way ) @Results({ @Result(name = index, value = /jsp/en_US/help.jsp) }) How can I pass a dynamic value to the result annotation, so that I can achieve something like this @Results({

Re: Result Annotations

2008-08-29 Thread Dave Newton
--- On Fri, 8/29/08, mujoko mujoko wrote: Annotation Result is a part of of configuration (struts config) that read on start up and load on startup, I dont think you can use dinamic value on annotation. XML configuration files are also loaded on startup. The basic result configuration page

Re: [OT] Web app confirm changes

2008-08-29 Thread Dave Newton
--- On Fri, 8/29/08, Pablo Vázquez Blázquez wrote: I could do it with a global javascript variable sthChanged, but I would have to modify *each* input element to add it an onchange event to set sthChanged=true when changes. One-liner of JavaScript to add an onchange handler to all input

Re: ServletActionRedirectResult and request params

2008-08-29 Thread Dave Newton
--- On Fri, 8/29/08, Lukasz Lenart wrote: I'm trying to pass request params to an action when redirecting, but I'm getting OgnlException with messages: 1. org.apache.struts2.dispatcher.ServletActionRedirectResult.employeeId 2. Caught OgnlException while setting property 'employeeId'

Re: Result Annotations

2008-08-29 Thread rakeshxp
Awesome. This worked! Thanks! newton.dave wrote: --- On Fri, 8/29/08, rakeshxp wrote: I am using Result annotations in the following manner (static way ) @Results({ @Result(name = index, value = /jsp/en_US/help.jsp) }) How can I pass a dynamic value to the result annotation, so

RE: Ampersand sign problem

2008-08-29 Thread Nayyer Kamran
Hello, Thanks for your information I think the struts.properties file is Struts2 feature. Is there any other way to set this property in sturts. Regards, s From: Gareth Davies [mailto:[EMAIL PROTECTED] Sent: Friday, August 29, 2008 12:52 PM To:

uploadInterceptor - maximumSize ignored!?

2008-08-29 Thread Dario Novakovic
Hello, I created a file upload action and I need to uplaod big files action name=upload class=action.UploadAction method=doUpload interceptor-ref name=fileUpload104857600/interceptor-ref interceptor-ref name=basicStack/ result name=input/input.jsp/result

RE: Ampersand sign problem

2008-08-29 Thread Martin Gainty
hi gareth- you can config as an entry in struts.xml http://struts.apache.org/2.x/docs/configuration-files.html e.g. constant name=struts.devMode value=false / is this what you're looking for? Martin __ Disclaimer and confidentiality note

Re: uploadInterceptor - maximumSize ignored!?

2008-08-29 Thread Dave Newton
Many app servers also have a file upload size limit. For example, IIRC Tomcat has a 2M limit by default. [1] may also assist. Dave [1] http://struts.apache.org/2.x/docs/file-upload.html --- On Fri, 8/29/08, Dario Novakovic [EMAIL PROTECTED] wrote: From: Dario Novakovic [EMAIL PROTECTED]

Re: There is no Action mapped for namespace / and action name ...

2008-08-29 Thread Stephan Schröder
having the same problem: i use Struts2.0.11.2. and tomcat 6.0.16. On my Windows desktop everything works fine. I exported the project as war and imported it on my Linux laptop (so i can work a little bit in my hollidays). But on the Linux laptop i only get a There is no Action mapped for action

[S2] Problem with list of submit buttons

2008-08-29 Thread Ylva Degerfeldt
Hi everyone, I have a List of POJOs that I've created, and for every POJO in the list I'm displaying some UI components corresponding to the properties of the POJO (textfields and select fields et.c.). I also have some submit buttons that belong to each row (and indirectly to each POJO), like

Re: [S2] Problem with list of submit buttons

2008-08-29 Thread James Neff
Ylva Degerfeldt wrote: Hi everyone, ... Maybe I could use the onclick attribute of s:submit but I don't know the syntax for sending a value to the Action there. (Isn't that javascript?) Can somebody please help me with this? Thanks in advance! /Ylva Are you asking on how to get

Re: [S2] Problem with list of submit buttons

2008-08-29 Thread Jim Kiley
If each of the buttons is a Submit button, and you have each row of the table wrapped in a separate form, you can put a s:hidden within each form, and store/provide the ID of the row within it. jk On Fri, Aug 29, 2008 at 11:22 AM, Ylva Degerfeldt [EMAIL PROTECTED] wrote: Hi everyone, I have

Re: [OT] Web app confirm changes

2008-08-29 Thread Miguel
To acomplish exactly what Dave recomended you, you may use jQuery. It has precisely the one-liner syntax to make the same change on lots of elements simultaneously. http://jquery.com Si quieres ser más positivo, pierde un electrón Miguel Ruiz Velasco S. On Fri, Aug 29, 2008 at 07:41, Dave

Re: [S2] Problem with list of submit buttons

2008-08-29 Thread Dave Newton
--- On Fri, 8/29/08, James Neff wrote: s:form id=myForm name=myForm action=OriginalAction theme=simple input type='button' onclick=myJavaScriptMethod(); value='button label here'/ /s:form In the head section: function myJavaScriptMethod() { document.myForm.action

Re: [S2] non intuitive OGNL value evaluation?

2008-08-29 Thread Gabriel Belingueres
I wonder if could be added a #param object to the ActionContext that represent a parameter but returns a String (to avoid those evaluation issues), after all, the programmer knows if he expect one or many values in their request parameters and can use either #param or #parameters as needed.

Re: [S2] Problem with list of submit buttons

2008-08-29 Thread Ylva Degerfeldt
Thanks all of you for your replies but I'm afraid they're not helping in this case. James, It's not about getting different buttons to do different actions. Like I said, I'm using e.g. method = Edit or method = Save for that. I just need some way to return the index of the object in the list

RE: [S2] Problem with list of submit buttons

2008-08-29 Thread Martin Gainty
did you get a chance to look at http://struts.apache.org/2.x/struts2-core/apidocs/org/apache/struts2/views/jsp/IteratorStatus.html kiittää Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the

Re: [S2] Problem with list of submit buttons

2008-08-29 Thread Dave Newton
--- On Fri, 8/29/08, Ylva Degerfeldt wrote: Dave, you seem to know a whole lot about Struts 2. Smoke and mirrors, smoke and mirrors... ask anybody. Submit elements are often a sticky wicket. The previous suggestion to use JavaScript might be the quickest, by using an onclick handler to set

Re: [S2] Problem with list of submit buttons

2008-08-29 Thread James Neff
Dave Newton wrote: --- On Fri, 8/29/08, James Neff wrote: s:form id=myForm name=myForm action=OriginalAction theme=simple input type='button' onclick=myJavaScriptMethod(); value='button label here'/ /s:form In the head section: function myJavaScriptMethod() {

Re: [S2] Problem with list of submit buttons

2008-08-29 Thread Dave Newton
--- On Fri, 8/29/08, James Neff wrote: Yesterday was about goats, and today it's about s:submit buttons. You'd be surprised how much I know about goats. Disturbed, but surprised. Dave - To unsubscribe, e-mail: [EMAIL

Re: Reading directory in JSP file (Struts 1.3)

2008-08-29 Thread nabbler12999
Thanks, I see. nabbler12999 wrote: Hello, I want to read a directory. But canRead() gives false. How can I do it? My code: [code] % String filename=; File dir = new File(files); String[] children = dir.list(); if (children == null) { System.out.println(ERROR\t can

Problem with creating default selection values in multiple select

2008-08-29 Thread Scott Lewis
Hi, I'm relatively new with Struts2, but I'm starting to get a handle on how things work. However, I'm having a problem with creating a default list of pre-selected values for an s:select tag when using the multiple=true option. It works fine when I use single selection, and when the

Re: Problem with creating default selection values in multiple select

2008-08-29 Thread Dave Newton
My guess is that the headerKey attribute is always evaluated as a string. Since you're using a ListInteger, even if the string representations are the same, it won't match (see [1]). That's probably worth an improvement JIRA if there isn't one in there already, although I haven't looked at it

Re: [S2] Problem with list of submit buttons

2008-08-29 Thread Ylva Degerfeldt
Thank you Dave! See below.. The previous suggestion to use JavaScript might be the quickest, by using an onclick handler to set the value of a hidden form element and have the action check that to see what element of the iterator to operate on. As mentioned on [1] using the button type can

Re: [OT] Web app confirm changes

2008-08-29 Thread Pablo Vázquez Blázquez
Thanks both for your replies. I am using Struts 2 and Dojo 0.4. I don't know jQuery, but I will take it a look. Do you recommend me jQuery better Dojo (if it is possible to do what I want using Dojo, of course...)? Miguel escribió: To acomplish exactly what Dave recomended you, you may use

Re: [S2] Problem with list of submit buttons

2008-08-29 Thread Dave Newton
--- On Fri, 8/29/08, Ylva Degerfeldt wrote: Basically, I need to know 3 things: 1. Does the code have to be in a JS method or can it be right under onclick? Doesn't matter, but since you have to both set the form field and submit the form it's likely to be cleaner to put it in a JavaScript

Re: [S2] Problem with list of submit buttons

2008-08-29 Thread Ylva Degerfeldt
Thanks again! About the value (Question 3) I just wasn't sure I could use OGNL when writing JavaScript but Ok. I get it. I also found this example: http://www.developertutorials.com/tutorials/javascript/change-form-field-values-050522/page1.html The only thing that's left to fix now (I think)

[OT] Re: [S2] Problem with list of submit buttons

2008-08-29 Thread Dave Newton
--- On Fri, 8/29/08, Ylva Degerfeldt wrote: About the value (Question 3) I just wasn't sure I could use OGNL when writing JavaScript but Ok. I get it. Just to be precise: you're not really using OGNL when writing JavaScript. You're embedding OGNL in the onclick attribute which, when evaluated,

problem in s:a tag xmlhttptransport error callback failed:[object Error]

2008-08-29 Thread MyAshok
Hi all, Pls help me asap. On click on the Url. s:a theme=ajax href=/viewdetail.action id =url1 showLoadingText=false targets=mainpageHai/s:a I got an error showing in debug mode xmlhttptransport error callback failed:[object Error] this same line is working in some other jsp. I think

Re: Problem with creating default selection values in multiple select

2008-08-29 Thread Scott Lewis
Thanks, that was definitely it; I checked by using a value I know is in the items list instead of -1, and it ended up as the default. I appreciate the help! Scott Dave Newton wrote: My guess is that the headerKey attribute is always evaluated as a string. Since you're using a ListInteger,

Re: problem in s:a tag xmlhttptransport error callback failed:[object Error]

2008-08-29 Thread MyAshok
hi, I got it, when i removed the indicator, it works cool. anyhow thanks for everybody who looks into it. With regards, ashok MyAshok wrote: Hi all, Pls help me asap. On click on the Url. s:a theme=ajax href=/viewdetail.action id =url1 showLoadingText=false

Re: REST Showcase 2.1.2

2008-08-29 Thread Musachy Barroso
Lifecycle is the same: up to you. There is no specific reason why it needs to be like that. (you know the struts style: many ways of doing the same thing) musachy On Fri, Aug 29, 2008 at 7:05 PM, stanlick [EMAIL PROTECTED] wrote: Is there a reason the lifecycle will not create the model

Re: REST Showcase 2.1.2

2008-08-29 Thread stanlick
So what do you suppose is the special missing sauce? I see Spring inject my service bean into the action but not the model! Very strange indeed. Public setter method, bean wiring by autodetect... really has me scratching my head. Also, what's with the ModelDriven refreshModelBeforeResult? I

Re: REST Showcase 2.1.2

2008-08-29 Thread Dave Newton
--- On Fri, 8/29/08, stanlick [EMAIL PROTECTED] wrote: Also, what's with the ModelDriven refreshModelBeforeResult? I haven't seen that one before! Don't see it in the http://struts.apache.org/2.x/docs/model-driven-interceptor.html guide Is this a guide/version deal? It hasn't been

Re: [S2] RestfulActionMappers and Namespace

2008-08-29 Thread alvins
I just tried it with latest struts and is still a problem - is there a Jira for this or maybe its been fixed and I am using it wrong? Alvin Kyle Adams wrote: Musachy Barroso wrote: Does it work with only zero conf? (no RestfulActionMapper) Yup. Works if I turn off

Re: REST Showcase 2.1.2

2008-08-29 Thread stanlick
So any ideas why the model is being created inside the action and not injected by the framework? private Order model = new Order(); newton.dave wrote: --- On Fri, 8/29/08, stanlick [EMAIL PROTECTED] wrote: Also, what's with the ModelDriven refreshModelBeforeResult? I haven't seen that

Re: REST Showcase 2.1.2

2008-08-29 Thread stanlick
Also, what is the naming convention for validation xml files using the Code Behind/REST plug-in? I've tried several combinations of naming, but none seem to work. -- View this message in context: http://www.nabble.com/REST-Showcase-2.1.2-tp19228759p19229925.html Sent from the Struts - User

Re: REST Showcase 2.1.2

2008-08-29 Thread Jeromy Evans
stanlick wrote: So any ideas why the model is being created inside the action and not injected by the framework? private Order model = new Order(); I think Don was just being lazy in the quick example ;-) I load or create the model in the appropriate prepare method. All that matters is

Re: [S2] RestfulActionMappers and Namespace

2008-08-29 Thread alvins
Sorry guys this has been fixed - just some notes on behavior which may help others (should maybe be added to wiki) - - If you want a blank namespace - do not use / as your namespace in your struts xml's or in namespace notation. Inconsistent behavior starts to occur. - If you want a specific

Struts+Portlet: processAction() get called, but not render()

2008-08-29 Thread wzx
Hi, I'm building a portlet with Jahia (Jetspeed), Struts. This portlet runs normally in one portal page, but in another portal page, I can only show the first page, when clicking on a link for showing a second page, the portlet shows nothing, so I get an empty box. The logs show that in this

Re: There is no Action mapped for namespace / and action name ...

2008-08-29 Thread simson
I had the same problem and the indication on the following link helped me: http://www.roseindia.net/tutorialhelp/comment/58280 regards, Simson Stephan Schröder wrote: having the same problem: i use Struts2.0.11.2. and tomcat 6.0.16. On my Windows desktop everything works fine. I exported

Re: [S2] RestfulActionMappers and Namespace

2008-08-29 Thread alvins
More notes - - If you are using tiles or even jsp (I think) and have the same name folder as a namespace your rest urls will not execute the action alvins wrote: Sorry guys this has been fixed - just some notes on behavior which may help others (should maybe be added to wiki) - - If you

Re: Extending EJBInjection interceptor

2008-08-29 Thread David N. Arnold
On Wed, Aug 27, 2008 at 3:46 AM, Alexander Baetz [EMAIL PROTECTED] wrote: Hi, i'm currently working on a new Interceptor for EJB Injection on Actions. I allready extendet it to work on fields and methods. But since i dont like to make my own Annotation type i wanted to use the javax.ejb.ejb

[S2] REST Plugin + Validation

2008-08-29 Thread alvins
Hi guys, I have been wrestling with the REST plugin for the last couple of days and have posted some notes in another thread. I have hit a problem which I need a little help with. Basically in my REST controller I have a create and update method as per the REST guidelines. I need separate