Re: MethodFilterInterceptor

2009-07-14 Thread cilquirm
stanlick wrote: > > The logic considers the action name without regard to the package the > action > is contained within. > I'm confused by this also. I thought an example implied either a real-world or contrived scenario where the problem in question manifests itself. -- View this messag

[S2] Issue with NamedVariablePatternMatcher and ActionConfigMatcher?

2009-06-08 Thread cilquirm
Hi all, I've been spending time with Struts 2.1.6, and the NamedVariablePatternMatcher, and I've come across a potential issue. The issue comes into play when defining a class such as this : @Namespace("/content/{year}/{month}") public class ContentAction extends ActionSupport { private In

RE: [struts] S2: EL in tags 2.0.11

2007-10-29 Thread cilquirm
be a way to active the EL in the Attributes.. > > > Manuel Correa. > > -Original Message- > From: cilquirm [mailto:[EMAIL PROTECTED] > Sent: Monday, October 29, 2007 3:17 PM > To: user@struts.apache.org > Subject: Re: [struts] S2: EL in tags 2.0.11 > >

Re: [struts] S2: EL in tags 2.0.11

2007-10-29 Thread cilquirm
ion method, then we might be able to say #request.request.contextPath. DNewfield wrote: > > cilquirm wrote: >> you could do this >> >> >> >> >> >> > > Isn't the request on the valuestack?

RE: S2: EL in tags 2.0.11

2007-10-29 Thread cilquirm
you could do this Basically, stuff the object into the pageContext somehow and then reference it again via ognl. It's a pain, but a very slight one. -a Manuel Correa wrote: > > How I get the contextPath with OGNL?? Or the other request methods? > > Manuel Correa. > > -Original M

Re: S2: EL in tags 2.0.11

2007-10-29 Thread cilquirm
I believe this was a security fix, as there was an issue where ognl expressions could be used to do something drastic to the application server ( like System.exit ). I believe the expectation is that you can get around it by creating your own customized tld or something like : hth, -a Man

Re: [S2] - Types in form parameters

2007-10-25 Thread cilquirm
A failed type conversion will incur a field error as well. wild_oscar wrote: > > > > newton.dave wrote: >> >> --- wild_oscar <[EMAIL PROTECTED]> wrote: >>> In a form I have a parameter passed like: >>> >>> >>> >>> where sop is of class I created. >>> >>> When I execute the action I g

Re: [S2] Change struts-default.xml content

2007-10-25 Thread cilquirm
web/WEB-INF/classes/struts.xml:10:109 > > Caused by: Bean type interface com.opensymphony.xwork2.TextProvider with > the name xwork1 has already been loaded by [unknown location] - bean - > file:/D:/projects/Karakas1.1/build/web/WEB-INF/classes/struts.xml:10:109 > > > &g

Re: [S2] Change struts-default.xml content

2007-10-24 Thread cilquirm
you can redefine it in your struts.xml, much like how you would specify the object factory to override the default object factory . -a Igor Vlasov wrote: > > Hello. > I want to change some information in struts-default.xml. > > I can move it to classes directoty and do any change:-) > >

Re: [S2] Manually obtain previous action parameters after action "chaining"?

2007-10-10 Thread cilquirm
You can, if you grab the ValueStck and traverse up it till you get to your previous action. Igor Vlasov wrote: > > > > I have action "one" and it calls action "two" throw: > two > > > I can use ChainingInterceptor to copy properties of "one" action to "two" > action. > > I get behaviour

Re: How to improve dojo performance in Struts 2.0.9

2007-10-09 Thread cilquirm
as to get around the barrier of entry of engaging people to add and modify stuff. Getting someone else to maybe do it doesn't seem like a form of engagement. newton.dave wrote: > > --- cilquirm <[EMAIL PROTECTED]> wrote: >> Any thought given to using a secondary wiki

Re: How to improve dojo performance in Struts 2.0.9

2007-10-09 Thread cilquirm
Sorry to hijack this thread, because I fully agree with Wes that this is good stuff to put into a wiki. It's a little trickier with the apache wiki because you need to sign and send over the CLA ( not terribly hard, but sometimes may not be possible. ) Any thought given to using a secondary wiki

Re: [Struts 2] : Zero Configuraiton : some feedback

2007-10-03 Thread cilquirm
I use Zero Conf and codebehind a lot, and I think they're both incredibly useful. especially in this newer world of convention over configuration, etc... When I have a package hierarchy all set up, i don't feel the need to muck with struts.xml, because I can get directly down to coding. There

RE: ModelDriven CRUD validation failure still causes JPA update - RESOLVED

2007-10-02 Thread cilquirm
You can throw an exception , which you can specify in your @Transactional( rollbackFor = ) to have it rollback. jon_french wrote: > > Yes. But I am using Spring managed transactions that in my understanding > are outside of the struts Interceptor stack. > > My DAO's are annotated with th

RE: Struts2 Cookbook Question

2007-10-02 Thread cilquirm
There's nothing preventing you from adding back commons-beanutils or OSCore ( http://www.opensymphony.com/oscore/ ) to get back to that level of functionality. I'm not 100% sure why this mechanism is necessary. If you name your getter on your TestBean appropriately, S2 should take care of it.

Re: Mapping multiple enums to a nested object

2007-09-25 Thread cilquirm
;t the same as the > one provided in XWork2? > > > cilquirm wrote: >> >> Indeed, the problem is that EnumTypeConverter, as provided by Struts2 >> only works for single values. >> >> Can you make selectedNutrients a List? >> >> If so, you might

Re: Mapping multiple enums to a nested object

2007-09-25 Thread cilquirm
rients[] must be mapped using > EnumTypeConverter > > > cilquirm wrote: >> >> Are enums type-converted automatically now? >> >> I recall early on I had to specify >> http://struts.apache.org/2.0.9/struts2-core/apidocs/com/opensymphony/xwork2/

Re: Mapping multiple enums to a nested object

2007-09-25 Thread cilquirm
Are enums type-converted automatically now? I recall early on I had to specify http://struts.apache.org/2.0.9/struts2-core/apidocs/com/opensymphony/xwork2/util/EnumTypeConverter.html Have you tried specifying that? with Element_selectedNutrients = com.opensymphony.xwork2.util.EnumTypeConvert

Re: Breadcrumbs

2007-09-25 Thread cilquirm
Nope, since IAs and sitemaps are very site specific. Java does, tho. It's called java.util.Stack ( or at your leisure, commons-collections has ArrayStack ) :-) -a stanlick wrote: > > Can you tell me if Struts 2 has a facility for breadcrumbs? > > On 9/25/07, Antonio Petrelli <[EMAIL PROT

Re: Struts Action with two or more "process methods"

2007-09-21 Thread cilquirm
You can also map each method to a name in your struts.xml by using the method attribute of the action tag. Ganebnyi Genadii wrote: > > Requesting action like /web-path/someAction!someMethod.action, calls > SomeAction.doSomeMethod(). > > 2007/9/21, michetag <[EMAIL PROTECTED]>: >> >> >> Hi

Re: ParameterInterceptor

2007-09-20 Thread cilquirm
I'm not sure I follow this 100%. Are you saying that a single null propery being passed into the setter of your model caused a whole new model object to be created? So you have : firstName, lastName, and address1 address1 was read-only ( disabled or whatever you want to call it ). your actio

RE: S2 : Validation per Action method - ideas?

2007-09-18 Thread cilquirm
I'm not sure I follow how validation is more flexible when using annotations vs. xml files. Aliases are how you tell xwork that this method is the one to be executed, so there's a 1-to-1 mapping between aliases and methods. File based validation is, in a sense, more flexible, because you can def

Re: [S2] Conditional Validation (test if field is present in JSP)

2007-09-17 Thread cilquirm
; > > true > > > > ... > > > > > > cilquirm <[EMAIL PROTECTED]> > 17/09/2007 16:50 > Veuillez répondre à > "Struts Users Mailing List" > > > A > user@struts.apache.org > cc > > Objet > Re: [S2] C

Re: Whats the harm in creating a Servlet Dispatcher?

2007-09-17 Thread cilquirm
I'm pretty sure that making FilterDispatcher a Filter was a design decision so converting it to a servletdispatcher may not be as easy or as straightforward as one might think. If memory serves ( and these days, that's not guaranteed ), it actually used to be a filter/servlet combination before i

