File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Problem set session attribute Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Problem set session attribute" Watch "Problem set session attribute" New topic
Author

Problem set session attribute

Anna Ferrari
Greenhorn

Joined: Aug 18, 2006
Posts: 14
Hi,
I have this situation:



My problem is : how can I change "new Integer(1)" in javascript function with <bean:write name="cliente" property="id"/> ?
[ September 07, 2006: Message edited by: Merrill Higginson ]
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
replace

with

[ September 07, 2006: Message edited by: Merrill Higginson ]

Merrill
Consultant, Sima Solutions
Anna Ferrari
Greenhorn

Joined: Aug 18, 2006
Posts: 14
Hi,
thanks Merrill, but the value in side session attribute "cl" isn't correct.
If user selects the customer by clicking the link

<a href="javascript:indirizziCliente
(<bean:write name="cliente" property="id"/>">

the parameter "id" in side the function:

function indirizziCliente(id){

window.open('<html:rewrite page='/indgest.do?do=ricerca'/>',
'','width=500,height=400,top=100,left=700');
}

is the customer code's to use like primary key in side the following action "indgest.do?do=ricerca". That action display a list of shipment address of the customer "id".

I need to pass the customer's id select from the user and display the list with a pop up window.
How can I do?

Thanks in advance.
Anna Ferrari
Greenhorn

Joined: Aug 18, 2006
Posts: 14
Hi,
I resolve my problem doing like this:

<SCRIPT LANGUAGE="JavaScript">
function indirizziCliente(id){
var str="<html:rewrite page='/indgest.do?do=ricerca&id=" + id + "'/>";
window.open(str,'','width=500,height=400,top=100,left=700');
}
</script>

Bye.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem set session attribute
 
Similar Threads
Struts Simple question about collection
Issue in populating field in parent window
10 enteries per page?
Strut-Ajax - display states when Country selected
pass <bean:write> to a function