Re: Struts2 Conversation/OptimisticLockException Handling

2013-11-15 Thread Gabriel Belingueres
Hi Chris. One alternative is to use CDI which supports conversation scope too (I know there is a CDI plugin. I never used though). Last time I checked the spring- webflow integration was pretty outdated (it did not integrate with version 2.x). Another alternative is to go use JBoss Seam. I made

Re: Can't build 2.3.15-SNAPSHOT

2013-04-17 Thread Gabriel Belingueres
/107903711540963855921 Linkedin:http://www.linkedin.com/in/mauriziocucchiara VisualizeMe: http://vizualize.me/maurizio.cucchiara?r=maurizio.cucchiara Maurizio Cucchiara On 17 April 2013 03:52, Gabriel Belingueres belingue...@gmail.com wrote: Hi: I checked out the last version from svn

Can't build 2.3.15-SNAPSHOT

2013-04-16 Thread Gabriel Belingueres
Hi: I checked out the last version from svn and can't build it from sources (mvn clean install). Seems it worked on Apache's Jenkins though: Tests run: 701, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 25 sec FAILURE!

Re: Struts2 authentication, validation, and roles

2012-10-03 Thread Gabriel Belingueres
Hi: I took a look at the ServletPrincipalProxy class, and it just delegates to the current request object to resolve authorization queries. There is not much more to do, since it is how the servlet standard is defined (the HttpServletRequest interface is the only one to query). So implementing a

Re: Can we use the decorator pattern in Actions?

2012-10-03 Thread Gabriel Belingueres
If this is a recurring functionality (that is, you use it on several actions), then implementing it as an interceptor makes perfect sense. http://struts.apache.org/2.3.4.1/docs/writing-interceptors.html Gabriel 2012/10/3 Miguel Almeida mig...@almeida.at: I was speaking with Lukasz today about

Re: How to get instance of the given dependency using Container

2012-09-30 Thread Gabriel Belingueres
This is a two step process: You can define a String property to hold the name of the required instance to inject, and then inject the appropiate instance with the given name. For example you can define a constant: constant name=my.constant value=non-default-instance / bean

Re: Best place to define properties for plugin

2012-09-05 Thread Gabriel Belingueres
2012/9/4 Umesh Awasthi umeshawas...@gmail.com: I am in process to create a plugin and i need to pass provider class as well some other properties to the plugin bean class. though i can define them in side the plugin's xml file but want these properties to be configurable. I know of several

Re: StrutsTestCase, jUnit and file upload

2012-04-25 Thread Gabriel Belingueres
Coincidentally, yesterday I was struggling with testing a file upload. I was not using S2 as web framework but I was using Commons Fileupload, which IIRC is the default S2 upload component. I must say that my first strategy was trying to use Spring's MockMultipartHttpServletRequest and

Re: Struts2 session concurrency issue ?

2012-04-25 Thread Gabriel Belingueres
The S2 way of accessing the session is implementing the SessionAware interface. First you must realize that what you are putting on session scope is not the AtomicInteger per se, but its current value at the moment you call the first action, so unless you call the first action again, the value

Re: [Struts2] session variable empty in the JSP

2012-02-27 Thread Gabriel Belingueres
Post the code in which you actually set the attribute in the session scope. 2012/2/27 Samuel Robert samuelrobert@gmail.com: Hi, I faced few days ago a problem with the session variable in the JSP. I posted the problem here but did not get any solution:

Re: Security Vulnerability When Using SessionAware and Best Practice For Mitigating It

2012-02-27 Thread Gabriel Belingueres
I don't know if storing only immutable state in session is a Best Practice (if there exists such a thing as a best practice). Consider frameworks like JBoss Seam or Spring Web Flow with their support for conversations, which is basically mutable state stored in session scope. The case seems to

Re: [Struts2] session variable empty in the JSP

2012-02-27 Thread Gabriel Belingueres
)        ... 132 more On 27 February 2012 16:00, Gabriel Belingueres belingue...@gmail.comwrote: Post the code in which you actually set the attribute in the session scope. 2012/2/27 Samuel Robert samuelrobert@gmail.com: Hi, I faced few days ago a problem with the session variable

Re: admins, can you add something like [struts] before every subject

2012-01-13 Thread Gabriel Belingueres
Harder to filter is the Struts 1 vs Struts 2 thing. Some time ago was the [S1] and [S2] convention in the subject. How to solve that? Splitting the mailing lists seems problematic, though. 2012/1/13 Wes Wannemacher w...@wantii.com: On Fri, Jan 13, 2012 at 11:54 AM, Bogomil Shopov

