Re: html:select problem

2008-12-30 Thread sourav biswas
It seems to me the syntax is wrong .. try this




# 
Use <%=genreIds[0]%> 
insteed of <%="genreIds[0]"%>

Just remove the quotes ... 

--- On Sun, 28/12/08, Gordian Yuan  wrote:

> From: Gordian Yuan 
> Subject: Re: html:select problem
> To: "Struts Users Mailing List" 
> Date: Sunday, 28 December, 2008, 8:31 PM
> http://www.theserverside.com/discussions/thread.tss?thread_id=35726
> 
> or
> 
> you can search it use google
> 
> http://www.google.com/search?hl=zh-CN&q=select+default+option+struts&btnG=Google+搜索&lr=<http://www.google.com/search?hl=zh-CN&q=select+default+option+struts&btnG=Google+%E6%90%9C%E7%B4%A2&lr=>
> 
> 
> 
> On Sat, Dec 27, 2008 at 7:33 PM, Tanb81
>  wrote:
> 
> >
> > hi,
> >   I am developing a project on struts. I have a drop
> down like :-
> >
> >  styleClass="inputbox">
> >collection="genres" property="value"
> > labelProperty="label"/>
> > 
> >
> > Now I need a value of this dropdown to be
> automatically selected based on a
> > value which is coming  from previous page. The problem
> is I am not able to
> > do this because I am new to Struts.
> >
> > Please help me out.
> > Thanks in advance.
> >
> >
> >
> > --
> > View this message in context:
> >
> http://www.nabble.com/html%3Aselect-problem-tp21183393p21183393.html
> > Sent from the Struts - User mailing list archive at
> Nabble.com.
> >
> >
> >
> -
> > To unsubscribe, e-mail:
> user-unsubscr...@struts.apache.org
> > For additional commands, e-mail:
> user-h...@struts.apache.org
> >
> >


  Connect with friends all over the world. Get Yahoo! India Messenger at 
http://in.messenger.yahoo.com/?wm=n/

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: html:select problem

2008-12-28 Thread Tanb81

Thanks a lot Gordian Yuan :clap:

Thanks for giving such useful links.

I found solution for my problem :jumping:

Thanks :handshake:

-- 
View this message in context: 
http://www.nabble.com/html%3Aselect-problem-tp21183393p21199660.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: html:select problem

2008-12-28 Thread Gordian Yuan
http://www.theserverside.com/discussions/thread.tss?thread_id=35726

or

you can search it use google

http://www.google.com/search?hl=zh-CN&q=select+default+option+struts&btnG=Google+搜索&lr=



On Sat, Dec 27, 2008 at 7:33 PM, Tanb81  wrote:

>
> hi,
>   I am developing a project on struts. I have a drop down like :-
>
> 
>labelProperty="label"/>
> 
>
> Now I need a value of this dropdown to be automatically selected based on a
> value which is coming  from previous page. The problem is I am not able to
> do this because I am new to Struts.
>
> Please help me out.
> Thanks in advance.
>
>
>
> --
> View this message in context:
> http://www.nabble.com/html%3Aselect-problem-tp21183393p21183393.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


html:select problem

2008-12-27 Thread Tanb81

hi,
   I am developing a project on struts. I have a drop down like :-


 


Now I need a value of this dropdown to be automatically selected based on a
value which is coming  from previous page. The problem is I am not able to
do this because I am new to Struts.

Please help me out.
Thanks in advance.



-- 
View this message in context: 
http://www.nabble.com/html%3Aselect-problem-tp21183393p21183393.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: html:select Problem !!

2005-07-12 Thread EROL TEZCAN
Oh,
 
I think there are two ways to define html:select
 


 
Anyway,
 
Best way to fill the html:select ?
 
Erol

[EMAIL PROTECTED] wrote:

you have the html:options set correctly in the first example

 


in the second example you changed to:




try:






