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

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 : > jayakumar ala wrot

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 : > 2009/12/17 Gabriel Belingueres : >> What am I missing? > > Connection to the Internet - you're probably behind a firewall :P > > > Regards > -- >

Re: Test fails when building XWork

2009-12-18 Thread Gabriel Belingueres
mber. Must be some kind 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 : > Thanks Lukasz! > > Yes it was a connection problem. I had configured

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 : > 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 makes the value-attribute of

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 : > That's a bit strange, you can check with Bamboo that everything is ok > http://opensource.bamboo.atlassian.com/browse/XWORK > >

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 : > 2009/12/18 Gabriel Belingueres : >> I checked out it from https://svn.op

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 : > Hi, > > I would prefer not to use getter/setter. > What I really want to know is,

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 : > Hello all, > > I'm creating a

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

2009-12-26 Thread Gabriel Belingueres
something like this? http://www.blahblah.com/something?param1=${value1}¶m2=${value2} 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 : > There is an http header result type and two redirect result typ

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: Need your input.

2010-01-06 Thread Gabriel Belingueres
If you will submit multiple EmpBean, your action will need some sort of Collection (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, indexed by

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: Map textMap = new HashMap(); 2) instantiate the

Re: freemarker error in select tag

2010-01-07 Thread Gabriel Belingueres
Please post the S2 version number, the tag you are using together with the action code to initialize the select list/map. 2010/1/7 Johannes Geppert : > > Hello, > > today i got this error while rendering an simple select box. > > 2010-01-07 11:08:41,420 ERROR (freemarker.runtime:96) - > Error on

Re: How to nest Struts Tags

2010-01-07 Thread Gabriel Belingueres
The tag (without the var attribute) push the current item to the top of the ValueStack. 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 : > > Hi > > > >         >       >   >

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 Map on your action (session scoped) is a straightforward solution. (name your checkbox "catalogMap[pk].active" and "catalogMap[pk].primary") If

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 : > 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.  I'm having t

Re: How to nest Struts Tags

2010-01-08 Thread Gabriel Belingueres
name the current iterated object, something like that: 2010/1/8 RogerV : > > > > Gabriel Belingueres-2 wrote: >> >> The tag (without the var attribute) push the current item >> to the top of the ValueStack. >> will get

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 si

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 : > Hello, > > I've defined a global exception mapping and global res

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 : > > In project1, I include proj

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 : > Good afternoon, > > Could someone tell me how struts2 support "optgroup" please? > > Thanks a lot! > -- > Lu Ying > > > > > Sydney > Melbourne > > > Cromwell > Queenstown > > > >

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 : >  Distinguish between request parameters and struts.xml parameters in Struts2 > > Hi all, >  I'm trying to disti

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

2010-01-13 Thread Gabriel Belingueres
r 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 addi

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
sion. > > Thanks ! > > Cimballi > > > On Thu, Jan 14, 2010 at 5:31 PM, Gabriel Belingueres > 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 >> sessi

Re: validation in struts2

2010-01-20 Thread Gabriel Belingueres
the form tag is wrong? try: 2010/1/19 Shasha : > > Hi All, > > I am not able to get the validation errors from Login-validation.xml when i > am using Modeldriven . > > Login-validation.xml >   1.   2.         "-//OpenSymphony Group//XWork Validator 1.0.2//EN" >   3.         "http://www.opensym

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 the

Re: Modifying action mapping per device type

