unsubscribe -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Thursday, 22 November 2007 4:25 AM To: displaytag-user@lists.sourceforge.net Subject: Re: [displaytag-user] Using Link on Column to populate fields (plural!) in parent screen
I've successfully gone with the TableDecorator solution as suggested by Ed - it's more obvious/cleaner than using my taglib function solution from yesterday. Code for reference: > public String getReturnValuesLink() { > String returnAssignmentsStr = ""; > > String[] assignmentPairs = (String[]) > this.getPageContext().getAttribute("returnValueAssignmentPairs"); > String linkField = (String) > this.getPageContext().getRequest().getParameter("linkField"); > > for (int i=0; i<assignmentPairs.length; i++){ > String assignTo = assignmentPairs[i].split("=")[0]; > String assignFrom = assignmentPairs[i].split("=")[1]; > String fieldValue = evaluate(assignFrom).toString(); > returnAssignmentsStr = returnAssignmentsStr + assignTo + "=" + > fieldValue; > > if (i<assignmentPairs.length-1){ > returnAssignmentsStr += ";"; > } > } > > return "<a href=\"#\" class=\"DATA-LINK\" > onclick=\"javascript:populate_parent('" + returnAssignmentsStr + > "')\">" > + evaluate(linkField).toString() + "</a>"; > > } > -- View this message in context: http://www.nabble.com/Using-Link-on-Column-to-populate-fields-%28plural% 21%29-in-parent-screen-tf4811614.html#a13881711 Sent from the DisplayTag - General mailing list archive at Nabble.com. ------------------------------------------------------------------------ - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ displaytag-user mailing list displaytag-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/displaytag-user ------------------------------------------ Promoting a Just and Safe Society Visit us at www.lawlink.nsw.gov.au Please note the Attorney General's Department of NSW has moved to new corporate headquarters at 160 Marsden Street, Parramatta. Postal address: Locked Bag 5111, Parramatta NSW 2124. Tel: 02 8688 7777 Fax: 02 8688 7980 Please consider our environment before printing this email. This email and any attachments may be confidential and contain privileged information. If you are not the intended recipient you must not use, disclose, copy or distribute this communication. If you have received this message in error please delete and notify the sender. When communicating by email you conse nt to the monitoring and recording of that correspondence. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ displaytag-user mailing list displaytag-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/displaytag-user