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

2008-08-29 Thread Laurie Harper
Dave Newton wrote: x.NameOfForm.NameOfHiddenField.value = INPUTVAL The part that I called "x" is the part that I don't understand. Should it be the name of the JSP or what? Keep searching; this is DOM/JavaScript 101. Personally I'd use a JavaScript library, but it's not really necess

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

2008-08-29 Thread Laurie Harper
If you don't want to deal with customizing themes, you could switch to an existing theme that gives you the markup you want and use Dojo (or whatever Javascript framework you prefer) to implement the functionality provided by the 'ajax' theme yourself. But extending and customizing themes is pr

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

2008-08-29 Thread Nils-Helge Garli Hegvik
What does your JSP look like? Also, have you checked _all_ your server logs for errors? Check your server log directory and look through all the logs. Nils-H -- Forwarded message -- From: wzx <[EMAIL PROTECTED]> Date: Sat, Aug 30, 2008 at 5:39 AM Subject: Struts+Portlet: processA

[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 valida

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

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

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 expor

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 c

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 na

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 t

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 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

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 Restf

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 d

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 h

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 ob

REST Showcase 2.1.2

2008-08-29 Thread stanlick
Is there a reason the lifecycle will not create the model object Order on action instantiation? I notice it is being constructed during the Action initialization and without it, fails in the create method with a NPE. How much different is the lifecycle when using the REST plug-in? -- View this

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. > > showLoadingText="false" targets="mainpage">Hai > > > I got an error

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 List, even if

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. Hai 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 the current issue might be because of the line is placed inside s:iterator. This is just a

[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 evalu

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) is

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 JavaScrip

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 j

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" ty

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 List, 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 to see

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 tag when using the "multiple=true" option. It works fine when I use single selection, and when the "pre-selec

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.printl

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

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: action="OriginalAction" theme="simple"> value='button label here'/> In the section: function myJavaScriptMethod() { document.myForm.action = "/myProject/NewAction.action"; document.myForm.submit(); } And

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 th

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 offi

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] 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. 2008/8

Re: [S2] Problem with list of submit buttons

2008-08-29 Thread Dave Newton
--- On Fri, 8/29/08, James Neff wrote: > action="OriginalAction" theme="simple"> > value='button label here'/> > > > In the section: > function myJavaScriptMethod() { > document.myForm.action = "/myProject/NewAction.action"; > document.myForm.submit(); > } > > And t

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 Newto

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 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 a L

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 differ

[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 "Edi

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

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: 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. is this what you're looking for? Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments rel

uploadInterceptor - maximumSize ignored!?

2008-08-29 Thread Dario Novakovic
Hello, I created a file upload action and I need to uplaod big files 104857600 /input.jsp /upload.jsp but for some reason, i allways get message that the file is to big if it is bigger than 2MB. I did a bit of debugging and it showed that FileInterceptor#maxi

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:

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 res

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 > 'employ

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* 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 eleme

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: 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 > >

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" "£" 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 ot

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 'org.apache.struts2.dispatcher.Servle

[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 a

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

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, >> >>