New Struts2/Hibernate/Spring tutorial

2010-02-01 Thread Hulbert Chris
Hi all, I've recently been working on a Struts2/Hibernate/Spring beginners tutorial for some internal training at work, and was thinking that perhaps it could have some worth to the greater struts community, can anyone let me know if theres a site where it would belong and if you think it's accurat

Re: struts 2, writing a custom tag that is able to access objects in ActionContext using OGNL

2010-02-01 Thread Bill Bohnenberger
Aye, but whoops, I forgot this one :) import com.opensymphony.xwork2.util.ValueStack; Cheers, Bill On Mon, Feb 1, 2010 at 2:18 PM, Jake Vang wrote: > bill, thanks for including the code (especially the import statements > so i will know where these objects/classes are coming from). > > On Mon,

Re: struts 2, writing a custom tag that is able to access objects in ActionContext using OGNL

2010-02-01 Thread Jake Vang
bill, thanks for including the code (especially the import statements so i will know where these objects/classes are coming from). On Mon, Feb 1, 2010 at 11:09 AM, Bill Bohnenberger wrote: > Hi Jake, > > I have a custom table tag that needs Value Stack access, too. > Here's how I do it: > > packa

Re: How to handle input from iterated output

2010-02-01 Thread Craig Ricciuto
Thank you very much. This seems to be exactly what I need. On Mon, Feb 1, 2010 at 11:38 AM, Stephen Turner wrote: > On Mon, 01 Feb 2010 10:55:55 -0500, Craig Ricciuto < > cricci...@symboticware.com> wrote: > > Hi, just a quick question. >> I have a class that has 4 fields. 2 Strings, 1 int, 1 b

Re: How to handle input from iterated output

2010-02-01 Thread Stephen Turner
On Mon, 01 Feb 2010 10:55:55 -0500, Craig Ricciuto wrote: Hi, just a quick question. I have a class that has 4 fields. 2 Strings, 1 int, 1 boolean. I shall refer to this class as MyClass In my Action class I have a List (call it MyList) that is a list of MyClass. It can be populated with

Re: struts 2, writing a custom tag that is able to access objects in ActionContext using OGNL

2010-02-01 Thread Bill Bohnenberger
Hi Jake, I have a custom table tag that needs Value Stack access, too. Here's how I do it: package... import org.apache.struts2.views.jsp.TagUtils; import org.apache.struts2.util.MakeIterator; public class TableTag extends SimpleTagSupport { private String list; public void doTag() thr

How to handle input from iterated output

2010-02-01 Thread Craig Ricciuto
Hi, just a quick question. I have a class that has 4 fields. 2 Strings, 1 int, 1 boolean. I shall refer to this class as MyClass In my Action class I have a List (call it MyList) that is a list of MyClass. It can be populated with as little as 1 item or as many as say 256 items (could be more but

Re: struts 2, writing a custom tag that is able to access objects in ActionContext using OGNL

2010-02-01 Thread Jake Vang
i found something helpful here. it works. http://struts.apache.org/2.1.8.1/docs/access-to-valuestack-from-jsps.html On Mon, Feb 1, 2010 at 7:34 AM, Jake Vang wrote: > i was wondering if it was possible to write a custom tag that is able > to access objects in the ActionContext using OGNL? i'm

Re: interceptor is not being called for all action

2010-02-01 Thread Jake Vang
there were 2 approaches to getting a custom stack to work (using the convention plugin). approach 1: use annotations. for example, use @ParentPackage("default") for each Action class you want to use your custom stack. also, use @InterceptorRef for each method that you want to use your custom stack

struts 2, writing a custom tag that is able to access objects in ActionContext using OGNL

2010-02-01 Thread Jake Vang
i was wondering if it was possible to write a custom tag that is able to access objects in the ActionContext using OGNL? i'm not sure if this is a "correct" question. my problem is that i have a form. the form is posted to an action. the action has getters/setters for the form fields. i then forwa

Iterator help needed

2010-02-01 Thread RogerV
I'm trying to do something similair to the example given in http://struts.apache.org/2.x/docs/iterator.html where I'm trying to pass each iterator value to an action. I'm using Struts 2.0.18 and the Convention plugin. I know that assigning value="value" is confusing, but this is from the middle

internationalize displaytag into struts2 [RESOLVED]

2010-02-01 Thread Nicola Bortolotti
It works!! Summarize, for dummy newbies as me, - create "I18nStruts2Adapter.java" as posted by Lacasz; - modify property "locale.provider=..I18nStruts2Adapter" in org/diplaytag/properties/displaytag.properties; - internationalize your columns header using titleKey and putting descriptions in "pack

Re: internationalize displaytag into struts2

2010-02-01 Thread Lukasz Lenart
2010/2/1 Nicola Bortolotti : > but the message store in the file "displaytag.propertis" into library > "displaytag-1.2.jar" always appear.. > Now my file is under the same package as the action, maybe I've to put > it in other place? > Any tips? WEB-INF/classes Regards -- Lukasz http://www.lena

Re: internationalize displaytag into struts2

2010-02-01 Thread Nicola Bortolotti
No I haven't, but now I create it, the file contains follow row: paging.banner.one_item_found=blablabla (in really, I copy and put this property almost everywhere..) but the message store in the file "displaytag.propertis" into library "displaytag-1.2.jar" always appear.. Now my file is under the

Re: internationalize displaytag into struts2

2010-02-01 Thread Lukasz Lenart
2010/2/1 Nicola Bortolotti : > Reading display tag documentation > (http://displaytag.sourceforge.net/1.2/i18n.html) I see that to modify > some message, e.g. "paging.banner.one_item_found", I've to write imply > property in a file called "displaytag_LANGUAGE.properties". > I do that, I've also try

Re: internationalize displaytag into struts2

2010-02-01 Thread Nicola Bortolotti
Sorry for the later, THANK YOU Lukas!! With your "I18nStruts2Adapter" code I can finally use titleKey to internationalize column header, but new problem arise. Reading display tag documentation (http://displaytag.sourceforge.net/1.2/i18n.html) I see that to modify some message, e.g. "paging.banner

Re: struts 2 and servlets, how to exclude servlet url patterns from struts filter

2010-02-01 Thread Jake Vang
thanks, that addressed my problem directly. although, i liked the no action extension approach. is there a feature request to pass in init-params to the struts filter to exclude certain url patterns? On Sun, Jan 31, 2010 at 6:56 PM, Greg Lindholm wrote: > Check out the "Filter Mapping, default A

Transform values - Type conversion

2010-02-01 Thread Diego Manilla Suárez
Hi. I have a simple problem: I need to divide by 100 user's input in some fields when I'm going to store values in DB and perform the opposite operation when loading the form again. I thought Struts 2 type conversion was what I needed, so I created a simple PercentageConverter, implementing co