Re: struts2 and tables

2010-01-07 Thread Sergio
Chris Pratt escribió: Maybe this will clear things up. This is a working example from our site: s:url action=reset-password-csr id=reset escapeAmp=false/ display:table uid=user name=${users.list} pagesize=20 requestURI=csr-search-results.html class=tableWithHeaderBG cellpadding=0

Re: What may cause ognl.InappropriateExpressionException warning ?

2010-01-07 Thread Manimaran Ramaraj
Hi interceptor-ref name=sampleInterceptorStackIncludingDefaultStack d-\d+?-[sop] /interceptor-ref Instead of applying the above pattern, apply the following in struts.xml its easy and simple to resolve the problem of ( Inappropriate OGNL expression d-345234)

Re: struts2 and tables

2010-01-07 Thread xerax nono
you can use iterator over a collection. see in http://www.vaannila.com/struts-2/struts-2-example/struts-2-crud-example-1.html s:iterator value=userList status=userStatus 44.tr 45.class=s:if test=#userStatus.odd == true odd/s:if s:elseeven/s:else 46.

freemarker error in select tag

2010-01-07 Thread 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 line 69, column 13 in template/simple/select.ftl stack.findValue('top') is undefined. It cannot be assigned to itemKey The problematic instruction: -- ==

Re: struts2 and tables

2010-01-07 Thread Manimaran Ramaraj
Thanx for this post. This method is pretty simple and very useful. ~ Maran xerax nono wrote: you can use iterator over a collection. see in http://www.vaannila.com/struts-2/struts-2-example/struts-2-crud-example-1.html s:iterator value=userList status=userStatus 44.tr 45.

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: freemarker error in select tag

2010-01-07 Thread Johannes Geppert
I use struts2 version 2.1.8.1 and this select tag: s:select name=format list=formate headerKey= headerValue= label=Formate cssStyle=width: 150px; float: left/s:select The SelectBox is already filled so I thin the Action is not the Problem. Gabriel Belingueres-2 wrote: Please post the

Whats the best way of using Google Inject Annotation in Struts

2010-01-07 Thread Saeed Iqbal
com.google.inject.Inject; -- Saeed Iqbal Independant Consultant J2EE - Application Architect / Developer

Path page.logon does not start with a / character Problem

2010-01-07 Thread Andy T
Hi All . . . I am (relatively) new to Tiles and Struts and I'm having a problem applying my tiles in my struts application correctly. Originally, I was using Tiles 2.1 but because of technical problems I decided to not use Tiles 2.1 and go back to the struts-tiles-1.3.10.jar. In other words

How to nest Struts Tags

2010-01-07 Thread RogerV
Hi s:iterator status=stat value=config.groupList s:url id=url1 action=get-ccf-data method=getParameterList s:param name=displayGroup value=what goes here?/ /s:url s:a href=%{url1}s:property//s:a /s:iterator The iterator is returning a string value on each iteration - what's

Re: struts2 and tables

2010-01-07 Thread Chris Pratt
You can refer to the DisplayTag documentation about what collections they support, there are quite a few. I usually use a java.util.List of JavaBean's And yes, you'll have to use JDBC, JPA, Ibatis, Hibernate... to get that data from the database into a structure that can be displayed. As for

Re: struts2 and tables

2010-01-07 Thread Chris Pratt
If all you want to do is display data in a simple HTML table, this is definitely the way to go. If you need pagination or columnar sorting support, I'd go with DisplayTag. (*Chris*) On Thu, Jan 7, 2010 at 1:39 AM, xerax nono xrx1...@gmail.com wrote: you can use iterator over a collection.

Struts, Tomcat, JNDI, JDBC without use of an ORM Library such as Hibernate

2010-01-07 Thread Jasvinder S. Bahra
Does anyone know of any techniques that would allow a Database Access Object (DAO) to be used from the various actions that make up a Struts application? I have a DAO which, when instantiated, acquires a data source from the servlet container (in this case, Apache Tomcat). Thereafter, I can

Re: Struts, Tomcat, JNDI, JDBC without use of an ORM Library such as Hibernate

2010-01-07 Thread Chris Pratt
We use Spring (and Spring-LDAP) for that layer. It works great, manages all our DAO's and their resources, and then injects them into the Actions as needed. (*Chris*) On Thu, Jan 7, 2010 at 10:06 AM, Jasvinder S. Bahra bbdl21...@blueyonder.co.uk wrote: Does anyone know of any techniques

Re: Struts, Tomcat, JNDI, JDBC without use of an ORM Library such as Hibernate

2010-01-07 Thread Greg Lindholm
Instantiating the DAO in the execute() method of each of my action's however, seems a little inefficient.  Does Struts provide any way to instantiate the object once and then make it available for the lifetime of the container (in a way that my Actions can access it)? So want your DAO's to

Re: Struts, Tomcat, JNDI, JDBC without use of an ORM Library such as Hibernate