Re: JSP help

2012-01-13 Thread Gabriel Belingueres
Isn't the variable defined in page scope? A single ${srtcld} EL expression should suffice. Gabriel 2012/1/13 Eric Reed ere...@mail.nysed.gov: Everyone, I know this has nothing to do with Struts but maybe someone one this mailing list has encountered this problem before. We have a massive

Re: Why the fielderrors in ValidationAwareSupport can't auto clear by itself?

2012-01-05 Thread Gabriel Belingueres
Are you using the chain result type? Are you storing the Action object itself into session scope and getting it back later? 2012/1/2 Dave Newton davelnew...@gmail.com: Are you using Spring? On Monday, January 2, 2012, cwalet cwal110...@gmail.com wrote: can't auto clear 是什么意思?

Re: Url tag usage in struts2 problem and solution

2012-01-05 Thread Gabriel Belingueres
I would search for el-ignored tags in your webapp's web.xml and tomcat's web.xml, and get rid of them. 2012/1/5 Łukasz Lenart lukasz.len...@googlemail.com: 2012/1/5 Dave Newton davelnew...@gmail.com: I might be wrong anyway, misread the post on my phone; not sure a var can be read through

[S2] Replacing some .ftl file from the simple theme inside a plugin

2011-12-17 Thread Gabriel Belingueres
Is there a safe way to override only a couple of files from the simple theme and bundle them inside a struts plugin? I mean, if I want to replace the simple theme's ftl files for the s:form tag (while keeping the theme name simple for maximum transparency) and distribute it in the

Re: How to StrutsJUnit4TestCase?

2011-08-08 Thread Gabriel Belingueres
must say I tend to Maurizios solution. I solves everything and is part of the struts 2 project. But I will watch your project from now on. Cheers! Christian On Wed, Aug 3, 2011 at 9:12 PM, Gabriel Belingueres belingue...@gmail.com wrote: There you go: http://code.google.com/p/struts2-junit

Re: How to StrutsJUnit4TestCase?

2011-08-08 Thread Gabriel Belingueres
ahve an interest in it too :-) Cheers Christian On Wed, Aug 3, 2011 at 7:54 PM, Gabriel Belingueres belingue...@gmail.com wrote: Hi, StrutsJUnit4TestCase is really tricky. I found few pointers in the web. I'm currently using it successfully for my modest testing

Re: How to StrutsJUnit4TestCase?

2011-08-03 Thread Gabriel Belingueres
Hi, StrutsJUnit4TestCase is really tricky. I found few pointers in the web. I'm currently using it successfully for my modest testing requirements, but you don't need to provide a web.xml file. When I say integration testing utility, I mean testing a full blown interceptor stack with your

Re: How to StrutsJUnit4TestCase?

2011-08-03 Thread Gabriel Belingueres
your code to google. Please ping this list once it is done - guess some others ahve an interest in it too :-) Cheers Christian On Wed, Aug 3, 2011 at 7:54 PM, Gabriel Belingueres belingue...@gmail.com wrote: Hi, StrutsJUnit4TestCase is really tricky. I found few pointers in the web. I'm

[ANN] struts2-junit utility classes for testing with JUnit 4

2011-08-03 Thread Gabriel Belingueres
Hi, I'd like to introduce this simple library, which is based on the StrutsJUnit4TestCase class that comes with the Struts 2 distribution. Usage This library is primarily intended for integration tests, meaning you can test your actions and interceptors against a complete struts interceptor

Re: [s2] Strange behaviour of s2 application behind reverse proxy

2010-06-17 Thread Gabriel Belingueres
that: ProxyPass /myApp http://serverHostname/myApp ProxyPassReverse /myApp http://serverHostname/myApp Thanks again! Jan -Ursprüngliche Nachricht- Von: Gabriel Belingueres [mailto:belingue...@gmail.com] Gesendet: Mittwoch, 16. Juni 2010 17:54 An: Struts Users Mailing List Betreff: Re: [s2

Re: [s2] Strange behaviour of s2 application behind reverse proxy

2010-06-16 Thread Gabriel Belingueres
Make sure your app server is correctly configured to return the font-end proxy values when you call: -request.getServerName() -request.getServerPort() Gabriel 2010/6/16 Jan Fröhlich jan.froehl...@infomotion.de: Hi all, after (nearly) finishing a struts2 project with struts 2.1.8.1 we have

