Read and respond to this message at: 
https://sourceforge.net/forum/message.php?msg_id=4100028
By: courtenayt

Hi,

I 'm wondering if someone can show me how to access an implicit object from
my displaytag code in the java part of my jsp page, i.e. in between the <% and
%> tags.  I need to be able to access the object so I can search a database
for the info and attach it to the end of a URL displayed in the table.  Here
is the code I have that is currently working:

<% request.setAttribute("new_ncs_sc", new_ncs); %>
    <display:table name="requestScope.new_ncs_sc.rows" id="row">
    <display:column property="sfdid" title="ID" sortable="true"/>
    <display:column title="Level" sortable="true"/>
    <display:column property="form_name" title="Form Name" sortable="true"/>
    <display:column title="System Coordinator" sortable="true"/>
    <display:column property="date_submitted" title="Date Submitted" 
sortable="true"
decorator="teska.displaytag.LongDateWrapper"/>
    <display:column title="View">
        <a href="../displayView.jsp?sfdid=<c:out
value="${row.sfdid}"/>">View</a>
    </display:column>                   
    <display:column title="Take Action">
        <a href="../displayMenu.jsp?sfdid=<c:out 
value="${row.sfdid}"/>&mcid=5">Take
Action</a>
    </display:column>                                    
</display:table>

I would then use this sfdid String to access and retrieve another value from
my database returning another String called menuCategory that would be used
in the url of the last column of my table as the value of mcid (currently this
value is set to 5).

I would like to be able to somehow access the <c:out value="${row.sfdid}"/>
in a string.  Something like:

<%
    String sfdid = <c:out value="${row.sfdid}"/>
    
    String menuCategory = // use database to get needed info
%>



for example the last column may look something like: 

    <display:column title="Take Action">
        <a href="../displayMenu.jsp?sfdid=<c:out value="${row.sfdid}"/>&mcid=<%=
menuCategory %>">Take Action</a>
    </display:column>

Does anyone know if or how I could do this?  Each row of the table has a 
different
sfdid, and the menuCategory is dependent on it.  Maybe I'm going about this
in the wrong way, but I can't get anything to work.

Thanks in advance,
Courtenay

______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit: 
https://sourceforge.net/forum/unmonitor.php?forum_id=249318

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
displaytag-user mailing list
displaytag-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to