html:Selectalternatives

2004-03-22 Thread as as
Hi
I tried a lot but in vain, to show a certain default in a drop down as selected, using 
my select statement as follows:
select name=completeName
 logic:iterate id=teacher name=teachers 
 option value=bean:write name=teacher property =SSN/
  bean:write name=teacher property =completeName/
 /option
  /logic:iterate
  /select
 
Looking for alternatives on how to implement the same: (probably using no struts tag)
 
Any help appreciated.
Thanks,
Sam.

Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.

Re: html:Selectalternatives

2004-03-22 Thread Mark Lowe
You haven't even tried using the struts tag..

html:select property=teacher
	html:option value=--/html:option
	html:options collection=teachers property=ssn 
labelProperty=completeName /
/html:select

now if the value of teacher equals one of the ssn values it will be 
selected.

On 22 Mar 2004, at 15:26, as as wrote:

Hi
I tried a lot but in vain, to show a certain default in a drop down as 
selected, using my select statement as follows:
select name=completeName
 logic:iterate id=teacher name=teachers
 option value=bean:write name=teacher property =SSN/
  bean:write name=teacher property =completeName/
 /option
  /logic:iterate
  /select

Looking for alternatives on how to implement the same: (probably using 
no struts tag)

Any help appreciated.
Thanks,
Sam.
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: html:Selectalternatives

2004-03-22 Thread as as
MArk,
Thanks for the quick reply.
Yes, I did try that tooIt shows me correctly (in System.out.println), my form's 
default value of completeName of  teacher but on the jsp page/form bean, it shows 
the drop down sorted and not the selected value.
Really donno what could be wrong...?
Thanks in advance...
-Sam

Mark Lowe [EMAIL PROTECTED] wrote:
You haven't even tried using the struts tag..


--
labelProperty=completeName /


now if the value of teacher equals one of the ssn values it will be 
selected.

On 22 Mar 2004, at 15:26, as as wrote:

 Hi
 I tried a lot but in vain, to show a certain default in a drop down as 
 selected, using my  statement as follows:
 
 
 
 
 
 

 Looking for alternatives on how to implement the same: (probably using 
 no struts tag)

 Any help appreciated.
 Thanks,
 Sam.

 Do you Yahoo!?
 Yahoo! Finance Tax Center - File online. File on time.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.

Re: html:Selectalternatives

2004-03-22 Thread Mark Lowe
What does you form bean look like dyna or otherwise?

The value of teacher.getSsn() (i.e. html:options collection=teachers 
property=ssn ) must match the value of html:select property=teacher 
or whatever you called it. The value of teacher must be set somewhere, 
it cant do things by magic.

On 22 Mar 2004, at 15:57, as as wrote:

MArk,
Thanks for the quick reply.
Yes, I did try that tooIt shows me correctly (in System.out.println), 
my form's default value of completeName of  teacher but on the jsp 
page/form bean, it shows the drop down sorted and not the selected 
value.
Really donno what could be wrong...?
Thanks in advance...
-Sam

Mark Lowe [EMAIL PROTECTED] wrote:
You haven't even tried using the struts tag..
--
labelProperty=completeName /
now if the value of teacher equals one of the ssn values it will be
selected.
On 22 Mar 2004, at 15:26, as as wrote:

Hi
I tried a lot but in vain, to show a certain default in a drop down as
selected, using my  statement as follows:






Looking for alternatives on how to implement the same: (probably using
no struts tag)
Any help appreciated.
Thanks,
Sam.
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: html:Selectalternatives

2004-03-22 Thread as as
I am using ActionForm and not DynaActionForm
I will post back now with the actual classes...
Thanks!

Mark Lowe [EMAIL PROTECTED] wrote:
What does you form bean look like dyna or otherwise?

The value of teacher.getSsn() (i.e. html:options collection=teachers 
property=ssn ) must match the value of html:select property=teacher 
or whatever you called it. The value of teacher must be set somewhere, 
it cant do things by magic.


On 22 Mar 2004, at 15:57, as as wrote:

 MArk,
 Thanks for the quick reply.
 Yes, I did try that tooIt shows me correctly (in System.out.println), 
 my form's default value of completeName of  teacher but on the jsp 
 page/form bean, it shows the drop down sorted and not the selected 
 value.
 Really donno what could be wrong...?
 Thanks in advance...
 -Sam

 Mark Lowe wrote:
 You haven't even tried using the struts tag..


 --
 labelProperty=completeName /


 now if the value of teacher equals one of the ssn values it will be
 selected.

 On 22 Mar 2004, at 15:26, as as wrote:

 Hi
 I tried a lot but in vain, to show a certain default in a drop down as
 selected, using my statement as follows:

 





 Looking for alternatives on how to implement the same: (probably using
 no struts tag)

 Any help appreciated.
 Thanks,
 Sam.

 Do you Yahoo!?
 Yahoo! Finance Tax Center - File online. File on time.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

 Do you Yahoo!?
 Yahoo! Finance Tax Center - File online. File on time.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.