Re: Modifying action mapping per device type

2010-01-29 Thread Gabriel Belingueres
mobile but doesn't on an old blackberry then I want to be able to create a tweaked page for one device, but all others would use the same page and mapping. Gabriel Belingueres wrote: How about using different packages/namespaces for the views? package name=package_blackberry namespace=/bb

Re: Modifying action mapping per device type

2010-01-28 Thread Gabriel Belingueres
How about using different packages/namespaces for the views? package name=package_blackberry namespace=/bb action name=login class=mypackage.LoginAction result name=success/bb/index.jsp/result /action /package package name=package_winmob namespace=/wm action name=login

Re: Chain Getting Original URI

2010-01-26 Thread Gabriel Belingueres
(I found the chain result type somewhat problematic, so I avoid it every time I can.) Having said that, if your action ONLY captures the exception, log it, email it and then forward the output to an error.jsp page, AND you are using Log4J you may find useful to attach more than one appender to

Re: validation in struts2

2010-01-20 Thread Gabriel Belingueres
the form tag is wrong? try: s:form action=doLogin namespace=/tricky 2010/1/19 Shasha sarada.i...@yahoo.com: Hi All, I am not able to get the validation errors from Login-validation.xml when i am using Modeldriven . Login-validation.xml   1. !DOCTYPE validators PUBLIC   2.        

Re: Problem with jsp and session on first call

2010-01-14 Thread Gabriel Belingueres
This way of obtaining a Session I think is not a good idiom. May be there are things that happens behind the scene when obtaining a session, that's probably why you are not getting a NPE the first time you call getSession(false) in your code...because something already created it. S2 have a Map

Re: Problem with jsp and session on first call

2010-01-14 Thread Gabriel Belingueres
, Gabriel Belingueres belingue...@gmail.com wrote: This way of obtaining a Session I think is not a good idiom. May be there are things that happens behind the scene when obtaining a session, that's probably why you are not getting a NPE the first time you call getSession(false) in your code...because

Re: Can I implement interface of another project in a struts 2 project?

2010-01-13 Thread Gabriel Belingueres
wonder what's the difference between putting jar in build path and putting jar in WEB-INF/lib. Appreciate Gabriel Belingueres-2 wrote: Seems it is not S2 related. This exception is raised when some dependency is not found by the JVM. Note that in addition to be available in your build path

Re: Define Global Timeout [S2]

2010-01-12 Thread Gabriel Belingueres
I don't know if you can make this work. IIRC, interceptor instances are created one by interceptor stack, so the same instance is shared by all requests that go through that stack. This makes the interceptor (at best) serialize all requests in its wait-notify cycle. However, I think it is buggy

Re: [S2] Does global exception mapping work with interceptor?

2010-01-12 Thread Gabriel Belingueres
Is your custom interceptor _before_ the exception interceptor in your interceptor stack? If that's the case, then the exception interceptor is not catching exceptions from your interceptor because it executes after. 2010/1/12 mailtolouis2020-str...@yahoo.com: Hello, I've defined a global

Re: Can I implement interface of another project in a struts 2 project?

2010-01-12 Thread Gabriel Belingueres
Seems it is not S2 related. This exception is raised when some dependency is not found by the JVM. Note that in addition to be available in your build path, the dependency must be available at runtime too (usually inside the WEB-INF/lib folder) 2010/1/12 fireapple taizhang1...@gmail.com: In

Re: How struts2 supports optgroup?

2010-01-12 Thread Gabriel Belingueres
http://struts.apache.org/2.1.8.1/docs/optgroup.html 2010/1/12 Emi Lu em...@encs.concordia.ca: Good afternoon, Could someone tell me how struts2 support optgroup please? Thanks a lot! -- Lu Ying select optgroup label=Australia option value =sydneySydney/option option value

Re: Distinguish between request parameters and struts.xml parameters in Struts2

2010-01-12 Thread Gabriel Belingueres
Implement interface ParameterAware: if the resource key is not in the parameter map, then the variable was set by other means than input parameters. 2010/1/12 JOSE L MARTINEZ-AVIAL jlm...@gmail.com:  Distinguish between request parameters and struts.xml parameters in Struts2 Hi all,  I'm

Re: validation question

2010-01-08 Thread Gabriel Belingueres
As a starting point you may check the freemarker .ftl files from the XHTML template. 2010/1/8 Robby Atchison rob...@msn.com: Hello,  I would like to know how an actionname-validation.xml is tied to the client-side validation.  I figure somewhere the xml file is read and Javascript is output.  