" src="cid:10__=0ABBFAAFDFD86F@powersystems.rockwell.com"; width=16>EROL TEZCAN 
<[EMAIL PROTECTED]>


EROL TEZCAN <[EMAIL PROTECTED]> 
07/12/2005 09:38 AM Please respond to
"Struts Users Mailing List" 






To

sturts_apache_user sturts_apache_user 
cc


Subject

html:select Problem !!
Hi all,

I want to set records come from database into a html:select tag. I found some 
example like below

 


When I set th options as static , the list comes without any problem. But when 
I create a html:select dynamicly from DB , I get error.

In my Action class, it has a method called getSikayetler() like this.


Sikayet sikayet = null;
ArrayList sikayetler = new ArrayList();

while (rs.next()) {
   sikayet = new Sikayet();
   sikayet.setSikayetKodu(rs.getString("SIKAYET_KODU"));
   sikayet.setSikayet(rs.getString("ACIKLAMA"));
   sikayetler.add(sikayet);
   }



When I created an ArrayList, I send it to my Action class and in my Action 
class I set this ArrayList to request like below 



ArrayList listeDondur = getSikayetler();

request.setAttribute("sikayetler", listeDondur);



sikayetler ArrayList is not null and empty, I tested it.



How must I use this request object called sikayetler in html:select ? 











usage of above is wrong?



In Sikayet class there are get and set methods like sikayetKodu and sikayet .



How can I fill html:select tag with records coming from DB? 



Any help, sample codes?



Thanks



Erol





-
Sell on Yahoo! Auctions  - No fees. Bid on great items.



-
 Sell on Yahoo! Auctions  - No fees. Bid on great items.

Re: html:select Problem !!

2005-07-12 Thread Martin Gainty

Erol
Assuming you have your own MyBean which contains 2 string fields 
SIKAYET_KODU and ACIKLAMA

try this in your jsp
<%
List sikayetler = new ArrayList();
sikayetler.add( new MyBean( "SIKAYET_KODU1", "ACIKLAMA1" ));
sikayetler.add( new MyBean( "SIKAYET_KODU2", "ACIKLAMA2" ));
%>

  labelProperty="ACIKLAMA"/>


Anyone else?
Martin-
- Original Message - 
From: "EROL TEZCAN" <[EMAIL PROTECTED]>

To: "sturts_apache_user sturts_apache_user" 
Sent: Tuesday, July 12, 2005 9:38 AM
Subject: html:select Problem !!



Hi all,

I want to set records come from database into a html:select tag. I found 
some example like below


 />



When I set th options as static , the list comes without any problem. But 
when I create a html:select dynamicly from DB , I get error.


In my Action class, it has a method called getSikayetler() like this.


Sikayet sikayet = null;
ArrayList sikayetler = new ArrayList();

while (rs.next()) {
   sikayet = new Sikayet();
   sikayet.setSikayetKodu(rs.getString("SIKAYET_KODU"));
   sikayet.setSikayet(rs.getString("ACIKLAMA"));
   sikayetler.add(sikayet);
   }



When I created an ArrayList, I send it to my Action class and in my Action 
class I set this ArrayList to request like below




ArrayList listeDondur = getSikayetler();

request.setAttribute("sikayetler", listeDondur);



sikayetler ArrayList is not null and empty, I tested it.



How must I use this request object called sikayetler in html:select ?





/>






usage of above is wrong?



In Sikayet class there are get and set methods like sikayetKodu and 
sikayet .




How can I fill html:select tag with records coming from DB?



Any help, sample codes?



Thanks



Erol





-
Sell on Yahoo! Auctions  - No fees. Bid on great items. 


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



Re: html:select Problem !!

2005-07-12 Thread BHansard

you have the html:options set correctly in the first example

  


in the second example you changed to:

		 


try:

		 




EROL TEZCAN <[EMAIL PROTECTED]>








EROL TEZCAN <[EMAIL PROTECTED]> 
07/12/2005 09:38 AM

Please respond to
"Struts Users Mailing List" 








