Home > Archive > Java Help > April 2005 > Integrating Old School JSP Development Methods with new school ideas
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Integrating Old School JSP Development Methods with new school ideas
|
|
| Brian Munroe 2005-04-26, 8:58 pm |
| I am refactoring some old JSP code, trying to use JSTL and I am running
into a problem, hopefully someone can help me.
In the JSP, it accesses a Bean that returns an ActionPlan object that I
write the values of out in a web form, for example, at the top of the
form I have:
<% ActionPlan ap1 = iBean.getActionPlan(request.getParameter("id")); %>
and then, throughout the web form, I have
<input type="text" value="<%= ap1.getTitle() %>" />
This works great for most things, but I would like to pass
ap1.getTitle() as an attribute value for a custom tag. For example:
<mytag:ActionPlanStatusPickList selected="${ap1.getStatus()}" />
The problem is, it doesn't seem that ap1.getStatus() is available as an
EL expression.
Any ideas how to overcome this?
thanks
-- brian
| |
| Oscar kind 2005-04-27, 3:59 am |
| Brian Munroe <brian.e.munroe@gmail.com> wrote:
> I am refactoring some old JSP code, trying to use JSTL and I am running
> into a problem, hopefully someone can help me.
>
> In the JSP, it accesses a Bean that returns an ActionPlan object that I
> write the values of out in a web form, for example, at the top of the
> form I have:
>
> <% ActionPlan ap1 = iBean.getActionPlan(request.getParameter("id")); %>
>
> and then, throughout the web form, I have
> <input type="text" value="<%= ap1.getTitle() %>" />
>
> This works great for most things, but I would like to pass
> ap1.getTitle() as an attribute value for a custom tag. For example:
>
> <mytag:ActionPlanStatusPickList selected="${ap1.getStatus()}" />
>
> The problem is, it doesn't seem that ap1.getStatus() is available as an
> EL expression.
Can you access the bean "ap1"? If so, you can probably access the property
"ap1.title".
--
Oscar Kind http://home.hccnet.nl/okind/
Software Developer for contact information, see website
PGP Key fingerprint: 91F3 6C72 F465 5E98 C246 61D9 2C32 8E24 097B B4E2
| |
| Brian Munroe 2005-04-27, 3:59 am |
|
Oscar kind wrote:
>
> Can you access the bean "ap1"? If so, you can probably access the
property
> "ap1.title".
>
I suppose I can make that attribute public and try it that way..
thanks
-- brian
|
|
|
|
|