RE: using select with country codes
You have to have getter /setter methods for country_code and country_name. You can retrieve all the countries from the county_listing and store them in a collection countrylist. Then your label property will be country_name but the value you get will be country_code. Then you can insert codes in address table. html:select property=country_code html:option value=0 key=prompt.select/html:option html:options collection=countrylist labelProperty=country_name property=country_code//html:options /html:select -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 19, 2003 9:36 AM To: [EMAIL PROTECTED] Subject: using select with country codes Hi guys I have a db table called country_listing which contains contry_codes,country_name. I also have an address table which holds the country_code. I need to implement a select which shows these country_names in the select box and the when the user choses a country the country_code has to be inserted into the address table. Please let me know how to do it if anyone has done it. --Thank you Mohan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This email may contain confidential material. If you were not an intended recipient, Please notify the sender and delete all copies. We may monitor email to and from our network. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: URGENT:static methods in JSPs
The getter method that will be called will be getCountryCode in you bean. But the jsp page is not able to recognize the bean collection. But you have to have something like: request.setAttribute(countyListing,countrylist) in your form and action classes. Also, countrylist is probably an arraylist which contains county objects. Each object has name and code. Your jsp will have something like: htnl:options collection=countryListing labelProperty=countryName property=countryCode / Anubhav -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 19, 2003 5:18 PM To: [EMAIL PROTECTED] Subject: URGENT:static methods in JSPs Hi i have a static method in one of my bean classes as public static List getCountriesListing() , and i am trying to call this collection in my options tag as html:options collection=countriesListing.countriesListing labelProperty=countryName property=countryCode / But the JSP page gives an error saying : Cannot find bean under name countriesListing.countriesListing Do i also need to create a setter for this method to be recognized as a bean or something? --Mohan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This email may contain confidential material. If you were not an intended recipient, Please notify the sender and delete all copies. We may monitor email to and from our network. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: URGENT:static methods in JSPs
I was wondering under what circumstances would you have your getter and setter methods as static? My understanding is that each application session will have its own instance of the form and action classes. Anubhav -Original Message- From: Wendy Smoak [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 19, 2003 5:36 PM To: Struts Users Mailing List Subject: RE: URGENT:static methods in JSPs Hi i have a static method in one of my bean classes as public static List getCountriesListing() Do i also need to create a setter for this method to be recognized as a bean or something? I looked at the JavaBeans specification and found sections 7.1 and 8.3.1, both of which refer to looking for 'get' methods of the form: PropertyType getFoo(); // simple getter public PropertyType get PropertyName(); The spec does not address static getter methods, my guess is that they are not allowed. -- Wendy Smoak Applications Systems Analyst, Sr. Arizona State University, PA, IRM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This email may contain confidential material. If you were not an intended recipient, Please notify the sender and delete all copies. We may monitor email to and from our network. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Dropdown and a text box
Abhijeet, This kind of thing will work but we will have to tell the users to double click to enter the values. I have seen many dropdown lists in which when you click on the display area, you can write new values or click on arrow to the right to select a values from the list. I am not sure how to do that. Thanks, -Original Message- From: Abhijeet Mahalkar [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 4:14 AM To: Struts Users Mailing List; Abhijeet Mahalkar Subject: Re: Dropdown and a text box hi anubhav Continuing previous mail rather than having Buttong along with select field add Doubleclick Event to both text field and select and hide each other on double click by checking the tpe of Object it is... abhijeet - Original Message - From: Abhijeet Mahalkar [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 1:45 PM Subject: Re: Dropdown and a text box Hi Anubhav for this you have to play along with both textfield and select show Select first and then provide a button for new entry very immediate to select and when he clicks it hide select and show text field.. i hope this must be in ur mind previously ... or may help you. abhijeet - Original Message - From: Gupta, Anubhav [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 3:46 AM Subject: Dropdown and a text box Hi, I wish to have an input filed in a form which is a drop down box, but the user can also type in a value if they do not want to select from the drop down box. I know I can use html:select for dropdown and html:text for text box. But I cannot figure out how to have an input text field in which you can type in (text box), or select a value from the drop down list. Thanks, Anubhav This email may contain confidential material. If you were not an intended recipient, Please notify the sender and delete all copies. We may monitor email to and from our network. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This email may contain confidential material. If you were not an intended recipient, Please notify the sender and delete all copies. We may monitor email to and from our network. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Dropdown and a text box
Hi, I wish to have an input filed in a form which is a drop down box, but the user can also type in a value if they do not want to select from the drop down box. I know I can use html:select for dropdown and html:text for text box. But I cannot figure out how to have an input text field in which you can type in (text box), or select a value from the drop down list. Thanks, Anubhav This email may contain confidential material. If you were not an intended recipient, Please notify the sender and delete all copies. We may monitor email to and from our network.
Collection of Updateable over multiple pages.
Hi, In my application, I am using logic:iterate tags to iterate over a collection. The collection is displayed as a table on jsp page, and I use indexed=true attributes to display individual fields which are all updateable. This collection can sometimes be very big (like 500). I wish to break it into multiple pages, and allow user to browse and update any value. How should I do it? Currently I have only one form and action class. Thanks, Anubhav This email may contain confidential material. If you were not an intended recipient, Please notify the sender and delete all copies. We may monitor email to and from our network.
Help- Not able to pass the index
I have the code fragment which passes the current index in logic:iterate tag to the javascript function openChildWindowNew. I am not able to do that as index value is never passed because indexed counter is never evaluated. The code is like: logic:iterate id=finduser name=userlist indexId=ind tr width=100% td align=left width=50% bean:write name=finduser property=username filter=true/ /td td align=left width=50% html:text name=finduser property=role size=30 maxlength=30 indexed=true onclick=javascript:openChildWindowNew( ind ) / /td /tr /logic:iterate any help is appreciated. Anubhav This email may contain confidential material. If you were not an intended recipient, Please notify the sender and delete all copies. We may monitor email to and from our network.