Re: How to nest Struts Tags

2010-01-08 Thread Gabriel Belingueres
}/ /s:iterator 2010/1/8 RogerV roger.var...@googlemail.com: Gabriel Belingueres-2 wrote: The s:iterator tag (without the var attribute) push the current item to the top of the ValueStack. s:property/ will get the value from the top of the stack. IMHO, I think this is a bad coding idiom

Re: Param Interceptor - Unable to save the data for Map of Lists

2010-01-07 Thread Gabriel Belingueres
You didn't attach the action source code, but I guess you are not instantiating the Map before the ParameterInterceptor is executed. I can think of 3 choices to do that: 1) instantiate the Map in the same place you declare the instance variable: MapString, ListObject textMap = new

Re: freemarker error in select tag

2010-01-07 Thread Gabriel Belingueres
Please post the S2 version number, the s:select tag you are using together with the action code to initialize the select list/map. 2010/1/7 Johannes Geppert jo...@web.de: Hello, today i got this error while rendering an simple select box. 2010-01-07 11:08:41,420 ERROR

Re: How to nest Struts Tags

2010-01-07 Thread Gabriel Belingueres
The s:iterator tag (without the var attribute) push the current item to the top of the ValueStack. s:property/ will get the value from the top of the stack. IMHO, I think this is a bad coding idiom. I don't like to think too much where the data came from. HTH 2010/1/7 RogerV

Re: Action Approach

2010-01-07 Thread Gabriel Belingueres
I think the answer would depend of what your model objects look like. If your Catalog object have 2 boolean variables (active and primary) then holding a MapCatalogPrimaryKey,Catalog on your action (session scoped) is a straightforward solution. (name your checkbox catalogMap[pk].active and

Re: Need your input.

2010-01-06 Thread Gabriel Belingueres
If you will submit multiple EmpBean, your action will need some sort of CollectionEmpBean (a List or Map I commonly use) with its getter setter. You must name correctly your input parameters so that the ParameterInterceptor assign them right, that is, you name it as the collection variable,

Re: Is there any way in Struts2 to handle session sharing accross browsers

2009-12-30 Thread Gabriel Belingueres
Session data handling is the same for all frameworks based on the Servlet and JSP specification, and AFAIK S2 doesn't provide any helper to handle it differently (one exception is the token interceptor to avoid double submits.) I think you should design the application specifically to handle this

Re: how to access struts2 propery from jsp or vice versa

2009-12-26 Thread Gabriel Belingueres
something like this? result name=someRedirectResult type=redirect http://www.blahblah.com/something?param1=${value1}param2=${value2} /result Here, value1 and value2 are searched in the value stack (usually your action object is at the top of the stack). 2009/12/24 Wes Wannemacher

Re: UI Component - ${parameters.paramName} not working

2009-12-23 Thread Gabriel Belingueres
I have no useful thing to say about your particular problem with this s:component tag, but if you are rendering JSP pages, then you may well find it more compelling to create a custom tag file, hence avoiding the Freemarker scripts. 2009/12/23 Vitor E. Silva Souza vitorso...@gmail.com: Hello

Re: if tag with #parameters

2009-12-22 Thread Gabriel Belingueres
Yes, parameters are String arrays. As a side note, see the following post because sometimes OGNL evaluates things differently: http://www.mail-archive.com/user@struts.apache.org/msg80015.html 2009/12/22 foo bar linut...@gmail.com: Hi, I would prefer not to use getter/setter. What I really

Re: Test fails when building XWork

2009-12-19 Thread Gabriel Belingueres
solved it. I forgot that I have a JAVA_HOME env variable pointing to a Java5 version...changed it to Java 6 and worked OK. Funny that I didn't get any compilation error... Thanks! 2009/12/19 Lukasz Lenart lukasz.len...@googlemail.com: 2009/12/18 Gabriel Belingueres belingue...@gmail.com: I

Re: Test fails when building XWork

2009-12-18 Thread Gabriel Belingueres
of configuration problem since I have the last version available on trunk. Again my configuration is: WinXP, Java 6, maven 2.2.1, command: mvn clean install. 2009/12/17 Gabriel Belingueres belingue...@gmail.com: Thanks Lukasz! Yes it was a connection problem. I had configured the proxy settings

Re: Problem with value attribute in select tag

2009-12-18 Thread Gabriel Belingueres
I believe that the value attribute is not used in this tag. 2009/12/18 Philipp Leusmann philipp.leusm...@rwth-aachen.de: Hi, what exactly does the value-attribute of the select tag require? Is it one element of the list provided to the list-argument? Or is it the value which eventually

Re: Test fails when building XWork

2009-12-18 Thread Gabriel Belingueres
I checked out it from https://svn.opensymphony.com/svn/xwork/trunk I deleted everything and checkout'd it again and still the same test fail. 2009/12/18 Lukasz Lenart lukasz.len...@googlemail.com: That's a bit strange, you can check with Bamboo that everything is ok

Test fails when building XWork

2009-12-17 Thread Gabriel Belingueres
Hi, I'm getting the following test failure where building XWork (from trunk). Maven version 2.2.1 command: mvn clean install --- Test set: TestSuite

Re: Test fails when building XWork

2009-12-17 Thread Gabriel Belingueres
= clean install) 2009/12/17 Lukasz Lenart lukasz.len...@googlemail.com: 2009/12/17 Gabriel Belingueres belingue...@gmail.com: What am I missing? Connection to the Internet - you're probably behind a firewall :P Regards -- Lukasz http://www.lenart.org.pl

