Re: How to use pattern matching wild-card in action names?

2008-10-09 Thread Binil Thomas
To answer my own question - wildcards do not seem to work if the namespace is "/". I tried adding a namespace and it works. Can someone explain why this is so? {1} /index.jsp Thanks, Binil Binil Thomas wrote: > > Hi all, >

Re: Loading Action dynamically

2008-10-09 Thread Frans Thamura
> > Take a look on Convention Plugin [1] or Zero Configuration Plugin [2] > depends on which Struts2 version you are using > > [1] http://cwiki.apache.org/S2PLUGINS/convention-plugin.html > [2] http://struts.apache.org/2.0.11.2/docs/zero-configuration.html but i think the REST plugins need to be

move items between two listboxes and update DB ??

2008-10-09 Thread A. Lotfi
Hi, I want to create a jsp page that has users populated from a database, when I click in a user two listboxes appear: listAssignedRoles with assigned roles listNoAssignedRoles the rest of roles not assigned yet These two lists are populated from a the database. I want when I move items

Re: Struts2 Data Transfer

2008-10-09 Thread aum strut
thats true but the probelm is when i am trying to return my custom bean from the getModel() method.. and i am unable to find out the exact cause why it is occuring there On Thu, Oct 9, 2008 at 11:25 PM, Jim Kiley <[EMAIL PROTECTED]> wrote: > The error is complaining that you have no result defin

How to use pattern matching wild-card in action names?

2008-10-09 Thread Binil Thomas
Hi all, I am trying to make my URLs more readable, and was hoping that I could use pattern-matching wildcards in action declarations. I have not been able to get it working so far. In my struts.xml, I have: index.jsp Now, /widgets get routed

struts 2.1.2 form topic problem

2008-10-09 Thread Frank Maritato
Hi, The following worked fine in struts 2.0.11.2, but does not work in 2.1.2 and I'm wondering if there is a bug or a new way to do it. I have a form that upon submission needs to update two divs; each of which calls a specific action to get its information. Below is an example of what I'm tr

Re: struts users assign remove roles

2008-10-09 Thread A. Lotfi
I did not start it yet, struts version is 1.2.8 thanks Dave Newton <[EMAIL PROTECTED]> wrote: --- On Thu, 10/9/08, A. Lotfi wrote: > a list of users when you click in a user it show two > other lists : > Roles assigned > Roles notassigned > > so we can remove and assign roles to the curre

Re: struts users assign remove roles

2008-10-09 Thread Dave Newton
--- On Thu, 10/9/08, A. Lotfi wrote: > a list of users when you click in a user it show two > other lists : > Roles assigned > Roles notassigned > > so we can remove and assign roles to the current user You should probably mention which version of Struts you're using. How far have you got

struts users assign remove roles

2008-10-09 Thread A. Lotfi
Hi, I need to create a web application that has a jsp page showing : a list of users when you click in a user it show two other lists : Roles assigned Roles notassigned so we can remove and assign roles to the current user (clicked on) , Please any idea or a hint or an e

Re: Loading Action dynamically

2008-10-09 Thread Lukasz Lenart
2008/10/9 Frans Thamura <[EMAIL PROTECTED]>: > I want to make my actionsupport implementation automatically loaded by > container, so we dont have to register in struts.xml Take a look on Convention Plugin [1] or Zero Configuration Plugin [2] depends on which Struts2 version you are using [1] htt

Re: html tags in a struts label

2008-10-09 Thread Dave Newton
--- On Thu, 10/9/08, Allen Lee wrote: > Is there a way to embed HTML in the label attribute of a struts tag? I think you'd need to modify the template (controlheader-core.ftl, IIRC?) Dave - To unsubscribe, e-mail: [EMAIL PROTEC

html tags in a struts label

2008-10-09 Thread Allen Lee
Hey there, Is there a way to embed HTML in the label attribute of a struts tag? Right now it looks like it escapes everything and leaves everything there verbatim. I'd like to be able to embed hrefs and apply formatting to the labels in my struts forms (and get the benefit of the contextual vali

Re: Session problem unidentified