Re: [S2] Conditional Validation (test if field is present in JSP)

2007-09-17 Thread cilquirm
somewhat hackish, but you can accomplish this by using expressions : #params['attrib'] != null ? attrib in ('a','list','of','values') (this is just an example stating that you can check for the existence of the variable in the parameter and then execute an expression like you normally would )

Re: Joining list with OGNL

2007-09-14 Thread cilquirm
I don't believe OGNL supports concatenation of lists, but such functionality could be achieved using chained subexpressions : ( ticketStates.add(0,new MyObject(-1,"All")), ticketStates ) which would insert the new object into the head of the list, and then return the ticketStates object as the r

RE: [s2.0.9] Is there a better way to do this...

2007-09-06 Thread cilquirm
Al Sutton-4 wrote: > > Ok, Looks like the first part is confusion in terminology. I took Action > to > mean an action as defined in struts.xml, but I now see Richard meant a > single class used to declare two actions. > > Your solution to the second part doesn't seem right to me. My > underst

RE: [s2.0.9] Is there a better way to do this...

2007-09-06 Thread cilquirm
Al Sutton-4 wrote: > > Hi Richard, > > Thanks for the pointer. > > I'm using 2 actions because my current belief is that using a single > action > would cause problems with result names because you can't define separate > SUCCESS results for the form prep and the form submission if you only ha