Re: MySQL + JDBC

2009-12-15 Thread Gabriel Belingueres
I don't think it is directly related to Struts. From what I googled, seems more like a 32-bit/64-bit component mismatch than a Struts issue. On what JDK/JRE version are you running your app server? it is a 32 bit version of java? or a 64 bits version? Your odbc driver is 32 bits or 64 bits? are

Re: Unique Id creation

2009-12-15 Thread Gabriel Belingueres
I use File.createTempFile: http://java.sun.com/j2se/1.5.0/docs/api/java/io/File.html#createTempFile(java.lang.String,%20java.lang.String,%20java.io.File) Then I relate the uploaded filename with the saved temp file name in a database table. Gabriel 2009/12/15 Todd Grigsby

Re: MySQL + JDBC

2009-12-14 Thread Gabriel Belingueres
What do you mean by I need to use ODBC to abstract the database connection.?? In most (all?) web containers I know about, there is a standard way of abstract out the database connection and it is by declaring a javax.sql.DataSource, which you can get it from JNDI (which is pretty standard too.)

[S2] problem setting parameters inside a Map

2009-10-14 Thread Gabriel Belingueres
Hi, I have problems trying to set request parameters into a MapInteger,String. My input form have a form with some hidden input: s:hidden name=mymap[1234] value=YES/ s:hidden name=mymap[45] value=YES/ And in my Action have a private Map (with its getter and setter): private MapInteger,String

Re: [S2] problem setting parameters inside a Map

2009-10-14 Thread Gabriel Belingueres
meh never mind...it was a validation.xml file that I was unaware of (without the action name in the middle of the file name) and this _short-circuited_ validaton was failing and the parameter never got a chance. Solved. 2009/10/14 Gabriel Belingueres belingue...@gmail.com: Hi, I have problems

global mappings with Convention plugin

2009-01-27 Thread Gabriel Belingueres
Hi, I'm starting to use the new 2.1.6 convention plugin, trying to mentally map the struts.xml file to annotations. I could not find in the docs how to define the global-results and global-exception-mappings. I usually define an abstract package in struts.xml where I define the global-results

Re: What are Pros and Cons for Struts 2?

2008-11-07 Thread Gabriel Belingueres
Pros: Easy to learn and start with (some free books available.) Great community (mailing list.) Very extensible. Cons: Sporadic releases. Javascript validation framework is very limited for non ajax apps. Multiple rendering technologies make their component model hard to modify or extends

ExecuteAndWaitInterceptor test too fragile?

2008-10-24 Thread Gabriel Belingueres
Hi, Compiling S2 v2.1.3 I find that sometimes the ExecuteAndWaitInterceptorTest.testOneWaitWithDelay() test fails on delay should be ca. 200 millis assertion, and other times it passes OK. I'm currently not very familiarized with the ExecuteAndWaitInterceptor to modify it myself, but is the any

Re: Struts2 Collection validation

2008-10-16 Thread Gabriel Belingueres
You may want to look at type conversion [1] and VisitorValidator [2] to validate those form fields. Also, please note that collection indexing is done with [square] brackets, like in: persons[2].name [1]

Re: session based pojo as form variables