2008-10-09 Thread Dave Newton
--- On Thu, 10/9/08, MyAshok wrote: > 1) When user A logged in and add a new user x (which sets > the selectedUser (gettersettervariable) to Null). > 2) At the same time, user B logged in and edit a existing > user (which sets the selectedUser to some value). > 3) Now, the user A save the entries,

Loading Action dynamically

2008-10-09 Thread Frans Thamura
hi all I want to make my actionsupport implementation automatically loaded by container, so we dont have to register in struts.xml anyone know how to implement this -- -- Frans Thamura Meruvian One Stop Java and Enterprise OSS Provider Technopreneurship, Training, Internship, Outsourcing and

Session problem unidentified

2008-10-09 Thread MyAshok
Hi all, I got a critical problem. My Application Environment - Struts 2 Application, Spring injection for dao, Hiberanate3 Scenerio 1) When user A logged in and add a new user x (which sets the selectedUser (gettersettervariable) to Null). 2) At the same time, user B logged in and edit

Validation of field with dynamic name

2008-10-09 Thread Torsten Krah
Hi, validation is easy when you know how your field is named: http://struts.apache.org/2.x/docs/validation.html But how its done if you don't know it exactly. E.g. this one: You get something like: ruleSets[0].rules[0].points I tried http://www.opensymphony.com/xwork/wikidocs/Validation An

Global-exceptiion handler

2008-10-09 Thread stanlick
I have a global exception handler registered, which is itself an action mapping. I am trying to ascertain what happened by accessing ActionContext.getContext().getActionInvocation().getProxy() inside this action class, but the invocation has now moved on to that of the exception action! Is there

Re: Struts2 Data Transfer

2008-10-09 Thread Jim Kiley
The error is complaining that you have no result defined for the result named "input". That probably means that the Action is encountering a validation error or the like, causing it to return "input". On Thu, Oct 9, 2008 at 1:21 PM, aum strut <[EMAIL PROTECTED]> wrote: > Hi All, > > i tried to f

Re: ParametersInterceptor - How to save value taken from a Map or List with ParametersInterceptor

2008-10-09 Thread Torsten Krah
Am Donnerstag, 9. Oktober 2008 19:20:55 schrieb Adam Lister: > Whoa, I just noticed in the docs where you have pointed out, it says NOT > to use the [] syntax, but to used ().  I've always used the [] syntax, > I'm on struts 2.0.11.  Can anyone clear that up?  The bracket syntax has > always worked

Re: Struts2 Data Transfer

2008-10-09 Thread aum strut
Hi All, i tried to follow the the way suggested by Laurie i followed the below mentioned practice. 1) I have two beans which i want to fill at the same time when the user hit the registration button after filling the form. 2) in my action calss i am using the model driven approach to fill the tw

Re: ParametersInterceptor - How to save value taken from a Map or List with ParametersInterceptor

2008-10-09 Thread Adam Lister
Whoa, I just noticed in the docs where you have pointed out, it says NOT to use the [] syntax, but to used (). I've always used the [] syntax, I'm on struts 2.0.11. Can anyone clear that up? The bracket syntax has always worked fine for me. I've done stuff like this in the past:

Re: ParametersInterceptor - How to save value taken from a Map or List with ParametersInterceptor

2008-10-09 Thread Torsten Krah
Am Donnerstag, 9. Oktober 2008 18:46:45 schrieb Adam Lister: > I've also heard that there is a generics-based type converter that might > solve this assuming you properly annotate the lists? I'am using typed lists, so @Element should not be needed, shouldn't it? What causing me headaches is that i

Re: ParametersInterceptor - How to save value taken from a Map or List with ParametersInterceptor

2008-10-09 Thread Adam Lister
Though not suitable for all situations, I've solved this problem in the past by mapping type conversion to the bean rather than to the action. Check out: http://struts.apache.org/2.x/docs/type-conversion.html#TypeConversion-ApplyingaTypeConvertertoabeanormodel So in MyBean-conversion.properti

RE: Using POSIX Regular Expressions for Internationalized Validation

2008-10-09 Thread Jishnu Viswanath
Hi, Any way you want to unescape, something you escaped, I don't know but what ever you put in the text field is got from the getter public String getFieldName(){ //TODO: Decode/Unescape here return this.fieldName; } Regards, Jishnu Viswanath Software Engineer *(+9180)