Re: Configuring OpenSessionInViewInterceptor as S2's interceptor

2007-08-22 Thread cilquirm
In my experience, just having OSIV doesn't automatically imply that you expect all your data to be retrieved ad-hoc. (maybe the users do :) OSIV doesn't prevent the user from using eager fetching when necessary or useful ( and my experience delays it until your application is working and you'r

Re: S2: HashMap - from jsp to action

2007-08-09 Thread cilquirm
the way to construct a map in ognl is %{ key : value , key : vale } http://www.opensymphony.com/ognl/html/LanguageGuide/collectionConstruction.html#mapConstruction hth, -a Hartrich, James CTR USTRANSCOM J6 wrote: > > I'm iterating a collection (keys) from s:action to get corresponding >

Re: FieldExpressionValidator: How do I reference field names?

2007-07-18 Thread cilquirm
That's a mouthful. OGNL does have an 'in' operator customer.creditCards[0].type in [ 'AMERICAN_EXPRESS', 'VISA', 'DISCOVER' , 'MASTERCARD'] note that you don't have to do toString() if type is already a string ; ognl's equality operator ( == ) already uses equals. If it's not of type String, y

Re: Open Source Struts Dating Application

2007-07-18 Thread cilquirm
I think you have to 'know' somebody to get it incubated. i.e. Just because you're offering, doesn't mean they'll bite. (And I don't mean that in a bad way, either. ) Check out the incubation docs for more info : http://incubator.apache.org/incubation/Incubation_Policy.html Barring that, yo

Re: Struts 2 + Spring 2 + JPA + AJAX Tutorial

2007-07-17 Thread cilquirm
By the looks of it, your classpath is messed up. Is the hibernate3 jar in the right place? I can't think of any other reason it wouldn't be able to find org.hibernate.MappingNotFoundException LucaLuca wrote: > > Hi, > > I've tried to make some changes to make it work..But nothing!. These ar

Re: Configuring Struts with eclipse

2007-07-12 Thread cilquirm
It's relatively easy. You want the WTP ( unless you're using some customized version like MyEclipse, at which point, I can't help ). a) Create a Dynamic Web Project. b) Set up your Server Runtime (1) (2) c) Drop your jars into WebResources/WEB-INF/lib (3)(4) 4) write up your struts.xml : ht

Re: Struts 2 performance

2007-07-12 Thread cilquirm
for my sake, i hope it's still 1.5. i'm not allowed to go near 1.6 because of some obscure bug in some oracle driver somewhere. Ted Husted wrote: > > Are we targeting 1.6 now, or is the S2 target platform still 1.5? > > -T. > > On 7/12/07, James Holmes <[EMAIL PROTECTED]> wrote: >> Perfect!

Re: Struts 2 performance

2007-07-12 Thread cilquirm
Frank, would you care to give the same tests a shot with ognl 2.7 and javassist in the mix. Although none of this is purely scientific, at least evaluations on that regard give us some level of subjective information. The ognl 2.7 and javassist jar are available via the tapestry-4.2-libs downl

Re: Struts 2 performance

