Re: Open session in view (JPA, struts2, Spring 3, Hibernate4)

2012-08-09 Thread Mounir Benzid
Am 7/26/2012 4:39 PM, schrieb Maurizio Cucchiara: Did you try to extend the url mapping to the whole root? f.e.: /* Twitter :http://www.twitter.com/m_cucchiara G+ :https://plus.google.com/107903711540963855921 Linkedin:http://www.linkedin.com/in/mauriziocucchiara Maurizio Cu

Open session in view (JPA, struts2, Spring 3, Hibernate4)

2012-07-26 Thread Mounir Benzid
Because of a "limitation" (which is rather a bug) of Hibernate 4, I need to switch to an open-session-in-view pattern in struts2 I was hoping that setting the right spring configuration in my web.xml would do the trick (see below) The session still dies before the view layer (ognl) has any c

How to resuse an Action class in different namespace contexts?

2012-07-23 Thread Mounir Benzid
I use two different namespaces to secure my web application ( with spring security) One is /pubilc the other is called.. well.. /private. Everything underneath /private is available only to logged-in users. Currently there is an action class living in the /public namespace named Show

Re: doesn't like to render my listed item as selected

2012-07-19 Thread Mounir Benzid
Could it be that the select-tag doesn't get along well with BigDecimal ? Am 7/17/2012 12:08 PM, schrieb Mounir Benzid: Hey, I'm iterating through a list of ticket(descriptions) where each ticket has its own VAT value (I'm in Germany so that could be 0%, 7% or 19% VA

doesn't like to render my listed item as selected

2012-07-17 Thread Mounir Benzid
Hey, I'm iterating through a list of ticket(descriptions) where each ticket has its own VAT value (I'm in Germany so that could be 0%, 7% or 19% VAT) The action method "List getTicketDescriptions()" returns all available tickets. A TicketDescription has the method "BigDecimal getValueAdd

Re: How to string concatenate listValue in struts (radio) tag?

2012-06-27 Thread Mounir Benzid
(" + price + " " + symbol + ")"; } // given id doesn't match any ticketdescription return ""; } Am 6/27/2012 2:14 PM, schrieb Dave Newton: Why not just build the list with the right label already in it? Dave On Wed, Jun 27, 2012 at 8:

Re: How to string concatenate listValue in struts (radio) tag?

2012-06-27 Thread Mounir Benzid
Can I do something along the lines of this? using #this as a reference for the current TicketDescription instance. Am 6/27/2012 1:41 PM, schrieb Mounir Benzid: Like this? String getTicketLabelById(Long id) { TicketDescription td = lookupTicketDescriptionBy(id

Re: How to string concatenate listValue in struts (radio) tag?

2012-06-27 Thread Mounir Benzid
the appropriate instance. Am 6/27/2012 1:14 PM, schrieb Dave Newton: My idea would be to create presentation layer data outside of the JSP. Dave On Wed, Jun 27, 2012 at 6:38 AM, Mounir Benzid wrote: Hi here's the deal. Suppose I want to display a tag showing a list of TicketDescript

How to string concatenate listValue in struts (radio) tag?

2012-06-27 Thread Mounir Benzid
Hi here's the deal. Suppose I want to display a tag showing a list of TicketDescriptions where each has the property ticketName, i.e. a method getTicketName()). getTicketName itself returns an instance of type LocalizedString for which I wrote a custom struts conversion. LocalizedString is

Re: Current status in testing with struts2, spring3 +junit 4?

2012-04-05 Thread Mounir Benzid
Am 22.03.2012 16:56, schrieb Łukasz Lenart: 2012/3/22 Mounir Benzid: :-) Ok, but actually this isn't my code and not even my blog. I just stumbled over the solution while googling at 2 am . So there is not connection between me and [1]. Sorry for the misunderstanding. But I can contac

Re: Current status in testing with struts2, spring3 +junit 4?

2012-03-22 Thread Mounir Benzid
Am 22.03.2012 16:05, schrieb Łukasz Lenart: 2012/3/22 Mounir Benzid: You mean some code demonstrating how I did my tests using [1] ? An example would be nice, but I'm talking about your test class from the blog entry. It must be donated to ASF if I want to use it and the simplest way

Re: Current status in testing with struts2, spring3 +junit 4?

2012-03-22 Thread Mounir Benzid
Am 20.03.2012 11:26, schrieb Łukasz Lenart: Mounir could you prepare a patch with your test case class from here [1] and attach it to https://issues.apache.org/jira/browse/WW-3778 with granting license to ASF ? I'd like to include your code in S2 [1] http://www.zapjava.com/tutorials/spring-strut

Re: Current status in testing with struts2, spring3 +junit 4?

2012-03-20 Thread Mounir Benzid
Am 19.03.2012 20:54, schrieb Łukasz Lenart: If you'll follow the last comments, you'll find another approach. Always you can prepare your solution and register an issue to integrate your solution with S2 Regards I found this blog post. So far this solves the problems I had with the old bases

Re: Does the orrder of wildcard-annotated methods effects greediness?

2012-03-19 Thread Mounir Benzid
Am 19.03.2012 09:28, schrieb Maurizio Cucchiara: Twitter :http://www.twitter.com/m_cucchiara G+ :https://plus.google.com/107903711540963855921 Linkedin:http://www.linkedin.com/in/mauriziocucchiara Maurizio Cucchiara We could implement a "most specific take a precedence along the

Current status in testing with struts2, spring3 +junit 4?

2012-03-19 Thread Mounir Benzid
A co-worker of mine discovered the below test helper class that we are currently employing for some very basic action testing stuff https://depressedprogrammer.wordpress.com/2007/06/18/unit-testing-struts-2-actions-spring-junit/ Since this is from 2007 I'm wondering if this is still the best

Re: Does the orrder of wildcard-annotated methods effects greediness?

2012-03-19 Thread Mounir Benzid
Am 18.03.2012 20:15, schrieb Maurizio Cucchiara: I don't know how to get this work with annotations, but it looks like that it works using xml (you can control greediness sorting by more specific expression) Twitter :http://www.twitter.com/m_cucchiara G+ :https://plus.google.com/107

Re: paramsPrepareParamsStack-prepare-method problem

2012-03-16 Thread Mounir Benzid
Loosely based on the paramsPrepareParams interceptor I found this interceptor configuration to solve my problem The params interceptor fires once before the prepare interceptor. So far there're no side effects I'm not sure why the paramsPrepareParams input,back,cancel input,back,

Re: paramsPrepareParamsStack-prepare-method problem

2012-03-15 Thread Mounir Benzid
Am 14.03.2012 21:21, schrieb Dave Newton: And you've set the other referenced properties appropriately? Well, here are my settings value="myapp-common" /> I double checked my code there seems nothing wrong with the pattern matching in general. For instance when I request t

Re: paramsPrepareParamsStack-prepare-method problem

2012-03-14 Thread Mounir Benzid
Mounir Am 14.03.2012 20:12, schrieb Dave Newton: Are you actually using the `namedVariable` pattern matcher? http://struts.apache.org/2.x/docs/wildcard-mappings.html#WildcardMappings-Parametersinnamespaces Dave On Wed, Mar 14, 2012 at 3:09 PM, Mounir Benzid wrote: My problem is the

paramsPrepareParamsStack-prepare-method problem

2012-03-14 Thread Mounir Benzid
My problem is the id is always null. First I thought it could be b/c of the way the defaultStack is set up so I switched to paramsPrepareParamsStack, yet the problem still remains. Any ideas on how to obtain the id from the request? Thanks! Mounir @Namespace("/public") public class Person

Re: Does the orrder of wildcard-annotated methods effects greediness?

2012-03-08 Thread Mounir Benzid
Am 08.03.2012 14:39, schrieb Mounir Benzid: Ok after finally getting my repositories straight I started my struts junit testcase against the nighty build that is 2.3.2 SNAPSHOT The results are the same though. For the time being I'm going to change my url patterns to avoid the ambi

Re: Does the orrder of wildcard-annotated methods effects greediness?

2012-03-08 Thread Mounir Benzid
Ok after finally getting my repositories straight I started my struts junit testcase against the nighty build that is 2.3.2 SNAPSHOT The results are the same though. For the time being I'm going to change my url patterns to avoid the ambiguity. cheers - Mounir

Re: Does the orrder of wildcard-annotated methods effects greediness?

2012-03-08 Thread Mounir Benzid
Am 08.03.2012 14:15, schrieb Łukasz Lenart: 2012/3/8 Mounir Benzid: To be 100% ubersure. This is how I configured mvn struts dependency Did you specify a repository in pom ? apache-snapshot ASF Snapshots https://repository.apache.org

Re: Does the orrder of wildcard-annotated methods effects greediness?

2012-03-08 Thread Mounir Benzid
Am 08.03.2012 14:01, schrieb Łukasz Lenart: 2012/3/8 Mounir Benzid: Can you please tell me how to access your nightly builds through maven? https://builds.apache.org/job/Struts2/lastStableBuild/org.apache.struts$struts2-assembly/ Here https://repository.apache.org/content/groups/snapshots

Re: Does the orrder of wildcard-annotated methods effects greediness?

2012-03-08 Thread Mounir Benzid
:http://www.linkedin.com/in/mauriziocucchiara Maurizio Cucchiara On 7 March 2012 18:39, Mounir Benzid wrote: Here is a simple example showing two methods in the given order /*** **/ @Override @Action(value

Re: Does the orrder of wildcard-annotated methods effects greediness?

2012-03-08 Thread Mounir Benzid
[/myApp]. Struts is apparently trying to match the request /do/some/specificstuff/eat against some namespace /do/some/specificstuff and action "eat" which of cource doesn't exist. Well I guess that's exaclty what alwaysSelectFullNamespace does. btw: I'm using the

Does the orrder of wildcard-annotated methods effects greediness?

2012-03-07 Thread Mounir Benzid
Here is a simple example showing two methods in the given order /***/ @Override @Action(value="/do/some/specificstuff/{thing}", results={@Result(location = "result.jsp")}), public String ex

Re: struts2-jquery-plugin: form submit returns twice the submit and textfield

2012-02-29 Thread Mounir Benzid
os, on cell) On Feb 28, 2012 6:44 PM, "Mounir Benzid" wrote: Here's a simple enough example of how to use the tag available in the struts2-jquery plugin (v 3.2.1) http://www.weinfreund.de/**struts2-jquery-showcase/index.**action<http://www.weinfreund.de/struts2-jquery-showcas

