Re: Programmatic Validation in Action

2007-06-11 Thread Caine Lai
I hope this code: public void setAttribue(String attr) { this.attribute = attr; } Is a typo? If not, this is why your attribute is not being set in your action class. Also, since you are forwarding to the same page regardless of success, failure and input... are you sure it is actuall

Re: Ending session

2007-06-05 Thread Caine Lai
Probably the easiest way to do this would be to have a very short session timeout period (5minutes?) set on the server. You could then have a JavaScript function that polls the server every 5 minutes. Each ajax request made by the JavaScript will reset the session timer on the server. On 6/5/07

Re: How does one use lazy loading in Struts 2 with container managed persistence?

2007-06-04 Thread Caine Lai
http://weblogs.java.net/blog/ss141213/archive/2005/12/dont_use_persis_1.html 2. http://www.nabble.com/Re:--s2--Struts-Dependency-Injection-and-EJB3---support---or-how-can-i-Do-it--p8512920.html Caine Lai wrote: > Hi Jeromy, > > Thanks for your response. It sounds like your solution work

Re: How does one use lazy loading in Struts 2 with container managed persistence?

2007-06-02 Thread Caine Lai
n view pattern and so lazy loading can be used where appropriate. This doesn't qualify as CPM though which is what you asked for. I haven't tried using S2 with an EJB container yet. There's no need to use spring. cheers, Jeromy Evans Caine Lai wrote: > No one? This seems like

Re: How does one use lazy loading in Struts 2 with container managed persistence?

2007-06-02 Thread Caine Lai
sion in View pattern. Thoughts? On 6/1/07, Caine Lai <[EMAIL PROTECTED]> wrote: I'm using EJB3 stateless session beans/JPA/JTA to manage my data access. But I can't figure out how one would use lazy loading in this scenario since any transaction opened in the EJB layer will already be c

Re: [ANN] "Starting with Struts2" Book

2007-06-01 Thread Caine Lai
Hmmm... I registered but when I try to download the book I get a window that tells me I'm trying to access a resource...(can't read anymore cause the window is not resizable) message. On 6/1/07, Volkan OZYILMAZ <[EMAIL PROTECTED]> wrote: Thank you for this very useful and public ebook :) On

How does one use lazy loading in Struts 2 with container managed persistence?

2007-06-01 Thread Caine Lai
I'm using EJB3 stateless session beans/JPA/JTA to manage my data access. But I can't figure out how one would use lazy loading in this scenario since any transaction opened in the EJB layer will already be committed prior to rendering the view. Any tips? I'm familiar with "Open Session in View"

Re: difference between html:submit and

2007-05-23 Thread Caine Lai
Just an FYI to those that care. I for one, hate using Struts specific tags in my view layer. I've never figured out what the benefit is from straying from standardized HTML tags, especially when they are not needed. So I use regular HTML forms, controls and buttons. The only requirement to get

Re: How to forward to an unknown view in Struts 2?

2007-05-23 Thread Caine Lai
actionPackages org.apache.struts2.showcase.person musachy On 5/9/07, Dave Newton <[EMAIL PROTECTED]> wrote: > > --- Caine Lai <[EMAIL PROTECTED]> wrote: > > @Result(name=Action.SUCCESS, > > value="/resources/${resou

Re: [S2] Freemarker vs struts taglibs

2007-05-18 Thread Caine Lai
I have been using Freemarker with Struts 2 for my latest project and I'm loving it. The syntax is a gazillion times (yes, exactly that many) better than JSP in my opinion. As far as differences in the tags, there isn't any. You can do the same thing using the Freemarker Struts tags as you can u

Re: How to forward to an unknown view in Struts 2?

2007-05-09 Thread Caine Lai
for results should work just like regular xml-configured results. musachy On 5/9/07, Caine Lai <[EMAIL PROTECTED]> wrote: > > Thanks Musachy, > > But how would one do this if they were using Struts 2 annotations to map > their action classes? Is it possible? Or am I

Re: How to forward to an unknown view in Struts 2?

2007-05-09 Thread Caine Lai
result path, just make sure that you use ${expression}, instead of %{expression}, like ${forwardTo} musachy On 5/9/07, Caine Lai <[EMAIL PROTECTED]> wrote: > > Does anyone know how I can forward to a .jsp file based on a dynamic > attribute (request parameter)? > > I want

How to forward to an unknown view in Struts 2?

2007-05-09 Thread Caine Lai
Does anyone know how I can forward to a .jsp file based on a dynamic attribute (request parameter)? I want to write a Struts 2 action that will forward the user to a .jsp dynamically. The flow works like so: 1. A request is made for 'resourceLocator.action?resource=common'. 2. The resourceLocat

Re: Struts 2 StringLengthFieldValidator maxLength attr is a String!?

2007-05-07 Thread Caine Lai
/validator/annotations/StringLengthFieldValidator.html#maxLength() On 5/7/07, Dave Newton <[EMAIL PROTECTED]> wrote: --- Caine Lai <[EMAIL PROTECTED]> wrote: > So what's up with the Struts 2 > StringLengthFieldValidator's maxLength > property being a String? What?

Struts 2 StringLengthFieldValidator maxLength attr is a String!?

2007-05-07 Thread Caine Lai
So what's up with the Struts 2 StringLengthFieldValidator's maxLength property being a String? This completely screws up my ability to define the field length in an int constant. Does anyone have a workaround for this? Thanks.

How do I access Struts 2 action errors in request from Freemarker view.

2007-04-24 Thread Caine Lai
I'm trying to figure out a way to access the Struts 2 action messages in a Freemarker template. I copied the following code from the Struts template directory, into my Freemarker view, but the action errors do not show up, which tells me I must not be using the correct variable. [#if (actionErro