2007-07-10 Thread cilquirm
I've found that static html pages are blazing fast, especially those that don't involve stylesheets, images, or javascript includes. :-) Seriously, though, I don't think there's any disagreement that ognl ( or any runtime expression language ) adds a certain amount of overhead, but I've never se

RE: [S2] Servlet-Config Interceptor Bug?

2007-07-09 Thread cilquirm
The session object is wrapped by a SessionMap, so every time you do a put or remove, the appropriate underlying method on the session is called. So, in a nutshell, no, nothing to worry about. Like most of struts2, it just works :-) -a Hoying, Ken-2 wrote: > > I am currently utilizing the Se

Re: [S2] how to configure Spring's OpenViewInSessionInterceptor for struts2

2007-07-09 Thread cilquirm
panpan wrote: > > The session is open, why do I need to reattach them? > You wouldn't need to if you loaded and discarded your objects in a single request, but let's say you have objects that lived around longer than a single request ( i.e., a User object in your http session ). You might h

Re: RE : Orthognal OGNL!

2007-07-09 Thread cilquirm
Seems like you should be able to say > > > > But since there's no getAction in the ActionContext, I doubt that will > work. Maybe it should be added? > (*Chris*) > > On 7/9/07, cilquirm <[EMAIL PROTECTED]> wrote: >> >> >> the easiest solut

Re: [S2] how to configure Spring's OpenViewInSessionInterceptor for struts2

2007-07-09 Thread cilquirm
early on, and watch your transaction boundaries. Ask away if you have particular questions :-) hth, -a panpan wrote: > > Thank you cilquirm. I think i'm a little bit confused and the filter is > the one I needed. > There is one thing which is unclear to me. If I only apply

Re: RE : Orthognal OGNL!

2007-07-09 Thread cilquirm
the easiest solution would be to s:set the property name you want to reference with a different name and then access it in your loop under the new name. stanlick wrote: > > There is no searching up the stack beyond the top? > > On 7/9/07, Dave Newton <[EMAIL PROTECTED]> wrote: >> >>

Re: [S2] how to configure Spring's OpenViewInSessionInterceptor for struts2

2007-07-09 Thread cilquirm
I think you may be confusing Struts2 (S2) interceptors with Spring Interceptors. The two are not the same. S2 interceptors provide some "aop-like" functionality by allowing code to modify request processing in some fashion; however it's not truly based around an aop standard ( i.e. aopallliance )

Re: Validation dies because of request param array?

2007-07-03 Thread cilquirm
I should correct myself. My problem may not be related, since it was due to the CookieInterceptor's handling of setValue. Can you post your pojo and your query string? cilquirm wrote: > > Do you have struts.devMode = true? > > I had the same problem and I was

Re: Validation dies because of request param array?

2007-07-03 Thread cilquirm
Do you have struts.devMode = true? I had the same problem and I was forced to change struts.devMode = false I believe this is a change from 2.0.6 ( and in some regards, a worse one at that ). I'm still investigating it, but please try turning devMode off and seeing if it helps. Scott Kingdo

Re: Set a session value in the view