Re: ParametersInterceptor - How to save value taken from a Map or List with ParametersInterceptor

2008-10-09 Thread Torsten Krah
Am Donnerstag, 9. Oktober 2008 18:17:57 schrieb Dave Newton: > Use Map/array notation in the field name. > > http://struts.apache.org/2.x/docs/type-conversion.html > > Dave Can this be stacked? My Action got a List of MyBean and in MyBean there is a List of MySecondBean from which the value is ta

Re: S2 2.1 OGNL Diffs?

2008-10-09 Thread Musachy Barroso
The default was set to true because of the security holes it creates. I am not sure if the property was always there and set to false, or if it was created recently (in 2.0 anyway). On Thu, Oct 9, 2008 at 12:17 PM, stanlick <[EMAIL PROTECTED]> wrote: > > Well no I don't sir! Was this property ch

RE: Struts 2 CRUD Question

2008-10-09 Thread Dave Newton
--- On Thu, 10/9/08, Gawain Hammond wrote: > Does struts create a new object for every submit? And under > what circumstance would it not? Actions are created per-request, thus action variables are as well. Options include retrieving a session object manually, using ScopedModelDriven, a conversa

Re: ParametersInterceptor - How to save value taken from a Map or List with ParametersInterceptor

2008-10-09 Thread Dave Newton
--- On Thu, 10/9/08, Torsten Krah wrote: > i wonder whats the best way to write back values taken from > a Map or List. Use Map/array notation in the field name. http://struts.apache.org/2.x/docs/type-conversion.html Dave - To

Re: S2 2.1 OGNL Diffs?

2008-10-09 Thread stanlick
Well no I don't sir! Was this property changed/added in 2.1? Is there a reason the default is false? Peace, Scott Musachy Barroso wrote: > > Do you have static method invocation enabled? > > On Thu, Oct 9, 2008 at 10:32 AM, stanlick <[EMAIL PROTECTED]> wrote: > >> >> Does anyone know why

RE: Struts 2 CRUD Question

2008-10-09 Thread Gawain Hammond
Bizzare, I'm having the exact opposite problem (my problem is the solution you want). Similar setup, and when I view the object's data in a form then submit it, struts uses the exact same object instance to then submit the form. So if I try to clear any fields (effectively null them), for a cleare

Re: Struts2 Data Transfer

2008-10-09 Thread aum strut
Thaks laurie this was exactly i was looking for... i will try this way and it seems to be a good way . Thanks for the help On Thu, Oct 9, 2008 at 1:32 PM, Laurie Harper <[EMAIL PROTECTED]> wrote: > You can't expose two different beans with one getModel() method, if that's > what you're asking.

ParametersInterceptor - How to save value taken from a Map or List with ParametersInterceptor

2008-10-09 Thread Torsten Krah
Hi, i wonder whats the best way to write back values taken from a Map or List. Lets take this for example: The textfield got some integer value (taken from an object which is a list which was found in a list). If i change it and want so save it, whats the be

RE: Iterate through a Map, OGNL Question about accessing a map with dynamic value [0]

