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 Cucchiara


On 26 July 2012 15:36, Łukasz Lenart  wrote:


Could you show the whole web.xml ?


Regards
--
Łukasz
mobile +48 606 323 122 http://www.lenart.org.pl/
Warszawa JUG conference - Confitura http://confitura.pl/

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org






Łukasz, Maurizio

sorry for the late response. web.xml ---> http://pastebin.com/XPiQ3ZJB

I guess the problem might be that the transaction boundary starts and ends 
within the controller class I wrote to manage entities. The action itself 
doesn't participate in the transaction. If my understanding is correct then the 
OSIV pattern needs an active transaction. Should I let spring manage the action 
in order to propagate the transaction to it?

Mounir




-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



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 chance to 
lazy fetch from the database.


Is there anything struts-specific to make OSIV work?


I use Spring 3 and the EntityManager is from my JPA provider (hibernate).

- Mounir



  
OpenEntityManagerInViewFilter

org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter


entityManagerFactory
entityManagerFactory



OpenEntityManagerInViewFilter
/public/*


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



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 ShowPublicAgendaAction

which is responsible for showing today's agenda items.


A very similar action ShowPrivateAgendaAction exists in the secured 
/private namespace
which does pretty much the same thing, the only difference is, that all 
available agenda itens are presented to the user

(not only those of today)


I'd like to consolidate both actions since they differ only in one 
single line of code


 Public:   public void prepare() { List items= 
agendaManager.loadTodaysItems();.}


Private:  public void prepare() {  List items= 
agendaManager.loadItems();..}



How do I go about serving requests from different namespaces in one 
Action class?


Requests coming-in from /private should call  items= 
agendaManager.loadItems();

Everythng else should call items= agendaManager.loadTodaysItems();



Thanks.

Mounir











-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



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% VAT)


The action method "List getTicketDescriptions()"  
returns all available tickets. A TicketDescription has the method  
"BigDecimal getValueAddedTaxPercentage()"
which of cource returns the VAT value of that ticket. A list of 
possible VAT values is also held in my action class. There's a 
"List getAllVats()"  action method which returns the list, 
which is then rendered by .


Now I'd like the  tag to display the appropiate VAT value as 
select according to the VAT value currently held by the ticket.



So here is  what I did:


...

value="%{#ticket.valueAddedTaxPercentage}" 
name="ticketDescriptions[%{#row.index}].valueAddedTaxPercentage"/>


...
  

But for some reasons that doesn't work


So I added a few "debuggging" statements


...

value="#ticket.valueAddedTaxPercentage"/>
value="%{#ticket.valueAddedTaxPercentage}" 
name="ticketDescriptions[%{#row.index}].valueAddedTaxPercentage"/>
name="ticketDescriptions[%{#row.index}].valueAddedTaxPercentage"/>


...
  


This is the resulting html output generated by the above jsp snippet

0 <<-- THE VAT VALUE 
OF THE CURRENT TICKET IS 0. CORRECT!


id="price_183_create_ticketDescriptions_2__valueAddedTaxPercentage">

19
7
0 <<-- WHY ISN'T THIS BEING 
MARKED AS SELECTED SINCE VALUE == 0 !!



id="price_183_create_ticketDescriptions_2__valueAddedTaxPercentage">

19
7 <<-- 
HARD CODING THE VALUE WORKS

0


Thumbnail picture
http://www1.picturepush.com/photo/a/8750054/640/8750054.png

Any ideas? Thanks!

- Mounir





-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org





-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



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 getValueAddedTaxPercentage()"
which of cource returns the VAT value of that ticket. A list of possible 
VAT values is also held in my action class. There's a "List 
getAllVats()"  action method which returns the list, which is then 
rendered by .


Now I'd like the  tag to display the appropiate VAT value as 
select according to the VAT value currently held by the ticket.



So here is  what I did:


...

value="%{#ticket.valueAddedTaxPercentage}" 
name="ticketDescriptions[%{#row.index}].valueAddedTaxPercentage"/>


...
  

But for some reasons that doesn't work


So I added a few "debuggging" statements


...

value="#ticket.valueAddedTaxPercentage"/>
value="%{#ticket.valueAddedTaxPercentage}" 
name="ticketDescriptions[%{#row.index}].valueAddedTaxPercentage"/>
name="ticketDescriptions[%{#row.index}].valueAddedTaxPercentage"/>


...
  


This is the resulting html output generated by the above jsp snippet

0 <<-- THE VAT VALUE OF 
THE CURRENT TICKET IS 0. CORRECT!


id="price_183_create_ticketDescriptions_2__valueAddedTaxPercentage">

19
7
0 <<-- WHY ISN'T THIS BEING 
MARKED AS SELECTED SINCE VALUE == 0 !!



id="price_183_create_ticketDescriptions_2__valueAddedTaxPercentage">

19
7 <<-- 
HARD CODING THE VALUE WORKS

0


Thumbnail picture
http://www1.picturepush.com/photo/a/8750054/640/8750054.png

Any ideas? Thanks!

- Mounir





-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



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

2012-06-27 Thread Mounir Benzid
Fair question... it's because the right label which is the localised 
name of the current TicketDescription will be determined only by the 
choosen locale during  runtime and is not knowm during
compile time. For instance German clients will be presented with German 
translations. Someone in France wants to see the French translation and 
so forth.



This's what I  do now which is pretty lame imo.

/***/
public String getTicketLabel(Long id) {
if (id == null) {
throw new NullArgumentException("id");
}
List list = 
bookingTransactionBean.getEventProductCatalog().getTicketDescriptionsWithFirstAsPrimary();


for (TicketDescription description : list) {
if (!id.equals(description.getId()) {
continue;
}
String name = 
description.getTicketNameByLocale(**getLocale()**);
String price = 
description.getPrice().getAmount().toPlainString();
String symbol = 
description.getPrice().getCurrencyUnit().getSymbol();


return name + " (" + 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:01 AM, Mounir Benzid  wrote:


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

}

   

The only downside I see is the lookup that has to be carried out every
time the method is called, since in theory I'm already iterating through
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
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 basically an enhanced java.util.String object which
contains the TicketDescription's name.
After the conversion ticketName will be of type java.lang.String.

So this is what I use so far:




and as an example results in
[ ] student ticket
[ ] VIP ticket
[ ]...



BUT what I really would like to see is

[ ] student ticket (10 Euro)
[ ] VIP ticket (100 Euro)
[ ]...



This is what I tried so far but with no avail





The output is

[ ] xx.xx.LocalizedString@1bb8d3e[ID=373,Locale=en,Title="
student
ticket"] (100 Euro)
[ ] xx.xx.LocalizedString@1bb8d3e[ID=374,Locale=en,Title="VIP
ticket"]
(100 Euro)

Any ideas? thanks!




--**--**-

To unsubscribe, e-mail: 
user-unsubscribe@struts.**apac**he.org<http://apache.org>

For additional commands, e-mail: user-h...@struts.apache.org






--
Mounir Benzid
Systementwickler / EDV

meetingmasters.de
meetings meisterhaft managen

· Unabhängige Vermittlung von Tagungshotels
· Online-**Hotelreservierungssystem zur Integration in die
Veranstaltungs-Webseite
· Webbasiertes Veranstaltungs- und Teilnehmermanagement
· E-Procurement für den MICE-Einkauf
· Webbasierte Anfrage und Verhandlung von Firmenraten

Max-Planck-Straße 22
D-54296 Trier

fon +49 (0)651-145789-38
fax +49 (0)651-145789-20

www.meetingmasters.de
m...@meetingmasters.de


--**--**-
To unsubscribe, e-mail: 
user-unsubscribe@struts.**apache.org
For additional commands, e-mail: user-h...@struts.apache.org





--
Mounir Benzid
Systementwickler / EDV

meetingmasters.de
meetings meisterhaft managen

· Unabhängige Vermittlung von Tagungshotels
· Online-Hotelreservierungssystem zur Integration in die Veranstaltungs-Webseite
· Webbasiertes Veranstaltungs- und Teilnehmermanagement
· E-Procurement für den MICE-Einkauf
· Webbasierte Anfrage und Verhandlung von Firmenraten

Max-Planck-Straße 22
D-54296 Trier

fon +49 (0)651-145789-38
fax +49 (0)651-145789-20

www.meetingmasters.de
m...@meetingmasters.de


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



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

}

   

The only downside I see is the lookup that has to be carried out every 
time the method is called, since in theory I'm already iterating 
through 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
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 basically an enhanced java.util.String object which
contains the TicketDescription's name.
After the conversion ticketName will be of type java.lang.String.

So this is what I use so far:




and as an example results in
[ ] student ticket
[ ] VIP ticket
[ ]...



BUT what I really would like to see is

[ ] student ticket (10 Euro)
[ ] VIP ticket (100 Euro)
[ ]...



This is what I tried so far but with no avail


 listValue="%{ticketName +  ' (100 
Euro)' }"

 />


The output is

[ ] xx.xx.LocalizedString@1bb8d3e[**ID=373,Locale=en,Title="**student
ticket"] (100 Euro)
[ ] xx.xx.LocalizedString@1bb8d3e[**ID=374,Locale=en,Title="VIP 
ticket"]

(100 Euro)

Any ideas? thanks!




--**--**- 

To unsubscribe, e-mail: 
user-unsubscribe@struts.**apache.org

For additional commands, e-mail: user-h...@struts.apache.org








--
Mounir Benzid
Systementwickler / EDV

meetingmasters.de
meetings meisterhaft managen

· Unabhängige Vermittlung von Tagungshotels
· Online-Hotelreservierungssystem zur Integration in die Veranstaltungs-Webseite
· Webbasiertes Veranstaltungs- und Teilnehmermanagement
· E-Procurement für den MICE-Einkauf
· Webbasierte Anfrage und Verhandlung von Firmenraten

Max-Planck-Straße 22
D-54296 Trier

fon +49 (0)651-145789-38
fax +49 (0)651-145789-20

www.meetingmasters.de
m...@meetingmasters.de


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



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

2012-06-27 Thread Mounir Benzid


Like this?

String getTicketLabelById(Long id) {
   TicketDescription td = lookupTicketDescriptionBy(id);

}

   

The only downside I see is the lookup that has to be carried out every 
time the method is called, since in theory I'm already iterating through 
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
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 basically an enhanced java.util.String object which
contains the TicketDescription's name.
After the conversion ticketName will be of type java.lang.String.

So this is what I use so far:




and as an example results in
[ ] student ticket
[ ] VIP ticket
[ ]...



BUT what I really would like to see is

[ ] student ticket (10 Euro)
[ ] VIP ticket (100 Euro)
[ ]...



This is what I tried so far but with no avail





The output is

[ ] xx.xx.LocalizedString@1bb8d3e[**ID=373,Locale=en,Title="**student
ticket"] (100 Euro)
[ ] xx.xx.LocalizedString@1bb8d3e[**ID=374,Locale=en,Title="VIP ticket"]
(100 Euro)

Any ideas? thanks!




--**--**-
To unsubscribe, e-mail: 
user-unsubscribe@struts.**apache.org
For additional commands, e-mail: user-h...@struts.apache.org





--
Mounir Benzid
Systementwickler / EDV

meetingmasters.de
meetings meisterhaft managen

· Unabhängige Vermittlung von Tagungshotels
· Online-Hotelreservierungssystem zur Integration in die Veranstaltungs-Webseite
· Webbasiertes Veranstaltungs- und Teilnehmermanagement
· E-Procurement für den MICE-Einkauf
· Webbasierte Anfrage und Verhandlung von Firmenraten

Max-Planck-Straße 22
D-54296 Trier

fon +49 (0)651-145789-38
fax +49 (0)651-145789-20

www.meetingmasters.de
m...@meetingmasters.de


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



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 basically an enhanced java.util.String object which 
contains the TicketDescription's name.

After the conversion ticketName will be of type java.lang.String.

So this is what I use so far:




and as an example results in
[ ] student ticket
[ ] VIP ticket
[ ]...



BUT what I really would like to see is

[ ] student ticket (10 Euro)
[ ] VIP ticket (100 Euro)
[ ]...



This is what I tried so far but with no avail


 listValue="%{ticketName +  ' (100 
Euro)' }"

 />


The output is

[ ] xx.xx.LocalizedString@1bb8d3e[ID=373,Locale=en,Title="student 
ticket"] (100 Euro)
[ ] xx.xx.LocalizedString@1bb8d3e[ID=374,Locale=en,Title="VIP ticket"] 
(100 Euro)


Any ideas? thanks!




-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



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 contact the author and see if s/he is willing to donate the test
class to the ASF.

Cool! Thanks in advance!


Regards


I finally contacted the author. His response is quite positive I would 
say  :-)


As he pointed out we should also ask Zarar Siddiqi  for permission.


Mounir


Hi!

Yes I'm the author / owner of the zapjava.com <http://zapjava.com> 
domain and also the content.

Haven't had time to post much useful things there yet…

YES - you may use and modify the class freely for documentation on ASF 
projects from my part
(I use Apache projects daily and it's the least I can do to give 
something back to the community).


It is how-ever loosely based on this: 
http://depressedprogrammer.wordpress.com/2007/06/18/unit-testing-struts-2-actions-spring-junit/ 
<http://depressedprogrammer.wordpress.com/2007/06/18/unit-testing-struts-2-actions-spring-junit/>

and as such I think you might want to check with Zarar Siddiqi also.

With kind regards,
Reigo Reinmets



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 is to attach it as a patch to the issue.


Regards
:-)   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 contact the author and see if s/he is willing to donate the 
test class to the ASF.


Mounir



-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



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-struts2-junit4-annotations/


Regards


You mean some code demonstrating how I did my tests using [1]  ?

Will do, but there's nothing fancy really (this weekend probably)

Mounir




-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



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 basestruts2testcase


http://www.zapjava.com/tutorials/spring-struts2-junit4-annotations/

Although it took me nearly two days to figure that out.

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



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 path"
policy (though I don't know how ATM :) ), could you please file an issue on
jira [1]?
[1] https://issues.apache.org/jira/browse/WW
Definitely not the best or most elegant solution, but some sort of 
@matchPriority(A)


where A is a pos. int value (or zero) and if A > B, A fires before B

could do the trick (for now)


Usage scenario:

@Action(value="some/{stuff}", results={@Result(location ="result.jsp")})
@matchPriority(0)
public String action1() {}

@Action(value="some/useful/{stuff}", results={@Result(location 
="result.jsp")})

@matchPriority(1)
public String action2() {}

This way the second action method fires before the first one.


Mounir

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



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 way 
posssible. For instance I'm not sure if the prepare() method

is actually called using the above helper class.

And what about  junit4? Still an issue ?
http://struts.1045723.n5.nabble.com/NullPointerException-Using-StrutsSpringTestCase-td3534567.html


Thanks again!
Mounir

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



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/107903711540963855921
Linkedin:http://www.linkedin.com/in/mauriziocucchiara

Maurizio Cucchiara
It could be sufficiant if the order of the regex pattern in the  java 
class file matters or
alternativly one should be able to make the pattern matcher itself 
nongreedy by using the ? op.

I'm not sure though weather the ? notation will work this way.

Mounir

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



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,cancel














dojo\..*,^struts\..*









dojo\..*,^struts\..*



input,back,cancel,browse


input,back,cancel,browse





-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



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 the url


/namespace/123/import   matching the annotated pattern 
"{id:[0-9]+}/import" the right action is executed and the id field is 
populated accordingly.


Only the prepare method fails in this regard.

cheers
Mounir






-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



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 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 PersonCRUDAction  implements Preparable {

private Long id;

@Action("blah1/{id}/blah2")
public void execute() {
...  /*  crud the person   */
}

public Long getId() { return id;}
public void setId(Long id) {this.id=id}

@Override
public  void prepare() throws Exception {

Person peron;
if (id!=null)
person = personManager.loadById(id);
else
throw new NullArgumentException("id");
}

}

--**--**-
To unsubscribe, e-mail: 
user-unsubscribe@struts.**apache.org
For additional commands, e-mail: user-h...@struts.apache.org





--
Mounir Benzid
Systementwickler / EDV

meetingmasters.de
meetings meisterhaft managen

· Unabhängige Vermittlung von Tagungshotels
· Online-Hotelreservierungssystem zur Integration in die Veranstaltungs-Webseite
· Webbasiertes Veranstaltungs- und Teilnehmermanagement
· E-Procurement für den Tagungshoteleinkauf
· Webbasierte Anfrage und Verhandlung von Firmenraten

Max-Planck-Straße 22
D-54296 Trier

fon +49 (0)651-145789-38
fax +49 (0)651-145789-20

www.meetingmasters.de
m...@meetingmasters.de


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



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 PersonCRUDAction  implements Preparable {

private Long id;

@Action("blah1/{id}/blah2")
public void execute() {
...  /*  crud the person   */
}

public Long getId() { return id;}
public void setId(Long id) {this.id=id}

@Override
public  void prepare() throws Exception {

Person peron;
if (id!=null)
person = personManager.loadById(id);
else
throw new NullArgumentException("id");
}

}

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



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


cheers
- Mounir



-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org


Just for the record. My repositories have been installed correctly and 
running against the nightly builds for some time now.
(I checked our local nexus repository and just found the apache snapshot 
respository was already configured there)


Ok, that's all for now. Thanks again..



-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



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



-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



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/content/groups/snapshots/
 default
 
 false
 
 
 true
 
 
 


Regards

Shoot! Thanks for reminding me.

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.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


Regards

To be 100% ubersure. This is how I configured mvn struts dependency

2.3.2-SNAPSHOT


org.apache.struts
struts2-core
${struts2-snapshot.version}


So I'm already accessing the nightly builds. rigth?




-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



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

2012-03-08 Thread Mounir Benzid

Am 07.03.2012 19:17, schrieb Maurizio Cucchiara:

In addition to what Dave suggested, could you check it against the latest
nightly build? IIRC I made some change recently on wildcard support.


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/

or should I svn and build locally?

At the moment I'm developing against 2.3.2-snapshots

cheers

Twitter :http://www.twitter.com/m_cucchiara
G+  :https://plus.google.com/107903711540963855921
Linkedin: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="/do/some/**specificstuff/{thing}",
results={@Result(location = "result.jsp")}),
public String execute() throws Exception {...}


/***
**/
@Override
@Action(value="/do/some/{**thing}", results={@Result(location =
"result.jsp")}),
public String input() throws Exception {...}



Now if the request contains myApp/do/some/specificstuff/**eat


which action will fire? I my case it's the input() method but it really
should be the execute()  method.
The parameter "thing" in the second annotation then equals
"specificstuff/eat"


Is it possible to control the "greediness" of the patternmatcher? Using
XML notation one could simply control
this behaviour by  reordering the  tags.

Thanks

- Mounir



--**--**-
To unsubscribe, e-mail: 
user-unsubscribe@struts.**apache.org
For additional commands, e-mail: user-h...@struts.apache.org





--
Mounir Benzid
Systementwickler / EDV

meetingmasters.de
meetings meisterhaft managen

· Unabhängige Vermittlung von Tagungshotels
· Online-Hotelreservierungssystem zur Integration in die Veranstaltungs-Webseite
· Webbasiertes Veranstaltungs- und Teilnehmermanagement
· E-Procurement für den Tagungshoteleinkauf
· Webbasierte Anfrage und Verhandlung von Firmenraten

Max-Planck-Straße 22
D-54296 Trier

fon +49 (0)651-145789-38
fax +49 (0)651-145789-20

www.meetingmasters.de
m...@meetingmasters.de


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



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

2012-03-08 Thread Mounir Benzid


Am 07.03.2012 18:48, schrieb Dave Newton:

I'm wondering if `struts.mapper.alwaysSelectFullNamespace` would affect
this.

Dave


Again the same code  (almost the same I removed the leading / in 
value="..." and added the namespace annotation to the example)


@Namespace("/do")
public class CRUDAction  {

   @Override
   @Action(value="some/specificstuff/{thing}",results={@Result(location = 
"result.jsp")})
   public String execute() throws Exception {...}


   @Override
   @Action(value="some/{thing}", results={@Result(location ="result.jsp")})
   public String input() throws Exception {...}

}


struts.mapper.alwaysSelectFullNamespace=true

and http://localhost/myApp/do/some/specificstuff/eat

gives me

There is no Action mapped for namespace [/do/some/specificstuff/] and
action name [eat] associated with context path [/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 convention plugin too if that matters.





On Wed, Mar 7, 2012 at 12:39 PM, Mounir Benzid  wrote:


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 execute() throws Exception {...}


/***
**/
@Override
@Action(value="/do/some/{**thing}", results={@Result(location =
"result.jsp")}),
public String input() throws Exception {...}



Now if the request contains myApp/do/some/specificstuff/**eat


which action will fire? I my case it's the input() method but it really
should be the execute()  method.
The parameter "thing" in the second annotation then equals
"specificstuff/eat"


Is it possible to control the "greediness" of the patternmatcher? Using
XML notation one could simply control
this behaviour by  reordering the  tags.

Thanks

- Mounir



--**------**-
To unsubscribe, e-mail: 
user-unsubscribe@struts.**apache.org
For additional commands, e-mail: user-h...@struts.apache.org





--
Mounir Benzid
Systementwickler / EDV

meetingmasters.de
meetings meisterhaft managen

· Unabhängige Vermittlung von Tagungshotels
· Online-Hotelreservierungssystem zur Integration in die Veranstaltungs-Webseite
· Webbasiertes Veranstaltungs- und Teilnehmermanagement
· E-Procurement für den Tagungshoteleinkauf
· Webbasierte Anfrage und Verhandlung von Firmenraten

Max-Planck-Straße 22
D-54296 Trier

fon +49 (0)651-145789-38
fax +49 (0)651-145789-20

www.meetingmasters.de
m...@meetingmasters.de


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



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 execute() throws Exception {...}



/***/

@Override
@Action(value="/do/some/{thing}", results={@Result(location = 
"result.jsp")}),

public String input() throws Exception {...}



Now if the request contains myApp/do/some/specificstuff/eat


which action will fire? I my case it's the input() method but it really 
should be the execute()  method.
The parameter "thing" in the second annotation then equals 
"specificstuff/eat"



Is it possible to control the "greediness" of the patternmatcher? Using 
XML notation one could simply control

this behaviour by  reordering the  tags.

Thanks

- Mounir



-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



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

2012-02-29 Thread Mounir Benzid


Hi Dave,

targets="formResult" in  is unnecessary in my case. Simply 
removing it solved the problem.


Thanks!
- Mounir

Am 29.02.2012 00:50, schrieb Dave Newton:

You update the div with the same jsp as the form, so you're adding the page
to itself.

d.

(pardon brevity and typos, 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-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://localhost:8080/myApp/**test/me<http://localhost:8080/myApp/test/me>
I get the correct server response, that is

- a line saying "Echo: Hello me!"
- underneath it a textfield containig the phrase "Hello me !"
- followed by a submit button

This is what it looks like:
Before: http://i40.tinypic.com/vf8782.**jpg<http://i40.tinypic.com/vf8782.jpg>

Nice.

But after I submit the form the textfield and the submit button get
somehow mysteriously duplicated! (but not the "Echo:..." textline)

So there's still the initial textfield with the updated Hello +
whatever-you-typed-in phrase but yet another textfield and yet another
submit button.

The only difference I can tell between the initial and the duplicated
textfield is that the latter never gets a refresh.
It always contains the initial "Hello me !" phrase.

This is how it looks like after the submit:
After: http://i41.tinypic.com/2ji44j.**jpg<http://i41.tinypic.com/2ji44j.jpg>

Maybe someone can tell what I'm missing here.
Thanks!


[1] http://pastebin.com/Wq0Ek1H4<http://pastebin.com/Wq0Ek1H4>**(Action
class)

[2] http://pastebin.com/6yF2xwu4 (jsp)

--**--**
--**--**
--**--

[1] ACTION class

package xxx.actions.yyy;

import org.apache.log4j.Logger;
import org.apache.struts2.convention.**annotation.Action;
import org.apache.struts2.convention.**annotation.Actions;
import org.apache.struts2.convention.**annotation.Namespace;
import org.apache.struts2.convention.**annotation.Result;

import com.opensymphony.xwork2.**ActionSupport;

@Namespace("/test")
public class HelloWorldAction extends ActionSupport {

public String getYourName() {return yourName; }
public void setYourName(String value) {this.yourName = value;}

@Actions({
@Action(value="{yourName}", results={@Result(location =
"test.jsp")}),
@Action(value="put", results={@Result(location = "test.jsp")})
})
public String execute() {
yourName = "Hello " +  yourName + " !";
logger.debug("execute: " + yourName);
return SUCCESS;
}

private static final long serialVersionUID = 1L;
private String yourName;
private static Logger logger = Logger.getLogger(**
HelloWorldAction.class);

}


[2] (jsp)
--**--**
------**----

<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sj" uri="/struts-jquery-tags"%>










Echo : ${yourName}






















--
Mounir Benzid
Systementwickler / EDV

meetingmasters.de
meetings meisterhaft managen

· Unabhängige Vermittlung von Tagungshotels
· Online-Hotelreservierungssystem zur Integration in die Veranstaltungs-Webseite
· Webbasiertes Veranstaltungs- und Teilnehmermanagement
· E-Procurement für den Tagungshoteleinkauf
· Webbasierte Anfrage und Verhandlung von Firmenraten

Max-Planck-Straße 22
D-54296 Trier

fon +49 (0)651-145789-38
fax +49 (0)651-145789-20

www.meetingmasters.de
m...@meetingmasters.de


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



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://localhost:8080/myApp/test/me

I get the correct server response, that is

- a line saying "Echo: Hello me!"
- underneath it a textfield containig the phrase "Hello me !"
- followed by a submit button

This is what it looks like:
Before: http://i40.tinypic.com/vf8782.jpg

Nice.

But after I submit the form the textfield and the submit button get 
somehow mysteriously duplicated! (but not the "Echo:..." textline)


So there's still the initial textfield with the updated Hello + 
whatever-you-typed-in phrase but yet another textfield and yet another 
submit button.


The only difference I can tell between the initial and the duplicated 
textfield is that the latter never gets a refresh.

It always contains the initial "Hello me !" phrase.

This is how it looks like after the submit:
After: http://i41.tinypic.com/2ji44j.jpg

Maybe someone can tell what I'm missing here.
Thanks!


[1] http://pastebin.com/Wq0Ek1H4 (Action 
class)


[2] http://pastebin.com/6yF2xwu4 (jsp)



[1] ACTION class

package xxx.actions.yyy;

import org.apache.log4j.Logger;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Actions;
import org.apache.struts2.convention.annotation.Namespace;
import org.apache.struts2.convention.annotation.Result;

import com.opensymphony.xwork2.ActionSupport;

@Namespace("/test")
public class HelloWorldAction extends ActionSupport {

public String getYourName() {return yourName; }
public void setYourName(String value) {this.yourName = value;}

@Actions({
@Action(value="{yourName}", results={@Result(location = 
"test.jsp")}),

@Action(value="put", results={@Result(location = "test.jsp")})
})
public String execute() {
yourName = "Hello " +  yourName + " !";
logger.debug("execute: " + yourName);
return SUCCESS;
}

private static final long serialVersionUID = 1L;
private String yourName;
private static Logger logger = 
Logger.getLogger(HelloWorldAction.class);


}


[2] (jsp)
--

<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sj" uri="/struts-jquery-tags"%>










Echo : ${yourName}







Submit form here


style="display:none"/>












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

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



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 probably because it is just not a wellknown
feature.

BTW, Did you redefined the value of struts.action.extension constant? if
yes, what is the current value?
Have you ever experienced this behavior on plan redirect action (my guess
is that this have no to do with the advanced wildcard mapping) ?


Twitter :http://www.twitter.com/m_cucchiara
G+  :https://plus.google.com/107903711540963855921
Linkedin:http://www.linkedin.com/in/mauriziocucchiara

Maurizio Cucchiara


Hi Maurizio,

I never touched the default value of that constant. The default must be 
".action" I guess.
Well it's not a big deal breaker for now and like you said if it's not 
related to the adv. wildcards
we should find the culprit very soon. My guess is, that somewhere in the 
application I still use

the old-style parameter handling. So maybe that's the problem.


Cheers
 -Mounir


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: how to use Advanced wildcards

2012-01-30 Thread Mounir Benzid


Hi Maurizio,

first let me sincerly thank you for fixing this issue [1]. It works like 
a charm now. Wondering why nobody else had a similar problem maybe 
the majority is opting for the rest-plugin?


Anyway there's still a small issue regarding the redirectAction though.

After calling the parametrised actionName

...

display/{1}/{2}

...

the URL gets cluttered with the now redundant parameters (action & 
eventId) and there's still an extra ".action" attached to it as well.


like in 
http://localhost:8080/myEvents/display/edit/150.action?action=edit&eventId=150


That's the kind of URL signature that I'd like to avoid.

Is there a way to circumvent this?

Thank you again.
- Mounir

[1] 
https://issues.apache.org/jira/browse/WW-3747?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel



Am 25.01.2012 10:24, schrieb Maurizio 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 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)

/WEB-INF/pages/myevents/createevent.jsp


There 2 issues with this

A) As long as I don't use any regexp patterns like [0-9]+ in the
configuration struts is happily matching the url against "EventAction"
http://blah/event/modify/edit/123 works perfectly fine.
Though in the above example the regexp in {eventId:[0-9]+} seems to prevent
this.
http://blah/event/modify/edit/123 doesn't get resovled