2010-01-28 Thread Gabriel Belingueres
How about using different packages/namespaces for the views? /bb/index.jsp /wm/index.jsp 2010/1/28 Marcus Bond : > Hi, > > I am wanting to implement a site such that some actions may have a different > mapping depending upon the device used (e.g. regular

Re: Modifying action mapping per device type

2010-01-29 Thread Gabriel Belingueres
ce, but all > others would use the same page and mapping. > > Gabriel Belingueres wrote: >> >> How about using different packages/namespaces for the views? >> >> >>     >>        /bb/index.jsp >>     >> >> >> >>     &

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 : > Hi all, > > > > after (nearly) finishing a struts2 project with struts 2.1.8.1 we have an odd > issue testing

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

2010-06-17 Thread Gabriel Belingueres
Reverse Proxy configuration looks like that: > ProxyPass /myApp http://serverHostname/myApp > ProxyPassReverse /myApp http://serverHostname/myApp > > Thanks again! > > Jan > > -Ursprüngliche Nachricht- > Von: Gabriel Belingueres [mailto:belingue...@gmail.com] &

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 actions

Re: How to StrutsJUnit4TestCase?

2011-08-03 Thread Gabriel Belingueres
ed 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 > wrote: >> Hi, >> >> StrutsJUnit4TestCase is really tricky. I fo

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

Re: How to StrutsJUnit4TestCase?

2011-08-08 Thread Gabriel Belingueres
le. I have > mentioned this on the other mail to Maurizio. > > At the moment I 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,

Re: How to StrutsJUnit4TestCase?

2011-08-08 Thread Gabriel Belingueres
https://builds.apache.org/job/Struts2/334/org.apache.struts$struts2-junit-plugin/ >>> > [2] >>> > >>> https://issues.apache.org/jira/browse/WW-3667?focusedCommentId=13079421&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#

[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 tag (while keeping the theme name "simple" for maximum transparency) and distribute it in the "/template/simpl

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 : > Are you using Spring? > > On Monday, January 2, 2012, cwalet wrote: >> can't auto clear 是什么意思? >>

Re: Url tag usage in struts2 problem and solution

2012-01-05 Thread Gabriel Belingueres
I would search for tags in your webapp's web.xml and tomcat's web.xml, and get rid of them. 2012/1/5 Łukasz Lenart : > 2012/1/5 Dave Newton : >> I might be wrong anyway, misread the post on my phone; not sure a var can >> be read through plain JSP EL like that-don't recall. > > As I remember it s

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 : > On Fri, Jan 13, 2012 at 11:54 AM, Bogomil Shopov > wrote: >> On 13 January 2

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 : > 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 project that I a

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 : > 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: > http://stackoverflow.com/questions/9381991/session-variab

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
rg.mortbay.jetty.servlet.Dispatcher.include(Dispatcher.java:192) >        at > org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:1013) >        at > org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:698) >        at > org.apache.tiles.jsp.

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 MockMultipa

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 s

Re: Best place to define properties for plugin