2008-10-09 Thread Brad A Cupit
From: Torsten Krah [mailto:[EMAIL PROTECTED] Sent: Thursday, October 09, 2008 9:15 AM > Your example does work fine, but its not my usecase, isn't it? Oops, sorry about that. My mistake. I'm assuming the list is a List> and the map is Map, List> if so, try this: <%-- begin setup, for example o

Re: S2 2.1 OGNL Diffs?

2008-10-09 Thread Musachy Barroso
Do you have static method invocation enabled? On Thu, Oct 9, 2008 at 10:32 AM, stanlick <[EMAIL PROTECTED]> wrote: > > Does anyone know why this does not work in 2.1? It used to return the > action > name. > > name: value="@[EMAIL PROTECTED] > ().actionInvocation.proxy.actionName"/> > -- > View

Re: DefaultWorkflowInterceptor doesn't validate anymore!?

2008-10-09 Thread Musachy Barroso
The logic that was in the workflow interceptor was copy/pasted to the validation interceptor, I don't think the semantic changed. Take a look at: https://svn.opensymphony.com/svn/xwork/trunk/src/java/com/opensymphony/xwork2/validator/ValidationInterceptor.java musachy On Thu, Oct 9, 2008 at 10:5

Re: DefaultWorkflowInterceptor doesn't validate anymore!?

2008-10-09 Thread Stephan Schröder
>The validation one Ok, but this seems to have a different semantic compared to the old workflow-interceptor: * alwaysInvokeValidate - Defaults to true. If true validate() method will always * be invoked, otherwise it will not. * * programmatic - Defaults to true. If true and the action is V

S2 2.1 OGNL Diffs?

2008-10-09 Thread stanlick
Does anyone know why this does not work in 2.1? It used to return the action name. name: -- View this message in context: http://www.nabble.com/S2-2.1-OGNL-Diffs--tp19900205p19900205.html Sent from the Struts - User mailing list archive at Nabble.com. ---

Re: Upgrade from 2.0.11 to 2.1.2Beta with REST and zero configuration

2008-10-09 Thread Haulyn R. Jason
Dave Newton 写道: --- On Thu, 10/9/08, Haulyn R. Jason wrote: 1.I have many user-defined Interceptors, How can I set up them without configuration? How to change the default Inteceptors-stack? AFAIK you still need to do that in XML, but it's pretty minimal. Could be wrong, though. Dav

Re: Iterate through a Map, OGNL Question about accessing a map with dynamic value [0]

2008-10-09 Thread Torsten Krah
Am Donnerstag, 9. Oktober 2008 16:04:27 schrieben Sie: > >     >         >         >     > But here you iterate through a map (order does not matter) and take the "key", which is the list, and iterate through that. I need to iterate through a list, where the actual value "[0]" or #myList

Re: Upgrade from 2.0.11 to 2.1.2Beta with REST and zero configuration

2008-10-09 Thread Dave Newton
--- On Thu, 10/9/08, Haulyn R. Jason wrote: > 1.I have many user-defined Interceptors, How can I set up > them without configuration? How to change the default > Inteceptors-stack? AFAIK you still need to do that in XML, but it's pretty minimal. Could be wrong, though. Dave --

Upgrade from 2.0.11 to 2.1.2Beta with REST and zero configuration

2008-10-09 Thread Haulyn R. Jason
Hi, all I tried the sample : struts2-rest-showcase-2.1.2.war, it looks cool, so, I think it's the time to upgrade my application from 2.0.11 to 2.1.2Beta, but, Hmm, with code-behind and rest-plugin, when I replace the jars, my application does not work. After reading the "upgrade tutorial", I have

RE: Iterate through a Map, OGNL Question about accessing a map with dynamic value [0]

2008-10-09 Thread Brad A Cupit
From: Torsten Krah [mailto:[EMAIL PROTECTED] Sent: Thursday, October 09, 2008 8:27 AM > > > > The below code should work in any JSP that has the Struts 2 tag library imported. It iterates over a Map whose keys are of type List. This code was inspired by [1] <%--

RE: Using POSIX Regular Expressions for Internationalized Validation

2008-10-09 Thread egetchell
Everything is clear now. I had misunderstood the previous posts as suggestions to physically alter the user’s input via HTML escaping/unescaping at the boundary layer of Struts. I totally agree with this XSS mitigation approach and have added the escape=”true” attribute to all our property tag

Iterate through a Map, OGNL Question about accessing a map with dynamic value [0]

2008-10-09 Thread Torsten Krah
Hi. I am iterating over a list like this: which works. Additionally i've got a Map where the key is the List and the value is another list. This does not work. How can i tell the lookup expression, that it should use the value from the current outer iterator as the key to loo

Re: DefaultWorkflowInterceptor doesn't validate anymore!?

2008-10-09 Thread Musachy Barroso
The validation one. On Thu, Oct 9, 2008 at 9:13 AM, Stephan Schröder <[EMAIL PROTECTED]> wrote: > > Hi, > > i'm using Struts2.1.2 which uses Xwork2.1.2. When i tried to figure out why > my validate-Method wasn't called anymore, i found out that the > DefaultWorkflowInterceptor just doesn't invoke

DefaultWorkflowInterceptor doesn't validate anymore!?

2008-10-09 Thread Stephan Schröder
Hi, i'm using Struts2.1.2 which uses Xwork2.1.2. When i tried to figure out why my validate-Method wasn't called anymore, i found out that the DefaultWorkflowInterceptor just doesn't invoke it anymore, which seems to be on purpose (<-b->This interceptor does not perform any validation<-/b->.) Whi

Re: removing the extension in url in struts 2

2008-10-09 Thread Alex Coles
On Fri, Oct 3, 2008 at 6:31 PM, Owen Berry <[EMAIL PROTECTED]> wrote: > > Here's a small sample out of my struts.xml file; let me know if you > need a little more. > > > > home > > > home > > > > I can access the above with any of the following URLs: > > / > /home >

Re: tag for formatting date or time using type and style, not pattern

2008-10-09 Thread Greg Lindholm
Can you give us an example of a language specific validation that you are needing? stanlick wrote: > > Any idea how to get language specific validations? e.g. > > SomeAction-validation_fr.xml > > Scott > > > -- View this message in context: http://www.nabble.com/tag-for-formatting-date

Re: devMode

2008-10-09 Thread Adam Hardy
Anyone, what are the requirements for configuring my i18n resource bundle if I want devMode to reload it every request? I currently have all my i18n strings in package.properties in my main package - and I configured it in struts.xml too like so: Adam Hardy on 08/10/08 18:50, wrote: OK

default value

2008-10-09 Thread donaldfung
Hi, I populate special character (such as "<") from database to the action object and using to display in JSP. However, it can't be shown. The wiki describe that the default value is true but it isn't !. I need to hard code all the with escape="true". How can I set the escape="true"

Dojo, input=file and struts2 problem

2008-10-09 Thread Jeroen Simons
I have a very weird problem and I hope somebody can tell me where to look for a solution. Using the code below everything works as expected. On form submission an ajax call is made to the alert() method which simply forwards to alert.jsp which alerts the filled in text and a dom reference o

Re: Tree default expanded ??

2008-10-09 Thread Ganesh123
Finally i could make it Thanks to all who helped me to do this... Thanks a lot. i solved two problems one is extending tree and one is finding parent of a tree node selected. i am giving code here for ref" Tree Tree Expand function which will be called on window load event window.onload=

Re: Cannot call servlet from portlet using img tag

2008-10-09 Thread Laurie Harper
daiyna wrote: im sorry this is wrong: < img src="${imgURL}" alt="img" width="40", height="40"/> its like: < img src="/imageview/somepath" alt="img" width="40", height="40"/> where somepath is the absolute path for the generated image. imageservlet was supposed to retrieve the local ima

Re: Struts2 Data Transfer

2008-10-09 Thread Laurie Harper
You can't expose two different beans with one getModel() method, if that's what you're asking. You can, however, return a simple 'wrapper' bean from getModel() which has a getter/setter pair for each of your target beans. Either approach gives you a way to address the two beans independently,

Re: simple vs xhtml theme, validation question

2008-10-09 Thread Torsten Krah
Am Mittwoch, 8. Oktober 2008 20:27:40 schrieb Gabriel Belingueres: > You can do it by hand though: Thx for this hint, should habe seen that myself. Thats a good idea to do stuff with s:if and s:else myself. thx. -- Bitte senden Sie mir keine Word- oder PowerPoint-Anhänge. Siehe http://www.gnu.o

Re: Struts2 Data Transfer

2008-10-09 Thread aum strut
i even made getter and setter method for one of my beans namely Person but when i am using these getter /setter method in the action calss for the beans i am getting exception while the GetModel() i mean the model driven approach is working fine.. On Thu, Oct 9, 2008 at 1:16 PM, aum strut <[EMAI

Re: Struts2 Data Transfer

2008-10-09 Thread aum strut
Yes Dave , There is a sigle form(Page) for this with different sections in it for registration.i only want that the data from this single page should go to different (2 in my case) beans depends upon the fields i have defined in the respective beans. i tied this and is working fine but i want tha