Struts - Validation.xml

2008-01-07 Thread VICKY K
Hi, How do I Validate the values in Combo box (OPTION COLLECTION) Regards, VICKY -- View this message in context: http://www.nabble.com/Struts---Validation.xml-tp14660707p14660707.html Sent from the Struts - User mailing list archive at Nabble.com.

Problem with Populating collection in struts 2 Action

2008-01-07 Thread Ke
Hi, all, I have the problem to populate collection from Struts 2 Action. I followed the previous post from: http://www.nabble.com/Populating-collection-in-struts-2-Action-properties-td8784718.html#a8784718 But it still does not work, I post my method here, any help will be appreciated. In my

Cancelamento

2008-01-07 Thread Odair Gonçalves de Jesus [e-governe]
Cancelamento Odair G. de Jesus Desenvolvimento - eGoverne

Re: Required validator dosen't work

2008-01-07 Thread Arpan Debroy
But when type conversion error will be occurred, I want to display my custom error message instead of the auto generated one. So how to do that. On Dec 14, 2007 11:18 PM, Dave Newton [EMAIL PROTECTED] wrote: --- Arpan Debroy [EMAIL PROTECTED] wrote: Using 'Long' is the correct way to get

S2 checkbox validation

2008-01-07 Thread kingysball
Hi, I am trying to use Struts 2 client side validation to validate if a checkbox has been selected before submitting a form. I have being trying to use the regular expression validator but have had no joy with it. Has anyone encountered this issue before?? Thanks, Steve -- View this

How to compare String in OGNL?

2008-01-07 Thread Shuai Zheng
Dear All, I want to know how to compare String using OGNL in jsp page for struts 2: I have following codes: s:property value=%{(invProducts.type == 'T')?'Type A':' Type B '}/, But always nothing return, and I try many different ways but the operator == looks like can't support String type. I

[S2] rendering a matrix (like a chessboard)

2008-01-07 Thread GF
I have matrix of objects.. somekind like ChessBoardPosition[][] I want to render it using Struts2. You can imagine my matrix as a Chessboard.. I use 2 iterators, to iterate over columns and rows, and finally i want to render the single object inside the matrix, that will be a empty position of

Re: Expression languages