struts2-jquery-plugin: form submit returns twice the submit and textfield

2012-02-28 Thread Mounir Benzid
Here's a simple enough example of how to use the tag available in the struts2-jquery plugin (v 3.2.1) http://www.weinfreund.de/struts2-jquery-showcase/index.action Well what I get though is somehow mysterious (to me). The first time when I call the action [1] given by its URL http://localho

Maven repository and struts2-jquery-plugin

2012-02-28 Thread Mounir Benzid
Hi, please point me to a maven repo with the latest jq-plugin release I only have this link on google code: http://code.google.com/p/struts2-jquery/downloads/detail?name=struts2-jquery-plugin-3.2.1.jar Thanks! cheers - Mounir ---

Re: how to use Advanced wildcards

2012-02-03 Thread Mounir Benzid
Am 30.01.2012 17:17, schrieb Maurizio Cucchiara: Hi Mounir, It works like a charm now. Wondering why nobody else had a similar problem maybe the majority is opting for the rest-plugin? Glad you finally worked out. Yeah, I think at rest-plugin, urlrewrite lib, plain wildcard, and so on or

Re: how to use Advanced wildcards

2012-01-30 Thread Mounir Benzid
urizio Cucchiara: I played with regex pattern and I realized that the example provided in docs doesn't work [1]. Could you file an issue on jira [2]? [1] http://struts.apache.org/2.3.1.2/docs/wildcard-mappings.html [2] https://issues.apache.org/jira/browse/WW Maurizio Cucchiara On 24 January

Re: how to use Advanced wildcards

2012-01-25 Thread Mounir Benzid
se/WW Maurizio Cucchiara On 24 January 2012 10:34, Mounir Benzid wrote: Hi, I'm having some trouble figuring out how to use the advanced wildcards feature in struts II. What I'm trying to do looks as follows A) /WEB-INF/pages/myevents/createevent.jsp /display/{action}/{eventId} B)

how to use Advanced wildcards

2012-01-24 Thread Mounir Benzid
Hi, I'm having some trouble figuring out how to use the advanced wildcards feature in struts II. What I'm trying to do looks as follows A) class=".actions.event.EventAction"> /WEB-INF/pages/myevents/createevent.jsp /display/{action}/{eventId} B) class="de.mm.moreevent.web.actions.ev