2007-07-03 Thread cilquirm
You should be able to do or (I'm assuming you have access to the jstl) , you can always do hth, -a meeboo wrote: > > > Hey all > > How can I achieve something like this: > <%session.removeAttribute("successMessage");%> > > with the tag? > > I tried but it > didn't work. > > Thanks

Re: javax.el.ExpressionFactory

2007-06-20 Thread cilquirm
bunch of good guys on this forum. > The thing is that I am not using intentionally the JSF framewrok. I just > added an interceptor to the application. What is the problem here ? > > > > cilquirm wrote: >> >> This is most probably not related to Struts. >> &g

Re: javax.el.ExpressionFactory

2007-06-20 Thread cilquirm
This is most probably not related to Struts. I can't claim to know the intrinsics of your setup but it looks like you're missing some jars need for JSF. It might be that you're running an older version of the J2EE stack. javax.el.ExpressionFactory comes with J2EE 5, and is part of JSF 1.2 GED

Re: struts.action.extension question

2007-04-11 Thread cilquirm
ss" I use > "http://mydomain.com/public/css/design.css"; - good enough for me at the > moment. > > > cilquirm wrote: >> >> I don't believe this can be cleanly handled with just the web 2.4 spec >> and struts2. >> >> Some

Re: [S2] Adding Calendar function to a form.

2007-04-11 Thread cilquirm
it is possible, if you extend and modify whatever theme you're using. Then you can put that code wherever you want it to show up right inside the freemarker template that renders it. http://struts.apache.org/2.x/docs/extending-themes.html hth, -a Skip Hollowell wrote: > > Trying again, due to

Re: returns an String[] when is checked!

2007-04-11 Thread cilquirm
Try declaring a boolean setter in your Action with the checkbox name. i.e. setCheckboxName( boolean val ) { this.checkboxName = val ; } and using that instead. I'm not sure why you're trying to get the value from the ActionContext.getParameters(). That will return the raw, globbed values

Re: struts.action.extension question

2007-04-11 Thread cilquirm
I don't believe this can be cleanly handled with just the web 2.4 spec and struts2. Some container, like Resin, allow for url-patterns to be regexes, which would help in this scenario. meeboo wrote: > > The problem is that I have a lot of URL:s which look like /user/username, > movie/movieTit

Re: Can we *please* havea seperate Struts *2* - User list?

2007-04-11 Thread cilquirm
Just FYI, Nabble does provide RSS feeds on a per-list/forum level. I Live-bookmark http://www.nabble.com/Struts---User-f206.html Frank W. Zammetti wrote: > > I think the thought behind not splitting the lists to this point is that > Apache experience has been that it tends to divide a comm

Re: [S2] Adding Calendar function to a form.

2007-04-10 Thread cilquirm
Struts 2 tags support pretty much all the attributes that their html counterparts do. I haven't used NewCal ( seen it, but not used it ) but you can try something like this : javascript:NewCal('myfield','ddmmm',true,24) images/cal.gif Skip Hollowell wrote: > > I tried the s:datetimepi

Re: request.getParameterValues OGNL ?

2007-04-05 Thread cilquirm
Hi, Does ... not work for you? Will Berger wrote: > > How does one in struts 2 process a list of req parameters using ognl? > > In jsp, this gets the job done. > <% > String emailList[] = request.getParameterValues("email")); > for (int i=0;i { > out.println(

Re: How to get a attribute value of map value?

2007-04-05 Thread cilquirm
The second way, %{test['AnyString'].att} or even, explicitly, %{test['AnyString'].getAtt()} should both work. I know it might sound dumb, but is there a value to att? ( using that class as an example, there's no way to set it :-) -a Felipe Rodrigues wrote: > > Hi guys, > > I have this case

Re: Struts 2 URL mapping

2007-04-05 Thread cilquirm
You actually can do that with the default mapper, using wildcarding. Here's an example of what we do : {1} The only trick is that you have to remember to suffix your url appropriately when calling so that S2's dispatchfilter is able to run and pick up on the url mapping. i.e. ( our s

Re: Struts 2 URL mapping

2007-04-05 Thread cilquirm
You actually can do that with the default mapper, using wildcarding. Here's an example of what we do : {1} The only trick is that you have to remember to suffix your url appropriately when calling so that S2's dispatchfilter is able to run and pick up on the url mapping. i.e. ( our s

Re: Struts 2 URL mapping

2007-04-05 Thread cilquirm
You actually can do that with the default mapper, using wildcarding. Here's an example of what we do : {1} The only trick is that you have to remember to suffix your url appropriately when calling so that S2's dispatchfilter is able to run and pick up on the url mapping. i.e. ( our s

Re: IDE for struts-enabled web application

2007-04-02 Thread cilquirm
Dave Newton-4 wrote: > > > Spend the $50; good grief. > > Having been down this road, I would venture with the "Don't bother." side of the argument In my opinion, while the price is fantastic, you're generally stuck with versions that lag behind their completely free implementations ( i.e

Re: Handling login for struts 2.0

2007-03-28 Thread cilquirm
I think the answer is a 2 part solution, but you're on the right track. 1) Create the interceptor that returns Action.LOGIN ( or whatever it is when the user isn't authenticated ). 2) set up your login page in your global results type. See this page for more information : http://struts.apache.or

Re: OSS tool to diagram struts-config.xml ?

2007-03-16 Thread cilquirm
There are a number of tools in the Eclipse space that can do this ( i.e. they run as Eclipse plugins/features and using the underlying GEF framework ). One that I can think of off the top of my head is StrutsIDE : http://amateras.sourceforge.jp/cgi-bin/fswiki_en/wiki.cgi?page=StrutsIDE Exadel

Re: Validation on java.util.List

2007-03-14 Thread cilquirm
I don't know if this helps, but when I validate a list or array , i use OGNL's selection/projection facility : i.e. : customers.{ ? #this.age gt 0 and #this.username neq null }.size() eq customers.size creates a list of all customers whose age is greater than zero and who have a username and

Re: {S2] Newbie: Sharing a POJO between two or more actions

2007-03-14 Thread cilquirm
If your actions occur in sequence, ( i.e. submit to an action -> display action ), it's possible to use action chaining to share objects. http://struts.apache.org/2.x/docs/action-chaining.html Roger Varley wrote: > > Hi > > I need to share an object between two actions. As I'm famili

Re: [s2] How to pass param to actions from Struts.xml

2007-03-14 Thread cilquirm
Create a setter with the same name as your param. ex : for : This value in MyAction : public class MyAction implements Action { private String myValue; public void setMyValue( String value) { this.myValue = value; } } Type conversion's done on this param value just like any other par

Re: [S2] forward to another action

2007-03-01 Thread cilquirm
why can't you add parameters in chain? In your action, can't you : 1) implement ParameterAware 2) set a parameter value in the map that's passed in 3) chain to your action 4) have the value be set in your chained action, via the params interceptor -a Laurie Harper wrote: > > Mike Barou

Re: [S2] TypeConverter

2007-02-28 Thread cilquirm
I do it like so : Map contextMap = ActionContext.getContext().getContextMap(); ApplicationContext applicationContext = (ApplicationContext) ((Map) contextMap .get("application")).get(org.springframework.web.context.WebApplicationContext.ROOT_WEB_A

Re: [S2] Problem with 2.0.6

2007-02-28 Thread cilquirm
I do. It looks vicious, but is pretty harmless. You could wipe it out of your logs by setting the class that throws it to only log ERROR and greater. Piero Sartini-3 wrote: > > Am Dienstag, 27. Februar 2007 schrieb cilquirm: >> I see errors like that on occasion ( mine is with th

Re: [S2] Problems using spring plugin and struts 2.0.6

2007-02-27 Thread cilquirm
st use a "SpringClassLoader"? > > Thanks again, > Joao > > PS: The stacktrace is pretty much what I've send you. > > On 2/27/07, cilquirm <[EMAIL PROTECTED]> wrote: >> >> Technically, this isn't necessary when you have the >> struts-sp

Re: [S2] Problem with 2.0.6

2007-02-27 Thread cilquirm
I see errors like that on occasion ( mine is with the JSONResult type and the location property ), but they've always been warnings. Is yours logged at the ERROR level? Piero Sartini-3 wrote: > > upgraded to 2.0.6 - now the error below is thrown when accessing an Action > with validators. >

RE: Problems using spring plugin and struts 2.0.6

2007-02-27 Thread cilquirm
Technically, this isn't necessary when you have the struts-spring-plugin.jar in your WEB-INF/lib since it's already specified by the struts-plugin.xml file I think, however, seeing a more complete stack trace for the CNFE would be helpful since I have 2.0.6 with the spring plugin just fine. P

RE: Struts 2 Action Classes (HELP!)

2007-02-27 Thread cilquirm
That example is using the null property handling feature of the XW type-conversion system : http://struts.apache.org/2.x/docs/type-conversion.html Basically, when xw/ognl sees ( evaluates ) person.firstName, it calls getPerson() , which returns null. XW goes to work and creates an empty Perso

Re: [S2] JNLP with struts ?

2007-02-23 Thread cilquirm
in your resulting page you can set @page contentType = 'application/x-java-jnlp-file' and return the body of your jnlp file ( possibly even read via c:import or some such mechanism ) Maya menon wrote: > > Have anyone used java web start[JNLP files] with struts ? > > I have a project

s2: numbers being formatted during display in s:select tag

2007-02-22 Thread cilquirm
This is so odd, yet I'm surprised no one's come across this. This is S2 built off the 2_0_X branch ( no modifications, straight clean build ), running under Java 1.5 in both resin and tomcat. Given a snippet like so : the output of the id is a formatted string : Please, Helpme Be

Re: [S2] struts2 validation for only one method in action

2007-02-21 Thread cilquirm
I believe you can use validation annotation to specify validation routines at the method level. ros wrote: > > Hi! > > How to configure struts2 validation for only one method in action? > > Thanks. > -- View this message in context: http://www.nabble.com/struts2-validation-for-only-one-

Re: how to specify ActionMapper

2007-02-07 Thread cilquirm
x27;ve not used 'redirect-action' with extra parameters like below, but I have done so using 'redirect' ( and the former is extended from the latter ) with success. -a Dave Newton-4 wrote: > > --- cilquirm <[EMAIL PROTECTED]> wrote: >> By specifying the

Re: how to specify ActionMapper

2007-02-07 Thread cilquirm
The error seems self-explanatory. By specifying the "queryReportBeanName" inside the tag, you're actually setting the value on the redirect-action object ( known also by it's java name org.apache.struts2.dispatcher.ServletActionRedirectResult ). if you want to set a static param on your own a

Re: Struts2: New life to IBM RAD?

2007-01-30 Thread cilquirm
>From my experience, it is possible to run Struts1 and Struts2 side by side As far as I've seen and worked with, other than keeping the "org.apache" start of the package name, the namespaces and class names are different. Bruno Melloni-2 wrote: > > > Are all the package.class names different

Re: how to use struts2 + spring + JPA

2007-01-29 Thread cilquirm
your persistence.xml must be in META-INF directory in the classpath ( so basically, it needs to end up either in your jars in WEB-INF/lib or in your WEB-INF/classes directory ) shahab wrote: > > Hi: > > I have persistence.xml under META-INF > > (both WEB-INF and META-INF are under tomcat_ho

RE: [s2] String comparison with OGNL -- Learning OGNL by stabbing in the dark.

2007-01-23 Thread cilquirm
Just FYI, I think this lesson was less about OGNL per se, and more about Java,Servlets, and the Parameter map. #parameters.addrType is of type String[], because that's how it's collated ( since you can have multiple values to a single name.. ) hth, -a Wesley Wannemacher wrote: > > Okay, I'

Re: [S2] Prepable and Validate

2007-01-17 Thread cilquirm
I don't think this will work as you expect it to for 2 reasons : 1) prepare comes before validate ( at least in all the interceptor stacks that i saw, obviously you're free to change the order ) 2) validation, at least in my perusal of the source, doesn't short circuit the interceptor stack ht

Re: [S2] possible NPE in Restful2?

2007-01-16 Thread cilquirm
I've created https://issues.apache.org/struts/browse/WW-1648 and attached a patch. cilquirm wrote: > > > > Hi, I think I noticed an NPE in Restful2, which is set as my default > action mapper. I'd like to resolve it but I'm not sure my logic on the >

Re: [s2] how to make s:iterator work

2007-01-16 Thread cilquirm
scratch my original comment ( though the part regarding using the jstl is still valid. ) the problem for you is that since listOfBooks is not in the valuestack directly, you would have to reference it via the request object, like so ... walidito wrote: > > Hi everybody. > I have a problem

Re: [s2] how to make s:iterator work

2007-01-16 Thread cilquirm
I don't know particularly about the s:iterator, but since you said you're using JSP, you can access the model via the jstl tags just as easily : ${book.author} though, looking at your code again, I suspect it's because your getter is class private. It would have to be public. -a walid

[S2] possible NPE in Restful2?

2007-01-16 Thread cilquirm
Hi, I think I noticed an NPE in Restful2, which is set as my default action mapper. I'd like to resolve it but I'm not sure my logic on the matter is correct and hopefully someone on the list can set me straight : The error : java.lang.NullPointerException org.apache.struts2.dispatcher.mappe

Re: Validation Annotations

2007-01-08 Thread cilquirm
According to http://struts.apache.org/2.x/docs/validation-annotation.html you can specify annotations at the method level. André Faria-3 wrote: > > Hi People!!! > > Is there a way to use Validation Annotations only for a method or always > for the action... > > Example, if I have a action

Re: [S2] How to separate Action from "FormBean"

2007-01-08 Thread cilquirm
Dariusz Wojtas wrote: > > Want to have a bean separate from the action and just reference it? > Define your bean (whatever you want) and just declare it as a variable > on your action. > Nothing more. > Add getter and setter. > > class MyAction ... { >private MyBeanClass myBean; > > } >