2008-01-07 Thread Jeromy Evans
Hi José, You're understanding is quite close. Unfortunately I don't know of a document that describes how all the EL's fit together but here's a quick explanation (I'll skip the history though): The Expression Language is part of the JSP specification and the version you're using depends

[S2] - Portlet Tutorial

2008-01-07 Thread Nils-Helge Garli Hegvik
Hi! I have created a new Struts 2 portlet tutorial [1] in the Struts 2 Plugin Repository wiki. The tutorial is work in progress and is currently based on the 2.1.1-SNAPSHOT of Struts 2. Please try it out and let me know of any issues you encounter. Nils-H [1] -

Re: Expression languages

2008-01-07 Thread José Cervera
Well, thanks a lot for such a complete answer. I'm sure it will be useful for others... I guess it could even be included in the FAQ. Best regards. On Jan 7, 2008 2:00 PM, Jeromy Evans [EMAIL PROTECTED] wrote: Hi José, [...] References: [JSP2.1]

How to write JSP to populate back a hashmap of custom objects

2008-01-07 Thread Rubbinio
Hi, we have defined the following custom object: public class GenericElement{ private String key; private String value; public GenericElement(){ } public String getKey() { return key; } public void setKey(String key) {

getting param from an url link

2008-01-07 Thread auz
hi, im a struts newbie, im using stuts 1.2.9 and have a problem, i cannot get params from url in struts action in my a href i have /sservice/editSP.do?spid=bean:write name=studyProgram property=studyProgramID/ action code : String param=(String)request.getAttribute(spid); but request has no

Netbeans Struts Plugin

2008-01-07 Thread Édio Kunhasky Júnior
Hello! I create one module from Netbeans to generate Action classes from JSP form. I would like to put it on struts getting started, but before I want know about your opinion. The download is avaliable on: http://www.j2ee.com.br/br-com-prodado-struts.nbm To install, click on tools - Plugins -

Re: getting param from an url link

2008-01-07 Thread Nils-Helge Garli Hegvik
There's a big difference between a request attribute and a request parameter. You should try request.getParameter instead. Maybe this can explain: http://www.jguru.com/faq/view.jsp?EID=1307699 Nils-H On 1/7/08, auz [EMAIL PROTECTED] wrote: hi, im a struts newbie, im using stuts 1.2.9 and have

Re: Is there a way to use Spring to inject objects to a Struts 2 Interceptor?

2008-01-07 Thread Ted Husted
Hmmm, it's an interesting idea. I take it you already tried defining a property in the Interceptor, the same way we would for an Action, and a Spring bean was not injected into the Interceptor property? (I never tried it myself.) -- HTH, Ted * http://www.StrutsMentor.com/ On Jan 4, 2008 4:51

Re: Expression languages

2008-01-07 Thread [EMAIL PROTECTED]
If I understand correctly, the ${ ... } is replaced by the servlet engine ( e.g. Tomcat), so if I include it in a struts Tag, it will be replaced by a literal before it arrives to struts. ${...} is not allowed to be used in a struts tag. If you do it, you'll get a syntax error. Thanks.

Re: getting param from an url link

2008-01-07 Thread auz
tnx, OMG how stupid of me totally forgot about those 2, Nils-Helge Garli wrote: There's a big difference between a request attribute and a request parameter. You should try request.getParameter instead. Maybe this can explain: http://www.jguru.com/faq/view.jsp?EID=1307699 Nils-H On

Re: How to compare String in OGNL?

2008-01-07 Thread [EMAIL PROTECTED]
I don't think you can do it in one line but you can do it this way: s:if test=invProducts.type=='T' s:property value=Type A/ /s:if s:else s:property value=Type B/ /s:else Hoping it helps. Thanks. On Jan 7, 2008 6:44 AM, Shuai Zheng [EMAIL PROTECTED] wrote: Dear All, I want to know how

Re: How to write JSP to populate back a hashmap of custom objects

2008-01-07 Thread jimkski
Hi Rubbino- The vita rara blog provided a good example of using the Map method to update a list of domain entries. http://www.vitarara.org/cms/struts_2_cookbook/updating_a_list_of_domain_entities I followed that example exactly and was able to get a form submit using maps working. --

Struts 2: Multiple methods in an action Class

2008-01-07 Thread zuquirio
Hi, I've a strange bug. I create an action class with three methods: view(), check(), do(). These three methods are in one class. In my struts-config.xml, I have made the following entries: lt;action name=letterRequestIndex class=springLetterRequestIndex method=viewgt; nbsp; nbsp; nbsp; nbsp;

Re: [struts] Tags and variable attributes

2008-01-07 Thread [EMAIL PROTECTED]
It works. What's behind it? I even can't believe it. Thanks so much. On Jan 7, 2008 12:17 AM, Dale Newfield [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: If the varHoldingKey is a key, it works fine. However, it is not a key itself. It is an action property holding the key. So, have

Re: [S2] - Portlet Tutorial

2008-01-07 Thread zuquirio
Very good! Thanks! Nils-Helge Garli wrote: Hi! I have created a new Struts 2 portlet tutorial [1] in the Struts 2 Plugin Repository wiki. The tutorial is work in progress and is currently based on the 2.1.1-SNAPSHOT of Struts 2. Please try it out and let me know of any issues you

Re: How to compare String in OGNL?

2008-01-07 Thread Shuai Zheng
Dear Lei, Thanks a lot, it works. Actually I tried this before, but it does not work, I don't what kind of stupid mistake I made previously:) Regards, Zheng Shuai On Jan 7, 2008 10:09 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I don't think you can do it in one line but you can do it

Re: How to compare String in OGNL?

2008-01-07 Thread Shuai Zheng
Just find out the problem, the code does not work because when we use one character like 'T',, the string compare will always fail, I guess it is because the OGNL treat it as a char type. The following code works fine: s:if test=invProducts.type==('T'+'') s:property value=Type A/ /s:if s:else

Re: [S2] [ANN] S2 plugin for JetBrains IntelliJ IDEA 7

2008-01-07 Thread Haroon Rafique
On Dec 30 at 10:40am, YC=Yann Cébron [EMAIL PROTECTED] wrote: YC [..snip..] YC YC Please give it a try on your S2 projects, I appreciate any feedback or YC suggestions. YC YC Greetings, YC YC Yann YC Hi Yann, Thanks for your work. I haven't tried the plugin yet, but my pain point (and

Re: Struts 2: Multiple methods in an action Class

2008-01-07 Thread Ted Husted
What happens if you use a method name other than do. There's actually a feature in Struts 2 where we can name a method doDefault and then refer to it as default elsewhere. Naming a method do might be confusing. HTH, Ted * http://www.StrutsMentor.com/ On Jan 7, 2008 9:11 AM, zuquirio [EMAIL

s:url.../ tag and hiding parameters in the link

2008-01-07 Thread [EMAIL PROTECTED]
Hi all, I use s:url.../ tag to create a link to an action and s:param.../ tag to pass one variable lang, like this: s:url id=editUrl namespace=/ssicsi action=edit s:param name=lang value=fr/ /s:url I don't want the lang=fr to appear in the URL so I tried to do it by including s:param

Re: Struts 2: Multiple methods in an action Class

2008-01-07 Thread zuquirio
Thanks a lot! I will give it a try. Actually the real method's name is: doRequest, I will try to put a different name. Thanks. Ted Husted wrote: What happens if you use a method name other than do. There's actually a feature in Struts 2 where we can name a method doDefault and then refer

Re: [S2] rendering a matrix (like a chessboard)

2008-01-07 Thread Yayo
create a custom tag for the board rendering ^g^ On Jan 7, 2008 12:45 PM, GF [EMAIL PROTECTED] wrote: I have matrix of objects.. somekind like ChessBoardPosition[][] I want to render it using Struts2. You can imagine my matrix as a Chessboard.. I use 2 iterators, to iterate over columns and

Re: s:url.../ tag and hiding parameters in the link

2008-01-07 Thread zuquirio
I'm not an expert but I don't think you can do it. But, if you do so, please post it. Thanks. [EMAIL PROTECTED] wrote: Hi all, I use s:url.../ tag to create a link to an action and s:param.../ tag to pass one variable lang, like this: s:url id=editUrl namespace=/ssicsi action=edit

RE: Is there a way to use Spring to inject objects to a Struts 2 Interceptor?

2008-01-07 Thread Néstor Boscán
Ted it looks like Struts 2 does use the object factory for the Interceptor. I already wired the Interceptor with Spring. Thanks Alot!! -Mensaje original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] En nombre de Ted Husted Enviado el: Lunes, 07 de Enero de 2008 12:46 p.m. Para:

Re: s:url.../ tag and hiding parameters in the link

2008-01-07 Thread [EMAIL PROTECTED]
Definitely I'll post it to let everyone get benefit if I figure it out. By the way, welcome everybody to give suggestion. Thanks. On Jan 7, 2008 1:33 PM, zuquirio [EMAIL PROTECTED] wrote: I'm not an expert but I don't think you can do it. But, if you do so, please post it. Thanks. [EMAIL

Re: [struts] Tags and variable attributes

2008-01-07 Thread Dale Newfield
[EMAIL PROTECTED] wrote: It works. What's behind it? I even can't believe it. Before you were using ognl to call getText with a string argument varHoldingKey. Without those strings you're now calling that same method with the evaluated value of the action attribute varHoldingKey.

getting namespace of action through OGNL

2008-01-07 Thread Wes Wannemacher
Hello, I have been struggling to find a way to see what the namespace is from within a JSP. So, from the view, I would like to know what the namespace is of the action that was called. The following scriptlet correctly returns the namespace - % com.opensymphony.xwork2.ActionContext ac =

Re: [struts] Tags and variable attributes

2008-01-07 Thread [EMAIL PROTECTED]
Thanks Dale for your explanation On Jan 7, 2008 2:33 PM, Dale Newfield [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: It works. What's behind it? I even can't believe it. Before you were using ognl to call getText with a string argument varHoldingKey. Without those strings you're now

Re: getting namespace of action through OGNL

2008-01-07 Thread Ted Husted
The Action (or an Interceptor) could set it as a property that a tag could then access. We can set properties directly to the stack from an Interceptor. (This is how the validators expose bad input to a typed field.) As a general rule, pages should be as dumb as possible, and only know what the

Re: getting namespace of action through OGNL

2008-01-07 Thread Wes Wannemacher
On Mon, 2008-01-07 at 15:20 -0500, Ted Husted wrote: The Action (or an Interceptor) could set it as a property that a tag could then access. I went ahead and wrote an interceptor. The only problem I have with doing it this way though is that the interceptor is doing some magic that isn't quite

Re: getting namespace of action through OGNL

2008-01-07 Thread Ted Husted
I could see an argument for exposing the namespace as an attribute in the normal course. If nothing else, I wonder if we should roll this functionality into the SiteMesh plugin. -Ted. On Jan 7, 2008 3:39 PM, Wes Wannemacher [EMAIL PROTECTED] wrote: On Mon, 2008-01-07 at 15:20 -0500, Ted

Question on validation. ...

2008-01-07 Thread Mufaddal Khumri
Hi, Lets say I have an action and some of the properties being set on that action are to be validated which I can do a number of ways. Is there a way in Struts2 to tell the system not to valid the framework the first time the action is accessed: [Turn validation off]

Re: [S2] Indexed properties, Type Conversion and Validation

2008-01-07 Thread jimkski
I've made some progress on this on my own. I needed to write my own version of VisitorFieldValidator to make it work however. Once that was done, the model was being validated but all the error messages were being assigned to the wrong field names. The reason for this is that the field names

Re: [S2] Form Select

2008-01-07 Thread Ted Husted
Hmmm, did you try selectedModules as an array of String? HTH, Ted * http://www.StrutsMentor.com/ On Jan 7, 2008 1:58 AM, carmi_cd [EMAIL PROTECTED] wrote: i have a form select.. my problem is i dont know how can i get the selected values in the form select box. here is my code..

Re: getting namespace of action through OGNL

2008-01-07 Thread Jeromy Evans
Wes Wannemacher wrote: Hello, I have been struggling to find a way to see what the namespace is from within a JSP. So, from the view, I would like to know what the namespace is of the action that was called. The following scriptlet correctly returns the namespace - %

[S2] JasperReports plugin vs. Subreports

2008-01-07 Thread Dave Newton
This might be a JasperReports question; not sure yet. I'm trying to figure out if there's a way I can use sub-reports via the JasperReports plugin. I have a reasonably complicated data structure with multiple nested collections. At this point I might just write XML and use an XML datasource and

Re: [S2] Form Select

2008-01-07 Thread carmi_cd
hi ted..thanks.. i tried to retrieved selectedModules as an array of String.. but it was not able to get the values.. here is my code.. String[] selectedModules =getSelectedModules(); System.out.println(selected + selectedModules[0]); It printed the value of selected is

learning struts/spring?

2008-01-07 Thread mah bub
hi everyone, hope you are doing well. i'm a new comer to the world of web based system development. I would like to know should i learn struts (1 or 2) or spring or both of them and why? is there any nice tutorial which covers the basic with step by step examples so that i can catch up. any

Struts training...

2008-01-07 Thread Narayan Mandaleeka
Can some suggest a good training class for Struts around the Bay Area - CA? Thanks! -Narayan

Re: Struts training...

2008-01-07 Thread stanlick
Struts 1.x or Struts 2? I might be able to help you out. On Jan 7, 2008 8:18 PM, Narayan Mandaleeka [EMAIL PROTECTED] wrote: Can some suggest a good training class for Struts around the Bay Area - CA? Thanks! -Narayan -- Scott [EMAIL PROTECTED]

RE: Struts training...

2008-01-07 Thread Jack Haynes
Which is more in demand? Struts 1 or 2? Thanks, Jack Date: Mon, 7 Jan 2008 20:21:23 -0600 From: [EMAIL PROTECTED] To: user@struts.apache.org Subject: Re: Struts training... Struts 1.x or Struts 2? I might be able to help you out. On Jan 7, 2008 8:18 PM, Narayan Mandaleeka [EMAIL

Re: learning struts/spring?

2008-01-07 Thread Prajapati Manish Narandas
hi mahbub, In IT field, we always need to be ready to undergo new technologies so dont bother about it and as far as tutorials are concerned,i would like to suggest u to go through the website of struts.apache.org because it contains all thing which we need u just need to manage in finding what u

Re: [struts] getting namespace of action through OGNL

2008-01-07 Thread Dale Newfield
Jeromy Evans wrote: Wes Wannemacher wrote: But, if I use the following OGNL - s:property value=@[EMAIL PROTECTED]().actionInvocation.proxy.namespace/ I just get a big fat nothing :( Works for me! Maybe it's working for both of you--Wes, are you certain that the appropriate answer for

Struts 2: client side validation message kept displaying repeatedly

2008-01-07 Thread Cheng Wei Lee
I enabled client side validation for a form, when the user submits, the validation kicks in and the messages are shown. If the user didn't make any changes and proceed to submit again, the set messages are shown again. The messages kept increasing. Is there a way to clear the old messages before

Struct Logging

2008-01-07 Thread Sohil Rupani
Hi, I m new to struts , using tomcat and jdk 1.5. i m getting a error Servlet action not avaliable.. which on browsing i learn that is a very common error i searched through the tomcat log where i dont see any error messages.. i would like to know where does struts creates its log.. so that i

Re: Struct Logging

2008-01-07 Thread Cheng Wei Lee
Hi Sohil, Could you provide the stacktrace for troubleshooting? Thanks. On Jan 8, 2008 3:37 PM, Sohil Rupani [EMAIL PROTECTED] wrote: Hi, I m new to struts , using tomcat and jdk 1.5. i m getting a error Servlet action not avaliable.. which on browsing i learn that is a very common error

Re: Struct Logging

2008-01-07 Thread Sohil Rupani
Hi , Thanks for the reply.. appreciate you time. Following is the error i m getting on the browser.. HTTP Status 404 - Servlet action is not available type Status report message Servlet action is not available description The requested resource (Servlet action is not available) is not