2008-10-10 Thread Gabriel Belingueres
Because the textfield name is actually firstName, and because you don't have a setFirstName(String) method in your action, the parameter is never set. Either you have to: 1) write s:textfield name=formBean.firstName label=First Name size=16 / without the s:push, or 2) if you are more comfortable

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

2008-10-08 Thread Gabriel Belingueres
AFAIK, the only thing that can be localized are the validation messages, not the validation files per sé. 2008/10/8 [EMAIL PROTECTED]: Any idea how to get language specific validations? e.g. SomeAction-validation_fr.xml Scott On Mon, Oct 6, 2008 at 11:24 AM, Chris Pratt [EMAIL

Re: simple vs xhtml theme, validation question

2008-10-08 Thread Gabriel Belingueres
You can do it by hand though: s:if test=getFieldErrors() != null getFieldErrors()['myfield'] != null s:fielderror s:param value=%{'myfield'}/ /s:fielderror /s:if In addition, if you are using S2.1, then you have a basic error handling. Each tag has an cssErrorClass and cssErrorStyle

Re: use property of iterator

2008-10-04 Thread Gabriel Belingueres
use the s:set tag http://struts.apache.org/2.1.2/docs/set.html 2008/10/4 Hardik Shah [EMAIL PROTECTED]: how to use iterator property as variable suppose s:iterator value=attributelist id=attriblist %int prevAttrId=-1; % tr tds:property

Re: struts2 , freemarker email template

2008-10-03 Thread Gabriel Belingueres
With Spring this is pretty much easy to do. 2008/10/3 Leonidas Papadakis [EMAIL PROTECTED]: Hi there, i would like to ask what is the best way to implement a mechanism that from inside an action i will read a freemarker template file , set the values, merge it and send it by html email ...

Re: Struts 2 Ajax DateTime Picker compatibility with FireFox 3

2008-09-30 Thread Gabriel Belingueres
I had no issues using the datetimepicker with FF3. Maybe your problems are related with the following post: http://dojotoolkit.org/forum/dojo-0-4-x-legacy/dojo-0-4-x-support/firefox-3-and-struts-2-theme-ajax-render-issues 2008/9/30 Abhinav Sharma [EMAIL PROTECTED]: I am using inbuilt struts 2

Re: Preparable influence hibernate transaction management when using OpenSessionInViewFilter

2008-09-29 Thread Gabriel Belingueres
commits the session and perform the update? I thought it is read-only? But I agree with your idea and and I can see that from the logs the session is closed with the hibernate update. I just do not know why and how this happens. cheers Jack Gabriel Belingueres-2 wrote: I suspect

Re: Accessing id bean-property (not tag attribute) in freemarker template

2008-09-29 Thread Gabriel Belingueres
Where is your bean stored? It is pushed into the value stack? is it in page? request? session? 2008/9/29 Sven Grünewald [EMAIL PROTECTED]: Hi, can anybody help my? I can't acces a bean property id in a modified freemarker template. I can access all other properties with simple OGNL expression

Re: Accessing id bean-property (not tag attribute) in freemarker template

2008-09-29 Thread Gabriel Belingueres
$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619) Gabriel Belingueres schrieb: Did you tried using something like: #assign myId = stack.findValue('bean.id')/ 2008/9/29 Sven

Re: unable to invoke Action class from my custom servlet

2008-09-29 Thread Gabriel Belingueres
I would use response.sendRedirect(String) 2008/9/29 Vineet [EMAIL PROTECTED]: Hi I'm trying to invoke the Struts Action class through a Custom Servlet made by me which is accepting request from outside world and based on a specific parameter i need to redirect the request to appropriate

Re: Accessing UIBean property value in action class

2008-09-27 Thread Gabriel Belingueres
If I understood it correctly, inside the custom tag you can evaluate an expression like getRandomString(#attr.lengthAttr) against the ValueStack that will call the getRandomString(int) method on your action, then you can render that returned string. 2008/9/27 ManiKanta G [EMAIL PROTECTED]: I've

Re: custom tags and struts

2008-09-27 Thread Gabriel Belingueres
You can change the tag's rtexprvalue attribute to true to allow EL expressions in S2 tags. Or you can replace s:property value=${property}/ with s:property value=#attr.property/ 2008/9/27 Gianluca Musella [EMAIL PROTECTED]: Thank you Dave, it's works using almayer:dummy

Re: Accessing UIBean property value in action class

2008-09-26 Thread Gabriel Belingueres
What do you mean by access those attribute values in the requested action class.? By the time the custom tag is executing, the action class was already executed. 2008/9/26 ManiKanta G [EMAIL PROTECTED]: Put it as a hidden variable in the template??? Wont it work. Thanks for the tip. But it

Re: Preparable influence hibernate transaction management when using OpenSessionInViewFilter

2008-09-25 Thread Gabriel Belingueres
I suspect that in case A) you are just creating a new POJO in memory (never linked to the Hibernate's Session), that's why the OpenSessionInViewFilter does nothing. In case B), you are loading into the Session the POJO in the prepare method. When submit the form, it is loaded again before