2012-09-05 Thread Gabriel Belingueres
2012/9/4 Umesh Awasthi : > 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 ways of doing this:

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: @Inject(value="my.constant") public void setConstant(String value) {

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 : > I was speaking with Lukasz today about this, so I'm resu

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! testValidationAnnotation(com.opensymphony.xwork2.validator.AnnotationV

Re: Can't build 2.3.15-SNAPSHOT

2013-04-17 Thread Gabriel Belingueres
tter.com/m_cucchiara > > G+ :https://plus.google.com/107903711540963855921 > > Linkedin:http://www.linkedin.com/in/mauriziocucchiara > > VisualizeMe: http://vizualize.me/maurizio.cucchiara?r=maurizio.cucchiara > > > > Maurizio Cucchiara > > > > > &g

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 m

[S2] problem setting parameters inside a Map

2009-10-14 Thread Gabriel Belingueres
Hi, I have problems trying to set request parameters into a Map. My input form have a form with some hidden input: And in my Action have a private Map (with its getter and setter): private Map mymap = new HashMap(); however I can't get the request parameters assigned to the Map. I'm using

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 : > Hi, > > I have problems tryi

[S2] Why Interceptors implements Serializable?

2007-09-26 Thread Gabriel Belingueres
Hi, I've found intriguing that the Interceptor interface extends from Serializable. Why is that? I mean, if interceptors need to be stateless then there is no state to save/restore. Or is it because they are stored in application scope? Gabriel -

Re: Where are the logic: tags?

2007-10-01 Thread Gabriel Belingueres
To use the s:select tag you need to somehow put the consecutive integers into a collection or Iterator. AFAIK there is no way to define this collection easily using OGNL or JSTL (something like comprehension lists in Haskell). 2007/10/1, Marcos Hernandez <[EMAIL PROTECTED]>: > Thanks Cesar, but th

Re: Setting/Accessing List Size on JSP

2007-10-01 Thread Gabriel Belingueres
try: 2007/10/1, Cory D. Wiles <[EMAIL PROTECTED]>: > How do I set/display the size of my list in the result of my jsp? I am able > to check for the size in my iterator tag, but I would like to be able to > display the size as a property. > > > I have tried the following and it didn't work. > >

Re: [S2] Indexed properties

2007-10-11 Thread Gabriel Belingueres
You are not the only one that thinks so. There are some OGNL expression issues involved that are confusing too: in the s:param: won't work (the same expression as the textfield) But s:param evaluates the expression in a different way when placing it as a child: referidos[%{#stat

Re: Disable validation when "delete" button is pressed

2007-10-17 Thread Gabriel Belingueres
I've solved this by changing the action in the form: but you must rename your CustomerCRUD-validation.xml file to CustomerCRUD--validation.xml file. Just don't define any validation file for the delete action. 2007/10/17, Igor Vlasov <[EMAIL PROTECTED]>: > > Hello. > > I have > > > >

[S2] Problem with simple theme javascript validation

2007-10-23 Thread Gabriel Belingueres
Hi, I'm trying to perform some basic javascript validation using a form with the simple theme. I just added the onsubmit parameter in the form tag: but the form is ALWAYS posted, so there might be an error somewhere. Looking at the html source code, the form.ftl template generates so this i

Re: [OT] Write a thread to check database in web application

2007-11-06 Thread Gabriel Belingueres
Hi, If you are deploying on a full blown EJB container, you can use the TimerService too. I personally used Spring to run periodic TimerTasks and it works well. You don't need to use Quartz if your scheduling needs are simple (like run each 10 minutes). 2007/11/5, Antonio Petrelli <[EMAIL PROTEC

Re: isUserInRole on JSP page...

2007-11-16 Thread Gabriel Belingueres
I personally tried with struts tags and JSTL tags I decided to give up after a while (I solved it by creating my own isUserInRole tag.) This in fact would be a nice addition to the struts 2 tags, it even can be implemented by delegating to the if tag implementation, so that you can have automatic

Re: Application initialization at startup

2007-11-30 Thread Gabriel Belingueres
you could use a servlet context listener. Gabriel 2007/11/30, Shyamal Mehta <[EMAIL PROTECTED]>: > For struts 2 what is the recommended/best way of executing any > application specific code at application startup? > In struts 1.x we used to create a plugin and configure its > "startOnLoad" proper

[S2] Log4J error on application stop

2007-12-10 Thread Gabriel Belingueres
Hi, Tomcat's log is displaying this text when I stop the application (and when I shutdown the server too): log4j:ERROR LogMananger.repositorySelector was null likely due to error in class reloading, using NOPLoggerRepository. I googled about it but there is not too much information yet, only tha

Re: ExceptionHandling in Struts2.0

2007-12-17 Thread Gabriel Belingueres
http://struts.apache.org/2.0.11/docs/exception-configuration.html 2007/12/17, Rajasekhar <[EMAIL PROTECTED]>: > > hi > how can i use Exception Handling in struts2.0 > does anyone have information pls send me > > Best Regards, > > Rajasekhar Yenduva B.tech(IT), > Jr J2EE Developer, > Miracle Soft

Re: Why two struts2 projects can not exsits in one server at one time

2007-12-23 Thread Gabriel Belingueres
Are you _actually_ starting up two JBoss servers with identical port configurations in the same computer? Please provide us with more information. Gabriel 2007/12/23, Ray <[EMAIL PROTECTED]>: > So it's because two projects can not use the same port number right? > thank u. > > -- > Ray Chen > Em

Re: [S2] Opening a new window upon a link click without Javascript

2008-01-03 Thread Gabriel Belingueres
AFAIK, the tag is best used when designing ajax applications, meaning the usual interaction is to update the same browser window. I would stay with the common HTML anchor tag to open a new window. Gabriel 2008/1/3, Al Sutton <[EMAIL PROTECTED]>: > Heres channelge for the day... > > I have a pa

[S2] OpenSessionInView implementation with Spring

2008-01-09 Thread Gabriel Belingueres
Hi, I'm developing a new application using S2 + Spring 2.0 + Hibernate 3.2.5. I wanted to know which would be the best way of implementing the Open Session in View pattern in S2: Is there any standard implementation for S2? I''ve seen it implemented as a servlet filter, but I think it would be g

[S2] How to allow escaping or HTML characters in ?

2008-01-28 Thread Gabriel Belingueres
Hi, I need a in my page for selecting an option, showing a tree-like structure, so I need to indent some way the option elements into the HTML , however, the tag doesn't allow me to use the HTML space ( ) for indentation, since it does escape it by default producing output like:  My de

Re: Dynamic indexed field name in validation?

2008-02-28 Thread Gabriel Belingueres
I had got the same problem some time ago. I couldn't specify an expression for the validator to iterate for each element of the collection. I finally opted for writing a validation method in the action class. 2008/2/10, j alex <[EMAIL PROTECTED]>: > I used a custom validator to loop thru each elem

Re: Conversation Scope?

2008-03-04 Thread Gabriel Belingueres
Why model-driven? I don't fully get it. I've done several S2 apps by now and never fell the time to use the model driven interface before (for me this is syntax sugar.) Now why is this important for supporting conversation scope? Is it for not writing code like ${conversationsMap[conversationId].m

Re: Conversation Scope?

2008-03-04 Thread Gabriel Belingueres
utes? > http://struts.apache.org/2.0.6/docs/head.html > > or a separate "s:conversation" tag ? > > M- > - Original Message - > From: "Gabriel Belingueres" <[EMAIL PROTECTED]> > To: "Struts Users Mailing List" > Sent: Tuesday

Re: Struts2 Iterator tag problem

2008-09-10 Thread Gabriel Belingueres
Something like this: 2008/9/10 amolbehl <[EMAIL PROTECTED]>: > > Hi I am trying to display a ArrayList of lists using struts2 iterator tag. > > > private void dataReady(){ > for (int itr = 0; itr < this.HOURS; itr++) { > tempList = new Array

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 descri

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 lines

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

action method not called by

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: listing.jsp my listing.jsp: ... ... Now, hasPanding

Re: action method not called by

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

Re: session based pojo as form variables

2008-09-17 Thread Gabriel Belingueres
); > } > > however, when the interceptor calls setSession() my formBean object hasn't > been initialized yet, because the displayForm() action function hasn't been > called yet. This is the function that creates the pojo form bean. > > > > > Gabriel Beling

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 met

Re: 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: > > " /> > > With this order pretend that the value of attribute value of the first tag > is dynamic but gives an error. > Does

Re: 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: here goes the users table here goes the groups table

Re: session based pojo as form variables

2008-09-19 Thread Gabriel Belingueres
y work? > > This sounds like a good idea for a new cookbook 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 >

Re: session based pojo as form variables

2008-09-20 Thread Gabriel Belingueres
; >> >> import java.util.Map; >> >> import org.apache.struts2.config.Result; >> import org.apache.struts2.config.Results; >> import org.apache.struts2.interceptor.SessionAware; >> import org.apache.struts2.views.tiles.TilesResult; >> >> >>

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

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: The last one (Integer) didn't work without the ( ), which I don't know if this is a necessity or a bug. What about Short and Byte data type? it doesn't say... However, I think is NOT a bug that employees[1234F].id

Re: Custom tag and map-backed action

2008-09-22 Thread Gabriel Belingueres
#x27;:emp2, 'ghi':emp3? > > Peace, > Scott > > On Mon, 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: >> >> >> &

Re: Custom tag and map-backed action

2008-09-23 Thread Gabriel Belingueres
umber 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 th

Re: Custom tag and map-backed action

2008-09-23 Thread Gabriel Belingueres
String. If the data 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 sup

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 action's

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 t

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

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 with 2008/9/27 Gianluca Musella <[EMAIL PROTECTED]>: > Thank you Dave, it's works using > > > > But if I change my tag' s definition in this way: > > <%@ taglib prefix="s" uri="/stru

Re: "Preparable" influence hibernate transaction management when using "OpenSessionInViewFilter"

2008-09-29 Thread Gabriel Belingueres
e method. > > Secondly, how does "OpenSessionInViewFilter" 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 kno

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 expres

  1   2   3   >