Thank you Dave:

Dave Newton wrote:
--- Mansour <[EMAIL PROTECTED]> wrote:
I don't understand this part. Is this list only for
advanced users? No wonder Struts 2 has a small community and poor documentation.

Dude. It's Saturday. Some of us do other things
besides read the Struts mailing list on Saturday.
AFAICT you posted these one hour and fifteen minutes
apart. Even if it *wasn't* Saturday, what would you
have expected to have happen?
If anybody answers *any* question on a public,
volunteer list, it's because we *want* to help people.

It's a gift, having somebody else do our work for us,
our research, our trial-and-error, our debug cycles,
our homework.

The gift of time and knowledge is not something to be
taken lightly. Some really great folks have spent a
lot of time creating WebWork/S2 and all its associated
components. A lot more people help out in whatever way
they can on the mailing list. It's not all they
do--they have families, jobs, lives.
I didn't know that the rest of the guys on this list have lives and things to do other than the list. I am wondering how did they got the time to understand struts2 then. :)

(Except for me, I have no life :)
Really ? we will see !
I am trying to perform some operation on an
object, Therefore I need to pass to the action the object id and the parameters to add for the operation. I need to set these values before the request reaches the action class. Do I do this in the interceptor, or just implement Preperable and ServletRequestAware interfaces ?

That depends entirely upon how you're "getting to" the
action in question. From a link? From a form? From an
internally-generated request?

Why wouldn't you just put the id in a form or URL?
That's all I needed to know for the last few days. I didn't know that I can use hidden fields to pass objects back. And I kept reading and searching the wrong places.

What is the difference between these two methods?

Preparable is an interface that defines a routine that
will be run when the Action is instantiated. You can
do whatever you want in it; it is not directly related
to your original question.

In other words, you mean what ever goes in the constructor of the action, goes into the Preparable. The bottom line, is it's useless then. Just one more fancy term to add the framework. right ?

ServletRequestAware is an interface that provides an
HttpServletRequest setter for your action. Since it
directly ties your action to the servlet
specification, it is probably not recommended,
particularly since there are other existing ways to do
what you want, namely ParameterAware or using the
built-in XWork type conversion functionality and
passing an ID via a URL parameter or form value and
providing a setter in your action.
I think I'll have to look into this. I have passed the whole object as a hidden field, but out of luck, it was not set again in the action. About built-in XWork type conversion, I had a quick look at the tutorial for type conversion and I don't think that's what I want. I think I need to look deeper into this.

Thank you.

Dave


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to