Re: Custom tag and map-backed action

2008-09-23 Thread Gabriel Belingueres
systems is sort of meaningless. Scott On Mon, Sep 22, 2008 at 7:53 PM, Gabriel Belingueres [EMAIL PROTECTED]wrote: I don't know but I hope not, since I don't want my expressions to reduce to different data types depending if there is a number or not in them! Even if abc would reduce

Re: Custom tag and map-backed action

2008-09-23 Thread Gabriel Belingueres
type is specifically spelled out and the framework decides a type diametrically opposed, this is a problem.:teeth: Gabriel Belingueres-2 wrote: AFAIK, OGNL does not have any support for generics, but even if it would support it, I would prefer that it wont be too smart, for example

Re: Struts 2 Prepare Interceptor, CRUD Pattern and Optimistic Locking

2008-09-22 Thread Gabriel Belingueres
I agree that using the paramsPrepareParams is not the ideal stack to handle optimistic locking. However, assuming that you are not losing the original version number (for example if you are submitting it as a hidden field of your edit form), and you can reassign it to the appropriate POJO field

Re: Custom tag and map-backed action

2008-09-22 Thread Gabriel Belingueres
Interesting. Seems it is a feature, as documented in [1]. Tested it myself: s:property value=1234h.class.name / s:property value=1234b.class.name / s:property value=1234F.class.name / s:property value=1234L.class.name / s:property value=1234d.class.name / s:property value=(1234).class.name / The

Re: Custom tag and map-backed action

2008-09-22 Thread Gabriel Belingueres
, Sep 22, 2008 at 3:47 PM, Gabriel Belingueres [EMAIL PROTECTED]wrote: Interesting. Seems it is a feature, as documented in [1]. Tested it myself: s:property value=1234h.class.name / s:property value=1234b.class.name / s:property value=1234F.class.name / s:property value=1234L.class.name

Re: session based pojo as form variables

2008-09-20 Thread Gabriel Belingueres
; } public void setMessage(String message) { this.message = message; } public String getTarget() { return target; } public void setTarget(String target) { this.target = target; } } Gabriel Belingueres wrote: Could you

Re: session based pojo as form variables

2008-09-20 Thread Gabriel Belingueres
928572663 I can not disagree more with you. First we can not have the whole picture of your problem because only you are in front of your screen and your system, so we just make an educated guessing, so the more information you supply, the better. You didn't supply your struts.xml file for

Re: s:property tags nested

2008-09-19 Thread Gabriel Belingueres
If I understood correctly, and without knowing why you only want a single jsp file (main.jsp) for showing different things, the simplest solution I can think of is asking for some value assigned when you click the users or groups links: s:if test=clicked the users link here goes the users table

Re: session based pojo as form variables

2008-09-19 Thread Gabriel Belingueres
page. Thanks. Gabriel Belingueres wrote: You need to instantiate your formBean before the interceptor stack tries to set the parameters. Common points in your code where you can accomplish that are: instantiating the object when declared as an instance variable, inside a constructor of your

Re: [S2] not including null-params in URL of GET-submitted form

2008-09-18 Thread Gabriel Belingueres
try disabling the empty fields in the form's onsubmit event. 2008/9/18 Laurie Harper [EMAIL PROTECTED]: Pierre Thibaudeau wrote: Is there a way to avoid null-valued (or empty-valued) parameters to be explicitely mentioned in the URL generated by a form submitted through the GET method? For

Re: s:property tags nested

2008-09-18 Thread Gabriel Belingueres
Could you provide more details of what are you trying to accomplish? 2008/9/18 Alejandro77 [EMAIL PROTECTED]: Good morning. I want to make the following order: s:property value=s:property value=property / / With this order pretend that the value of attribute value of the first tag

Re: session based pojo as form variables

2008-09-17 Thread Gabriel Belingueres
I've never used a form field name like #session.formBean.firstName before, but if you refactor your code a little: Make your action implement SessionAware interface and put a formBean getter/setter in your actions (or some superclass of your wizard actions), which takes it from the session:

