Re: Guice integration

2010-01-07 Thread Lukasz Lenart
2010/1/8 Saeed Iqbal : > 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 -

Re: How to nest Struts Tags

2010-01-07 Thread RogerV
RogerV wrote: > > > > Gabriel Belingueres-2 wrote: >> >> 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

Re: How to nest Struts Tags

2010-01-07 Thread RogerV
Gabriel Belingueres-2 wrote: > > 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. > Actually wha

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 rob...@msn.com

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

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: java.lang.Incompat

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

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 comman

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 Databa

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: struts2 and tables

2010-01-07 Thread Chris Pratt
I'm not positive but you might try: (*Chris*) On Thu, Jan 7, 2010 at 4:09 PM, Sergio wrote: > 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 >>

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

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

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 be

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 v

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 wrote: > We use Spring (and Spring-LDAP) for that layer. It wo

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'

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 t

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 ex

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 wrote: > you can use iterator over a collection. > see in > > http:/

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 your

How to nest Struts Tags

2010-01-07 Thread RogerV
Hi The iterator is returning a string value on each iteration - what's the incantation to get the value of into the value parameter of the param tag? -- View this message in context: http://old.nabble.com/How-to-nest-Struts-Tags-tp27062761p27062761.html Sent from the St

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 just

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

Re: freemarker error in select tag

2010-01-07 Thread Johannes Geppert
I use struts2 version 2.1.8.1 and this select tag: The SelectBox is already filled so I thin the Action is not the Problem. Gabriel Belingueres-2 wrote: > > Please post the S2 version number, the tag you are using > together with the action code to initialize the select list/map. >

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: 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: 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 > > > 44. 45.class="odd > < > s:else>

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 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 44.odd < s:else>even"> 46. 47. 48. 49. 50. 51. 52.

Re: What may cause ognl.InappropriateExpressionException warning ?

2010-01-07 Thread Manimaran Ramaraj
Hi d-\d+?-[sop] 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) ~ Maran jsubei wrote: > > Ok, I've configured the struts.xml as you say

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: No Users Found Reset Password (*Chris*) On Wed, Jan 6, 2010 at 5:00 PM, Chris Pratt wrote: In your action, add a getList() method that retur