Basically, if you have scriptlet code in a tag libraries attribute value (i.e.
requestURI's value), the scriplet must be the *entire* value, not just part of
it. As for the single quotes - you have to use those or the tag will think the
value ended at the first " - and if you try and use single quotes in the
scriptlet, Java will think it's a char - causing a compiler error.
HTH,
Matt
--- did <[EMAIL PROTECTED]> wrote:
> Thanks Matt! It works great!
> I am still a little bit confused about the JSP syntaxe.
>
> D.
>
> Matt Raible wrote:
>
> >Try:
> >
> >requestURI='<%="searchAccount.do?dest="+dest%>'>
> >
> >
> >--- did <[EMAIL PROTECTED]> wrote:
> >
> >
> >>Hi all,
> >>
> >>Here is my problem:
> >>I want to implements a "Source" page that call a second "Search" Page.
> >>The "Search" page is a simple popup that allow the user to query a DB
> >>table with a filter.
> >>
> >>When the user is satisfied with her filter, she click on one of the
> >>found elements, and its reference is copied onto the "Source" page. Of
> >>course I want to use a display tag to display the result list :-))))
> >>
> >>The problem is that I need to keep the "destination" field between
> >>clients calls. But I didn't find how to update the display genereated URL.
> >>
> >>indeed if I want to do someting like:
> >>
> >><bean:parameter id="dest" name="dest"/>
> >><display:table
> >> name="user_registry"
> >> tableId="account.book"
> >> property="searchAccounts"
> >> decorator="com.my.test.display.SearchJSWrapper"
> >> scope="session"
> >> pagesize="3"
> >> requestURI="searchAccount.do?dest=<%=dest%>">
> >>
> >>
> >>Display library do not replace "dest" with its correct value. I had to
> >>do a very nasty Hacks just after ... something very funny to debug such as:
> >>
> >><%
> >>
> >>
> >>
> >>
>
>_jspx_th_display_table_0.setRequestURI(_jspx_th_display_table_0.getRequestURI()
> >
> >
> >>+ dest);
> >>%>
> >>
> >>
> >>Does anybody has an idea to implements this without this ugly (not
> portable)
> >>code?
> >>Is it possible? Is it a JSP/TagLib limitation? (I actually have the same
> >>problem with the <html:> tag)
> >>
> >>Thanks for your help,
> >>Didier
> >>
> >>
> >>PS: Here is the complete code of my "Search" screen. (not cleaned up,
> sorry)
> >>
> >>
> >><%@ page language="java" %>
> >><%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
> >><%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
> >><%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
> >><%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
> >><%@ taglib uri="/WEB-INF/display.tld" prefix="display" %>
> >>
> >><!DOCTYPE HTML PUBLIC "-//w3c//dtd html 4.0 transitional//en">
> >><html>
> >><head>
> >><title>Search Account</title>
> >></head>
> >><body bgcolor="#FFFFFF">
> >>
> >><bean:parameter id="dest" name="dest"/>
> >><SCRIPT LANGUAGE="JavaScript">
> >><!--
> >>function pick(symbol) {
> >> if (window.opener && !window.opener.closed) {
> >> opener.document.<%=dest%>.value = symbol ;
> >> }
> >> window.close();
> >>}
> >>// -->
> >></SCRIPT>
> >>
> >>Search for an Account.
> >>
> >><!-- The code below do not work with the HTML display tag-->
> >><form name="search"
> >>action="<%=request.getContextPath()%>/searchAccount.do?dest=<%=dest%>"
> >>method="post">
> >><table border="0">
> >> <tr>
> >> <td nowrap>Company Name</td>
> >> <td nowrap>Code</td>
> >> </tr>
> >> <tr>
> >> <td nowrap><INPUT TYPE="text" NAME="name" SIZE="10"></td>
> >> <td nowrap><INPUT TYPE="text" NAME="code" SIZE="5"></td>
> >></table>
> >> <INPUT TYPE="submit" VALUE="[Search]" />
> >><form>
> >>
> >><display:table
> >> name="user_registry"
> >> tableId="account"
> >> property="searchAccounts"
> >> decorator="com.my.test.display.SearchJSWrapper"
> >> scope="session"
> >> pagesize="3"
> >> requestURI="searchAccount.do?dest="
> >> >
> >>
> >><%
> >> /*
> >> // This is avery AWFULL Hacks... But requestURI="searchAccount.do?dest="
> >> // seems not to support %=dest% tags
> >> // Of course there is no warranty this code runs on something else than
> >>Tomcat..
> >> */
> >> _jspx_th_display_table_0.setRequestURI(
> >> _jspx_th_display_table_0.getRequestURI() + dest);
> >>%>
> >>
> >> <display:column property="JSLink" /> <!-- JSLink is a decorator that
> build
> >>the correct javascript:pick() code -->
> >> <display:column property="code" />
> >>
> >> <display:setProperty name="paging.banner.include_first_last" value="true"
> >>/>
> >></display:table>
> >>
> >></body>
> >></html>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>-------------------------------------------------------
> >>This SF.Net email sponsored by: Parasoft
> >>Error proof Web apps, automate testing & more.
> >>Download & eval WebKing and get a free book.
> >>www.parasoft.com/bulletproofapps
> >>_______________________________________________
> >>displaytag-user mailing list
> >>[EMAIL PROTECTED]
> >>https://lists.sourceforge.net/lists/listinfo/displaytag-user
> >>
> >>
> >>
> >>
> >
> >
> >__________________________________
> >Do you Yahoo!?
> >SBC Yahoo! DSL - Now only $29.95 per month!
> >http://sbc.yahoo.com
> >
> >
> >-------------------------------------------------------
> >This SF.Net email sponsored by: Parasoft
> >Error proof Web apps, automate testing & more.
> >Download & eval WebKing and get a free book.
> >www.parasoft.com/bulletproofapps
> >_______________________________________________
> >displaytag-user mailing list
> >[EMAIL PROTECTED]
> >https://lists.sourceforge.net/lists/listinfo/displaytag-user
> >
> >
> >
> >
>
>
>
> -------------------------------------------------------
> This SF.Net email sponsored by: Parasoft
> Error proof Web apps, automate testing & more.
> Download & eval WebKing and get a free book.
> www.parasoft.com/bulletproofapps1
> _______________________________________________
> displaytag-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/displaytag-user
>
>
__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps1
_______________________________________________
displaytag-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/displaytag-user