hello all, i'm using EP5.0 sp5.
in my iview A on a htmlb:button press i want to launch a
iview B in a new window, and i want to pass a paramter to
that new window. i've tried a couple methods of doing this,
but they've all had problems of one kind or another.
my code looks something like this:
iview A: <hbj:button
id="myButton"
design="STANDARD"
text="Press Me"
onClientClick="jsOnClick()"
onClick="click"
</hbj:button>
.... later on ....
<script language="javascript">
function jsReportMyOccurrence() {
win = window.open('/irj/servlet/prt/portal/prtroot/package.iviewB','iviewB','scrollbars=1,resizable=1,width=700,height=550,left=100');
}
</script>
and i want to pass in a param 'issue'
i've tried passing this in via ecpm & IPortalComponentSession which doesn't work since both are bound to a page, and when i call window.open() on iview B i's considered a different page and gets it's own ecpf object & IPortalComponentSession.
I then tried passing in the param via the underlying HttpSession but that also doesn't work since the new window opens up and queries the variable before the
button:jspdynPage's onClick method is called to set the variable in the HttpSession. Now i'm considering if it's possible to push the variable as a GET or POST param when i call window.open, but i'm not sure how to accomplish this in iview A or how i'd look for that param from iview B's JSPDynPage. help would be greatly appreciated.
--vat
I have done something similar on EP5 SP5.
The requirement was when you click on a link you open a new iview and you want it to retrieve a parameter. We also had some problems with EPCF so we used to a standard query string.
So the easiest way to do this is to create a javascript function which will use window.open to take you to your iview, I suggest using URLGenerator for this. Then append on ?myparam=value onto the end you should be able to retrieve this from the request object in the doInitialisation method.
You will end up with something like http://mydomain.com/irj/servlet....../myiview?myparam=myvalue.
I hope this helps.
Nick Mitchell
Sorry it won't let me edit by response before but if you use in iview A.
window.open(
'/irj/servlet/prt/portal/prtroot/package.iviewB!3fissueNumber!3d000800000460?issuenumber=2',
'issueEntry',
'location=1,scrollbars=1,resizable=1,width=700,height=550,left=100');
does it pick anything up?
Add a comment