Nathalie Keymeulen

Greenhorn
+ Follow
since Dec 02, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Nathalie Keymeulen

Hi,
this is a javascript question.
You will not find a solution on this forum.
You have to search in a javascript forum.
In your popup window you will have to add onChange to your struts tag.
This must call a function which sets the value of the selected drop down in the field of the main window (see window.opener).
function xxx()
{
var selDropDownValue = document.forms[0].elements['yyy.x'].options[document.forms[0].elements['yyy.x'].selectedIndex].value;
//get selected drop down value
window.opener.document.forms[0].elements['xxx.z'].value = selDropDownValue;
//to set the value of the in the main window
window.close();
// to close the current window
}
Hope this helps you.
20 years ago
hi,
I am sorry, but I cannot give you an explanation about this.
When I red your post I remembered that I had the same problem a few months ago. I remembered that changing it to session was the solution.
I think this is a bug. I searched the web and I didnt found an explanation.
Normally <html ptions> works with request and session.
It also has to work with request I found this on the web :
http://www.tek-tips.com/gviewthread.cfm/lev2/4/lev3/29/pid/946/qid/703650
Regards
Nathalie
[ December 02, 2003: Message edited by: Nathalie Keymeulen ]
20 years ago
I think you can solve this using Struts-el :
http://jakarta.apache.org/struts/userGuide/building_view.html#struts-el
3.4.6 The Struts-EL Tag Library
I never used it myself but I red about it.
20 years ago
I always use this :
session.setAttribute( "editors", editors );
<html:form action="/Save" name="myForm" type="com.ctg.dspv.services.admLegalPerson.CreateUpdateForm" scope="session">
<html:select name="myForm" property="editorName">
<html ptions collection="editors" property="id" labelProperty="name"/>
</html:select>
</html:form>
The only difference with your solution is that I put it in the session =>
try to put it in the session and see if it is working.
I never use a define in this Case.
Hope this works.
Nathalie
20 years ago
Try this,
session.setAttribute( "editors", editors );
<html:form action="/Save" name="myForm" type="com.ctg.dspv.services.admLegalPerson.CreateUpdateForm" scope="session">
<html:select name="myForm" property="editorName">
<html ptions collection="editors" property="name" labelProperty="name"/>
</html:select>
</html:form>
ActionForm => com.ctg.dspv.services.admLegalPerson.CreateUpdateForm
with a getter and setter for editorName
20 years ago