To
sturts_apache_user sturts_apache_user 


cc



Subject
html:select  Problem !!








Hi all,
 
I want to set records come from database into a html:select tag. I found some example like below

  


When I set th options as static , the list comes without any problem. But when I create a html:select dynamicly from DB , I get error.

In my Action class, it has a method called getSikayetler() like this.


 Sikayet sikayet = null;
 ArrayList sikayetler = new ArrayList();

 while (rs.next()) {
                sikayet = new Sikayet();
                sikayet.setSikayetKodu(rs.getString("SIKAYET_KODU"));
                sikayet.setSikayet(rs.getString("ACIKLAMA"));
                sikayetler.add(sikayet);
            }

 

When I created an ArrayList, I send it to my Action class and in my Action class I set this ArrayList to request like below 

 

ArrayList listeDondur = getSikayetler();

request.setAttribute("sikayetler", listeDondur);

 

sikayetler ArrayList is not null and empty, I tested it.

 

How must I use this request object called sikayetler in html:select ? 

 



		 



 

usage of above is wrong?

 

In Sikayet class there are get and set methods like sikayetKodu and sikayet .

 

How can I fill html:select tag with records coming from DB? 

 

Any help, sample codes?

 

Thanks

 

Erol




		 		 
-
 Sell on Yahoo! Auctions  - No fees. Bid on great items.



html:select Problem !!

2005-07-12 Thread EROL TEZCAN
Hi all,
 
I want to set records come from database into a html:select tag. I found some 
example like below

  


When I set th options as static , the list comes without any problem. But when 
I create a html:select dynamicly from DB , I get error.

In my Action class, it has a method called getSikayetler() like this.


 Sikayet sikayet = null;
 ArrayList sikayetler = new ArrayList();

 while (rs.next()) {
sikayet = new Sikayet();
sikayet.setSikayetKodu(rs.getString("SIKAYET_KODU"));
sikayet.setSikayet(rs.getString("ACIKLAMA"));
sikayetler.add(sikayet);
}

 

When I created an ArrayList, I send it to my Action class and in my Action 
class I set this ArrayList to request like below 

 

ArrayList listeDondur = getSikayetler();

request.setAttribute("sikayetler", listeDondur);

 

sikayetler ArrayList is not null and empty, I tested it.

 

How must I use this request object called sikayetler in html:select ? 

 







 

usage of above is wrong?

 

In Sikayet class there are get and set methods like sikayetKodu and sikayet .

 

How can I fill html:select tag with records coming from DB? 

 

Any help, sample codes?

 

Thanks

 

Erol





-
 Sell on Yahoo! Auctions  - No fees. Bid on great items.

Re: (newbie) html:select problem

2005-01-26 Thread Will Stranathan
This seems to come up frequently.  You have to add some Javascript on 
the client side to either populate hidden form fields or to iterate 
through the entire target set and select them all - the values don't 
get passed in the HTTP request unless it's selected.

w
On Wed, 26 Jan 2005 23:01:19 +0530
 "Sudheer" <[EMAIL PROTECTED]> wrote:
Hi,
 In the below given code I am populating the html:select property 
'from'
using a
java bean. On clicking the '>>' button I am moving the selected 
option from
''from' to 'to' html:select using the javascript function move().

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


(newbie) html:select problem

2005-01-26 Thread Sudheer
Hi,

  In the below given code I am populating the html:select property 'from'
using a
java bean. On clicking the '>>' button I am moving the selected option from
''from' to 'to' html:select using the javascript function move().

  The selected values are displayed in the 'to' html:option, but I am not
getting
the value in the Form.java function

public Integer[] getTo()
{
  return to;
}

  Any help is greatly appreciated. Thank you.

Sudheer


<%@ page language="java" session="true" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>


function move( from, to )
{
  toMove = from.options[ from.selectedIndex ];
  opt = new Option( toMove.text, toMove.value, false, false );
  to.options[to.length] = opt;
  return true;
}