You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Sony Thomas <so...@genialgenetics.com> on 2006/03/07 12:40:32 UTC
Scriptlets cannot use inside the tabs, html:link problem
Hi friends,
I have a problem in displaying a link. I am using tabs in one of my
jsp's. I have a link which is a property in my form bean.
<%
TaskForm taskForm = (TaskForm) request.getAttribute("TaskForm");
String *objectLink *= taskForm.getObjectLink();
%>
<p align="right">
<logic:notEmpty name="TaskForm" property="objectLink" >
<html:link action="<%=*objectLink*%>"><bean:write
name="TaskForm" property="objectClassName" />:<bean:write
name="TaskForm" property="objectName" /></html:link>
</logic:notEmpty>
</p>
The above code is working. But this is outside the tabs. When I take
inside the tab it is throwing an error. The problem is I can't use
scriptlets.
<% %> inside the tab.
So I have my link value in the TaskForm, ie is my ActionForm. Is there
is any way to place the objectLink value in the form, inside the
<html:link action="">
<%=*objectLink*%> I cannot use this. Some other ways ?????? Please give
some guidance.
Thanks in advance,
Sony
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Scriptlets cannot use inside the tabs, html:link problem
Posted by Angelo zerr <an...@gmail.com>.
Hi,
you can't use scriplet whith taglib. The aim of taglib is not use scriptlet.
So, for your problem, tou can use EL syntax. With EL syntax, you wille able
to do
<html:link action="${objectLink}">
But, if you want use EL syntax, you must use taglib of Struts EL
see http://struts.apache.org/struts-el/index.html
regards
Angelo
>
2006/3/7, Sony Thomas <so...@genialgenetics.com>:
>
> Hi friends,
>
> I have a problem in displaying a link. I am using tabs in one of my
> jsp's. I have a link which is a property in my form bean.
>
>
> <%
> TaskForm taskForm = (TaskForm) request.getAttribute("TaskForm");
> String *objectLink *= taskForm.getObjectLink();
> %>
> <p align="right">
> <logic:notEmpty name="TaskForm" property="objectLink" >
> <html:link action="<%=*objectLink*%>"><bean:write
> name="TaskForm" property="objectClassName" />:<bean:write
> name="TaskForm" property="objectName" /></html:link>
> </logic:notEmpty>
> </p>
>
>
> The above code is working. But this is outside the tabs. When I take
> inside the tab it is throwing an error. The problem is I can't use
> scriptlets.
> <% %> inside the tab.
>
> So I have my link value in the TaskForm, ie is my ActionForm. Is there
> is any way to place the objectLink value in the form, inside the
> <html:link action="">
>
> <%=*objectLink*%> I cannot use this. Some other ways ?????? Please give
> some guidance.
>
>
>
>
>
> Thanks in advance,
>
>
> Sony
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>