action method not called by s:if

2008-09-17 Thread Gabriel Belingueres
Hi, I came across which I believe is a weird OGNL behavior: I have an action B which extends from action A which extends from ActionSupport (executing using the defaultStack) In my struts.xml file I have an action defined this way: action name=listing class=B result

Re: action method not called by s:if

2008-09-17 Thread Gabriel Belingueres
Yes something else was happening...me! I've mistakenly been written this method in some other subclass C of A (which was not the executing action.) what a waste of time...sorry... 2008/9/17 Dave Newton [EMAIL PROTECTED]: --- On Wed, 9/17/08, Gabriel Belingueres wrote: The surprising thing

Re: session based pojo as form variables

2008-09-17 Thread Gabriel Belingueres
initialized yet, because the displayForm() action function hasn't been called yet. This is the function that creates the pojo form bean. Gabriel Belingueres wrote: I've never used a form field name like #session.formBean.firstName before, but if you refactor your code a little: Make your action

Re: Datetimepicker and client-side validation

2008-09-12 Thread Gabriel Belingueres
There is no client side date validator in the default themes. I added a basic one in the xhtml theme for use with the datetimepicker; it has a hardcoded date format though (dd/MM/). To add it, open your xhtml theme's form-close-validate.ftl file, and as the last option add the following

Re: JBoss 5 RC1 and Struts 2 : Simple validation error (URI scheme is not file)

2008-09-11 Thread Gabriel Belingueres
replaceAll( , %20) ? Why not URL-encode it? [1] [1] http://java.sun.com/j2se/1.5.0/docs/api/java/net/URLEncoder.html 2008/9/11 Bobby Mitch [EMAIL PROTECTED]: Well, I am willing to try then. Can someone send me that xwork-2.0.4.jar version, recompiled with the modifications described here

Re: Struts2 Iterator tag problem

2008-09-10 Thread Gabriel Belingueres
Something like this: s:interator var=tempList value=dataList s:iterator var=number value=#tempList /s:iterator /s:iterator 2008/9/10 amolbehl [EMAIL PROTECTED]: Hi I am trying to display a ArrayList of lists using struts2 iterator tag. private void dataReady(){

Re: Stream Windows Executable From Linux Machine

2008-09-08 Thread Gabriel Belingueres
I was actually intrigued by the fact that the content length in the stream result is actually setting the content-length HTTP header [1], which from the HTTP doc it represents the message body length, but I'm not sure that the message body length is EXACTLY the same as the attached file size. I

Re: Multiple methods validation with custom result strings

2008-09-08 Thread Gabriel Belingueres
You can try by letting your action implements the ValidationWorkflowAware interface. 2008/9/7 Keios Titan [EMAIL PROTECTED]: I have a quick question. I am using S2. I have multiple methods exposed in my action and more than one method has forms attached to it. If I use the

Re: [struts] Stream Windows Executable From Linux Machine

2008-09-08 Thread Gabriel Belingueres
Thanks Dale! I actually just sniffed my connection and Tomcat is adding the Content-Length by itself when attachment. On the other hand, is not adding the Content-Length when content disposition is inline. 2008/9/8 Dale Newfield [EMAIL PROTECTED]: Gabriel Belingueres wrote: I wonder if all

Re: Stream Windows Executable From Linux Machine

2008-09-05 Thread Gabriel Belingueres
filename= setup.exe is there an space there? (try removing it) what you mean by corrupt? 2008/9/5, Geffrey Caruso [EMAIL PROTECTED]: Quick question for anyone who's tried this before. I've got a windows executable created using NSIS from a wrapped jar file. I've got the following Stream

Re: Stream Windows Executable From Linux Machine

2008-09-05 Thread Gabriel Belingueres
figured it out, I had to remove the contentLength parameter from the results XML. After I did that it started working fine on Linux. -Original Message- From: Gabriel Belingueres [mailto:[EMAIL PROTECTED] Sent: Friday, September 05, 2008 10:15 AM To: Struts Users Mailing List Subject

Re: struts2 s:select/ How to get a option item which can invoke a action or redirect another URL

2008-09-04 Thread Gabriel Belingueres
AM, Gabriel Belingueres [EMAIL PROTECTED] wrote: Don't know if I understand correctly your question, but from what I understand you want a javascript function that redirect to some web site when the option is selected? There are plenty of examples in the web for doing that [1]. [1

  1   2   3   >