Thank you:
This looks close to what I need. But I think I am missing something here. I am setting an abject value in the Action. Where is this object stored, on the ValueStack ? Basically I am setting a resuletSet in the action and I need a tag to display it, so How can I access it from the tag.
I tried this:

ActionContext a = ActionContext.getContext();
Object value = a.getValueStack().findValue("results");

but it's not working.


Martin Gainty wrote:
http://struts.apache.org/2.x/docs/access-to-valuestack-from-jsps.html
to quote
"There is a simple, if not elegant, solution available in JSP 2.0 EL, for exposing ValueStack to OGNL. It is possible to create custom functions that can be called from EL expressions. Functions have to be 'public static' and specified in a TLD file. To use a function, import the TLD in a JSP file where you've want to use a function."

HTH
M--

This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed. If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.


----- Original Message ----- From: "Mansour" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <user@struts.apache.org>
Sent: Friday, May 11, 2007 10:04 PM
Subject: Custom component - custom tag


where do I find tutorial about writing my own UI component ?
I wrote a tag already to be used with JSP then when I tried it with struts 2 it didn't work. Basically, because I am passing the object as string and trying to retrieve it form the context in the custom tag. This is not working because struts ( I believe passes it into a valueStack). How do I rewrite my tag. Is there a tutorial ?




---------------------------------------------------------------------
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]




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

Reply via email to