Re: problem with docs for convention plugin

2012-06-27 Thread Maurizio Cucchiara
We could also consider it solved IMHO, looking at the latest version
(http://goo.gl/xuprK)

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

Maurizio Cucchiara


On 26 June 2012 23:59, Dave Newton  wrote:
> It would take a re-export to change it; it was changed earlier this month
> to "x.x.x". The 2.x link, and future exports, will contain that change.
>
> Dave
>
> On Tue, Jun 26, 2012 at 5:40 PM, ChadDavis wrote:
>
>> Found a minor bug in the docs that is kind of troublesome on the user,
>> but easy to fix I'm sure . . .
>>
>>
>>
>> http://struts.apache.org/2.3.4/docs/convention-plugin.html#ConventionPlugin-Introduction
>>
>> The convention plugin points to an older version, which is actually
>> not compatible with the 2.3.4 struts core.
>>
>>
>> This is from the "Setup" section:
>>
>>
>> 
>>    org.apache.struts
>>    struts2-convention-plugin
>>    2.1.6
>> 
>>
>> -
>> 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: JasperReport Weblogic 11g NPE Problem

2012-06-27 Thread Ankit Sangoi
I had encountered a similar NPE but that was due to
servletContext.getRealPath(finalLocation) used in JasperReportsResult.java
to determine the report directory.
I solved it by enabling the "Archived Real Path" global property in
Weblogic admin console > configuration > Web Applications.

Doing same might help you.

On Tue, Jun 26, 2012 at 4:53 PM, Dian Aditya wrote:

> Hi,
>
> I've deployed my struts2 application which uses jasperreports plugin. When
> deploying
> in Glassfish3 and Tomcat, the reports working fine. But when I deploy to
> Weblogic 11g
> the following NPE is given.
>
> java.lang.NullPointerException
> at
>
> weblogic.servlet.internal.ServletResponseImpl.sendError(ServletResponseImpl.java:645)
> at org.apache.struts2.dispatcher.Dispatcher.sendError(Dispatcher.java:819)
> at
> org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:519)
> at
>
> org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
> at
>
> org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
> at
> weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
> at
>
> org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
> at
>
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
> at
> weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
> at
>
> weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
> at
>
> weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
> at
> weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
> at
>
> weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
> at
>
> weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
> at
>
> weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
> at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
> at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
>
> Anyone know how to solve this issue?
> I'm using struts 2.2.3 and struts2-jasper-reports plugin 2.2.3.
>


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: How to string concatenate listValue in struts (radio) tag?

2012-06-27 Thread 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:
>
> list="ticketDescriptions"
> listKey="id"
> listValue="ticketName"
> />
>
>
> 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
>
>
> list="ticketDescriptions"
> listKey="id"
> 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
>
>


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



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 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?
>
>
> list="ticketDescriptions"
> listKey="id"
> listValue="%{getTicketLabel(#**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);
>> 
>> }
>>
>>   >list="ticketDescriptions"
>>listKey="id"
>> listValue="%{**getTicketLabelById(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:

>>> list="ticketDescriptions"
 listKey="id"
 listValue="ticketName"
 />


 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


>>> list="ticketDescriptions"
 listKey="id"
 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.**apac**he.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
>
>


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

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