2010-01-07 Thread Brian Thompson
I'll echo the Spring suggestion. It simplifies Action-level programming by quite a bit. On the flip side, it requires some extra XML configuration, but IMO it's a good tradeoff. -Brian On Thu, Jan 7, 2010 at 12:18 PM, Chris Pratt thechrispr...@gmail.comwrote: We use Spring (and Spring-LDAP)

Action Approach

2010-01-07 Thread CRANFORD, CHRIS
All - I am working on an action that takes a set of input and forwards the user to a web page that contains a form with a layout as follows: Active Primary Catalog1[ ][ ] Catalog2[ ][ ] Catalog3[ ][ ] In order to to capture the changes to the checkbox

Re: struts2 and tables

2010-01-07 Thread Sergio
Chris Pratt escribió: You can refer to the DisplayTag documentation about what collections they support, there are quite a few. I usually use a java.util.List of JavaBean's And yes, you'll have to use JDBC, JPA, Ibatis, Hibernate... to get that data from the database into a structure that can

Re: Struts, Tomcat, JNDI, JDBC without use of an ORM Library such as Hibernate

2010-01-07 Thread Jasvinder S. Bahra
We use Spring (and Spring-LDAP) for that layer. It works great, manages all our DAO's and their resources, and then injects them into the Actions as needed. Chris, At the moment, i'm trying to reaquaint myself with the ins and out of Struts (I haven't touched it for several years), so I

Re: struts2 and tables

2010-01-07 Thread Sergio
Sergio escribió: Chris Pratt escribió: You can refer to the DisplayTag documentation about what collections they support, there are quite a few. I usually use a java.util.List of JavaBean's And yes, you'll have to use JDBC, JPA, Ibatis, Hibernate... to get that data from the database into a

Re: Struts, Tomcat, JNDI, JDBC without use of an ORM Library such as Hibernate

2010-01-07 Thread Jasvinder S. Bahra
So want your DAO's to be singletons? You would have to make them Thread-safe (or synchronize and kill performance), beware that database connections are not thread-safe. Please note that i'm using using the database connection pooling facilities provided by the Servlet Container (Apache

Re: struts2 and tables

2010-01-07 Thread Chris Pratt
I'm not positive but you might try: s:param name=politico value=${this}/ (*Chris*) On Thu, Jan 7, 2010 at 4:09 PM, Sergio killing-is-my-busin...@hotmail.comwrote: Sergio escribió: Chris Pratt escribió: You can refer to the DisplayTag documentation about what collections they support,

Re: Struts, Tomcat, JNDI, JDBC without use of an ORM Library such as Hibernate

2010-01-07 Thread Chris Pratt
Good luck, and let us know how it goes. (*Chris*) On Thu, Jan 7, 2010 at 3:44 PM, Jasvinder S. Bahra bbdl21...@blueyonder.co.uk wrote: We use Spring (and Spring-LDAP) for that layer. It works great, manages all our DAO's and their resources, and then injects them into the Actions as

Re: Struts, Tomcat, JNDI, JDBC without use of an ORM Library such as Hibernate

2010-01-07 Thread Jasvinder S. Bahra
I'll echo the Spring suggestion. It simplifies Action-level programming by quite a bit. On the flip side, it requires some extra XML configuration, but IMO it's a good tradeoff. Spring seems to be quite popular here. I'm somewhat reluctant because Spring provides a lot more than just

Guice integration

2010-01-07 Thread Saeed Iqbal
Can anyone tell me how to best integrate guice with struts please. -- Saeed Iqbal Independant Consultant J2EE - Application Architect / Developer - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional

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

Why do i possibly get this error.

2010-01-07 Thread Saeed Iqbal
Unable to load bean: type:com.opensymphony.xwork2.util.ValueStackFactory class:com.opensymphony.xwork2.ognl.OgnlValueStackFactory - bean - jar:file:/Users/saeediqbal/.m2/repository/org/apache/struts/struts2-core/2.1.6/struts2-core-2.1.6.jar!/struts-default.xml:68:140 Caused by:

Re: Why do i possibly get this error.

2010-01-07 Thread Saeed Iqbal
Excluding some jars moved me forward. Now i get this Caused by: java.lang.ClassCastException: com.iqbalconsulting.work.servlets.LsoLoginServlet at com.google.inject.struts2.GuiceObjectFactory.setModule(GuiceObjectFactory.java:63) On Fri, Jan 8, 2010 at 7:59 AM, Saeed Iqbal saee...@gmail.com

validation question

2010-01-07 Thread 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 trouble connecting the dots. Any information and help will be appreciated. Best regards! Robby

Re: How to nest Struts Tags

2010-01-07 Thread RogerV
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. I don't like to think too much where the data came from.

Re: How to nest Struts Tags

2010-01-07 Thread RogerV
RogerV wrote: 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. I don't like to think too much where

Re: Guice integration

2010-01-07 Thread Lukasz Lenart
2010/1/8 Saeed Iqbal saee...@gmail.com: Can anyone tell me how to best integrate guice with struts please. Try Guice plugin http://cwiki.apache.org/S2PLUGINS/guice-plugin.html Regards -- Lukasz Kapituła Javarsovia 2010 http://javarsovia.pl