B) I'm not able to use the same mechanics to redirectAction to another
action (say from A) to B).
I was hoping that "action" and "eventId" are automagically populated
through the value stack in A) and then then matching action B is called.

These are my constants btw:





thanks a lot!
- Mounir

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org




-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: how to use Advanced wildcards

2012-01-25 Thread Mounir Benzid

Am 25.01.2012 10:24, schrieb Maurizio 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 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)

/WEB-INF/pages/myevents/createevent.jsp


There 2 issues with this

A) As long as I don't use any regexp patterns like [0-9]+ in the
configuration struts is happily matching the url against "EventAction"
http://blah/event/modify/edit/123 works perfectly fine.
Though in the above example the regexp in {eventId:[0-9]+} seems to prevent
this.
http://blah/event/modify/edit/123 doesn't get resovled

B) I'm not able to use the same mechanics to redirectAction to another
action (say from A) to B).
I was hoping that "action" and "eventId" are automagically populated
through the value stack in A) and then then matching action B is called.

These are my constants btw:





thanks a lot!
- Mounir

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Done.

https://issues.apache.org/jira/browse/WW-3747


I keep you posted.

- Mounir


--
Mounir Benzid
Systementwickler / EDV

meetingmasters.de
meetings meisterhaft managen

· Unabhängige Vermittlung von Tagungshotels
· Online-Hotelreservierungssystem zur Integration in die Veranstaltungs-Webseite
· Webbasiertes Veranstaltungs- und Teilnehmermanagement
· E-Procurement für den Tagungshoteleinkauf
· Webbasierte Anfrage und Verhandlung von Firmenraten

Max-Planck-Straße 22
D-54296 Trier

fon +49 (0)651-145789-38
fax +49 (0)651-145789-20

www.meetingmasters.de
m...@meetingmasters.de


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



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.event.EventAction">


/WEB-INF/pages/myevents/createevent.jsp



There 2 issues with this

A) As long as I don't use any regexp patterns like [0-9]+ in the 
configuration struts is happily matching the url against "EventAction"

http://blah/event/modify/edit/123 works perfectly fine.
Though in the above example the regexp in {eventId:[0-9]+} seems to 
prevent this.

http://blah/event/modify/edit/123 doesn't get resovled

B) I'm not able to use the same mechanics to redirectAction to another 
action (say from A) to B).
I was hoping that "action" and "eventId" are automagically populated 
through the value stack in A) and then then matching action B is called.




These are my constants btw:






thanks a lot!
- Mounir

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org