html:options

2003-07-09 Thread sjones
Good Morning Everyone.

I have a List object and i need my JSP page
to build a drop down list box using the List as the source
for the options.

I can do it with a scriplet but i need to one of the struts tags



can anyone help me with use one of these tags.

I am looking at the java.docs but it doesn't really help me.

the List is also accessible from a classs name EqualityOperators

List o = EqualityOperators.getOperators();





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



html:options

2003-10-12 Thread ajay brar
hi!
i have the following scenario
in my database i have an Agency table(which includes the attribute 
AGENCY_ID) and a Client tables(which includes a AGENCY_ID that maps to the 
id in the Agency table)
agencies are created first through a web interface.
after that you create Clients. what i want is that when you are filling in 
the details for the client, i want  a drop down list that includes the 
AGENCY_ID of all agencies that are in the database. so the person fiiling in 
the info can select a particular AGENCY_ID for that client)
right now in my ClientForm, i have an int agencyId. i want this populated on 
the basis of the selection made form the drop down list.

how do i do this? any suggestions?
i'm thinking of  reading all agencies, chucking them into a collection, 
placing the collection in the session context and then reading off it in the 
jsp page using html:options

The downside to that is that my ClientAction forwrads to client.jsp(where 
you add client details). And i do not particularly want to put all the 
Agency reading bit into ClientAction.
I could use a separate Java class, but i have an action DisplayAgency that 
reads all the agencies from the database, adds them to a User bean, puts 
this in session context and later the page this action forwards to uses 
logic:iterate to move through the collection in the User bean and display 
it. Having another Java class to read only the id's and put them in a 
collection and place this in sesision seems like duplicatng an existing 
task(with sme minor differences)

are there any other ways of doing this?

thanks
cheers
ajay
_
Chat via SMS. Simply send 'CHAT' to 1889918. More info at  
http://ninemsn.com.au/mobilemania/MoChat.asp?blipid=6800

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


Html:options

2003-03-12 Thread Renato Romano
Is there a way of obtaining a  element where one of the 
sub-elements has the SELECTED attribute ?
Thanks


Renato Romano
Sistemi e Telematica S.p.A.
Calata Grazie - Vial Al Molo Giano
16127 - GENOVA

e-mail: [EMAIL PROTECTED]
Tel.:   010 2712603
_




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



html:options

2002-09-29 Thread Doug Dates

I want to display a dropdown list. The list items are "By First Name", "By
Last Name", "By Date". I think I can do it by the following way:


 By First Name 
 By Last Name 
 By Date 


Is there any disadvantages to use above approach compared with using
? If I use  instead of using above
individual ,as following:


  


where should I set myArrayList? in init method of my servlet class, or in my
action form bean, or somewhere else? I am not quite understand it. Could
some one please help me?

Thank you

Doug



__ 
Post your free ad now! http://personals.yahoo.ca

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




html:options

2002-07-16 Thread tsawyer

Hi,

We're trying to use the html:options tag (struts 1.0.2) to render a drop list 
containing the values from a String Tokenizer, which is tokenizing a comma delimited 
string.  We just want a drop list that contains each of the values in the list, with 
the value and description identical.

The behaviour we are seeing is that we are getting half the number of options, because 
the code is sticking the first value from the list as the value, then the second as 
the description, then the third as the second value, and the forth as the second 
description. 

This would appear to be bourne out by this code from the tag itself:

  // Otherwise, use the separate iterators mode to render options
else {

  // Construct iterators for the values and labels collections
  Iterator valuesIterator = getIterator(name, property);
  Iterator labelsIterator = null;
  if ((labelName == null) && (labelProperty == null))
  labelsIterator = getIterator(name, property); // Same coll.
  else
  labelsIterator = getIterator(labelName, labelProperty);

  // Render the options tags for each element of the values coll.
  while (valuesIterator.hasNext()) {
  String value = valuesIterator.next().toString();
  String label = value;
  if (labelsIterator.hasNext())
  label = labelsIterator.next().toString();
  addOption(sb, value, label,
selectTag.isMatched(value));
  }
}

It's using the same iterator for labels and values, and doing a next() twice per row.

Is this a bug?  Am I missing something obvious?

Cheers,

Tim.





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




html:options

2001-07-14 Thread Yuriy Zubarev

Hello everyone,

I have a property "countriesList" of "userForm" bean
which itself a list of beans which contain "code" and
"description" properties. And I need to display a listbox
populated with list of countries. The only way I made it work is:







And I was wonderion if it's possible to get rid of bean:define
tag and use just html:options facilities to render needed information.

As I undestood from struts documentation, I shouldn't use "collection"
attribute in this case and use "name" and "property" (and combination
of "labelName" and "labelProperty"). But no matter what I tried
I always got an error page.

Thank you for your time.

Best of luck,
Yuriy Zubarev



__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



HTML:OPTIONS

2001-09-13 Thread Chris Heinemann

I have a collection of java.lang.String objects.  How do I get the
html:options tag to output them?

My code is :
<%
Collection c = reportBuilder.getAvailableStartDates();
pageContext.setAttribute("availStartDates",c);
%>



 <%
try{

//I know this is where things are breaking I have tried serval
variations to no avail
%>
 
<%}catch (Exception h){
h.printStackTrace();  //because things don't work... this might give a
clue :(
  }
%>



Thanks,
Chris Heinemann




html:options

2001-12-12 Thread Luke Studley

Hi all

This is my first post - so excuse me if it is really basic but I am trying
to get the html:options tag to work as documented. My code looks like:



nameTitles.put("Mr",null);
nameTitles.put("Mrs",null);
nameTitles.put("Miss",null);



.




Where I am declaring a simple map and then trying to use it to populate the
option list. But I get the following error:

javax.servlet.jsp.JspException: No getter method available for property
personTitle for bean under name org.apache.struts.taglib.html.BEAN
at
org.apache.struts.taglib.template.GetTag.doStartTag(GetTag.java:193)
at org.apache.jsp.pagetempl$jsp._jspService(pagetempl$jsp.java:265)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)


What am I doing wrong???!

Luke

PS Tomcat 4.0.1, Struts latest nightly build (needed for validator).


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




html:options

2002-05-01 Thread Jayaraman Dorai

Hi,
 
I want in my drop down a blank record. This needs to be the default. This provides the 
user an option to not select anything( It is a null field). 
 
Is it possible to do this other than putting an empty string in the collection. How to 
set this blank string as the default(not affecting the user's selected value in the 
edit mode)? 
 
I hope I am clear. 
 
Jayaraman



RE: html:options

2003-07-09 Thread Mathew, Manoj



 


-Original Message-
From: sjones [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 09, 2003 10:43 AM
To: [EMAIL PROTECTED]
Subject: html:options


Good Morning Everyone.

I have a List object and i need my JSP page
to build a drop down list box using the List as the source
for the options.

I can do it with a scriplet but i need to one of the struts tags



can anyone help me with use one of these tags.

I am looking at the java.docs but it doesn't really help me.

the List is also accessible from a classs name EqualityOperators

List o = EqualityOperators.getOperators();





-
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]



Re: html:options

2003-10-12 Thread Jeff Kyser
name/value pairs from a database are handled nicely
in a list of LabelValueBeans.
I'd pull the code to load that list from the database out
into a model class, or perhaps into a Singleton loaded
by an InitServlet (at startup - if the contents weren't
changing, or were at least application-wide)
Then let your actions access the application-scoped
AgencyList instead of doing the work themselves.
And you can iterate the AgencyList in your JSPs,
dealing with both names and values, or just values -
whatever you want.
-jeff

On Sunday, October 12, 2003, at 09:33  AM, ajay brar wrote:

hi!
i have the following scenario
in my database i have an Agency table(which includes the attribute 
AGENCY_ID) and a Client tables(which includes a AGENCY_ID that maps to 
the id in the Agency table)
agencies are created first through a web interface.
after that you create Clients. what i want is that when you are 
filling in the details for the client, i want  a drop down list that 
includes the AGENCY_ID of all agencies that are in the database. so 
the person fiiling in the info can select a particular AGENCY_ID for 
that client)
right now in my ClientForm, i have an int agencyId. i want this 
populated on the basis of the selection made form the drop down list.

how do i do this? any suggestions?
i'm thinking of  reading all agencies, chucking them into a 
collection, placing the collection in the session context and then 
reading off it in the jsp page using html:options

The downside to that is that my ClientAction forwrads to 
client.jsp(where you add client details). And i do not particularly 
want to put all the Agency reading bit into ClientAction.
I could use a separate Java class, but i have an action DisplayAgency 
that reads all the agencies from the database, adds them to a User 
bean, puts this in session context and later the page this action 
forwards to uses logic:iterate to move through the collection in the 
User bean and display it. Having another Java class to read only the 
id's and put them in a collection and place this in sesision seems 
like duplicatng an existing task(with sme minor differences)

are there any other ways of doing this?

thanks
cheers
ajay
_
Chat via SMS. Simply send 'CHAT' to 1889918. More info at  
http://ninemsn.com.au/mobilemania/MoChat.asp?blipid=6800

-
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]


Re: html:options

2003-10-12 Thread ajay brar
hi!
thanks for that.
no the values are not application wide, they may change depending on the 
sequence of user actions.
LabelValueBean sounds like an excellent idea
thanks
cheers
ajay


From: Jeff Kyser <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: Re: html:options
Date: Sun, 12 Oct 2003 09:51:17 -0500
name/value pairs from a database are handled nicely
in a list of LabelValueBeans.
I'd pull the code to load that list from the database out
into a model class, or perhaps into a Singleton loaded
by an InitServlet (at startup - if the contents weren't
changing, or were at least application-wide)
Then let your actions access the application-scoped
AgencyList instead of doing the work themselves.
And you can iterate the AgencyList in your JSPs,
dealing with both names and values, or just values -
whatever you want.
-jeff

On Sunday, October 12, 2003, at 09:33  AM, ajay brar wrote:

hi!
i have the following scenario
in my database i have an Agency table(which includes the attribute 
AGENCY_ID) and a Client tables(which includes a AGENCY_ID that maps to the 
id in the Agency table)
agencies are created first through a web interface.
after that you create Clients. what i want is that when you are filling in 
the details for the client, i want  a drop down list that includes the 
AGENCY_ID of all agencies that are in the database. so the person fiiling 
in the info can select a particular AGENCY_ID for that client)
right now in my ClientForm, i have an int agencyId. i want this populated 
on the basis of the selection made form the drop down list.

how do i do this? any suggestions?
i'm thinking of  reading all agencies, chucking them into a collection, 
placing the collection in the session context and then reading off it in 
the jsp page using html:options

The downside to that is that my ClientAction forwrads to client.jsp(where 
you add client details). And i do not particularly want to put all the 
Agency reading bit into ClientAction.
I could use a separate Java class, but i have an action DisplayAgency that 
reads all the agencies from the database, adds them to a User bean, puts 
this in session context and later the page this action forwards to uses 
logic:iterate to move through the collection in the User bean and display 
it. Having another Java class to read only the id's and put them in a 
collection and place this in sesision seems like duplicatng an existing 
task(with sme minor differences)

are there any other ways of doing this?

thanks
cheers
ajay
_
Chat via SMS. Simply send 'CHAT' to 1889918. More info at  
http://ninemsn.com.au/mobilemania/MoChat.asp?blipid=6800

-
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]
_
Chat via SMS. Simply send 'CHAT' to 1889918.  More info at  
http://ninemsn.com.au/mobilemania/MoChat.asp?blipid=6800

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


URGENT: html:options

2003-10-14 Thread ajay brar
hi!
i'm getting a problem with my html:options
what i have is a MyUtils class with a method to retrieve a list of agency 
id's from the database
class MyUtils
{
  //gets agencyIds creates LabelValueBeans and chucks them into a Vector
public static Vector getAgencyIds()
}

in my jsp page i had
<%@ page import="MyUtils" %>

<%  agencyIds= MyUtils.getAgencyIds();   %>
i then had

 

this gave me an error, setCollection(java.lang.String) cannot be applied to 
java.util.Vector
this was a compiler error.

i tried doing,
changed MyUtils to
class MyUtils
{
  private Vector agencyIds=new Vector();
  //gets agencyIds creates LabelValueBeans and chucks them into a Vector
public Vector getAgencyIds()
}
<%@ page import="MyUtils" %>


 


this gave me an error saying it couldn't find bean agencyId in any scope.

could someone please help.

thanks
cheers
ajay
_
ninemsn Premium transforms your e-mail with colours, photos and animated 
text. Click here  http://ninemsn.com.au/premium/landing.asp

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


Re: Html:options

2003-03-12 Thread Nicolas De Loof
if you use  with  or , the
option that equals the formbean property value will be automaticaly
selected.

(formbean initialized with name="foo")


foo
bar
nop


will render


Nico.


> Is there a way of obtaining a  element where one of the

> sub-elements has the SELECTED attribute ?
> Thanks
>
> 
> Renato Romano
> Sistemi e Telematica S.p.A.
> Calata Grazie - Vial Al Molo Giano
> 16127 - GENOVA
>
> e-mail: [EMAIL PROTECTED]
> Tel.:   010 2712603
> _
>
>
>
>
> 
-
> 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]



Html:Options usage

2003-03-17 Thread e gg

Hi, I have a bean class that returns an ArrayList of ArrayLists for my dropdowns. I am 
really confused on how to show this dropdowns. Here's my bean class:

public class UserAccessBean implements java.io.Serializable {
 

List deptList  = new ArrayList();
List brokerList = new ArrayList();
List filters = new ArrayList();


 public List getFilters() {
 deptList.add(new LabelValueBean("1", "Department1"));
 deptList.add(new LabelValueBean("2", "Department2"));
 deptList.add(new LabelValueBean("3", "Department3"));


 brokerList.add(new LabelValueBean("broker1", "BrokerDepartment1"));
 brokerList.add(new LabelValueBean("broker2", "BrokerDepartment2"));
 brokerList.add(new LabelValueBean("broker3", "BrokerDepartment3"));
 
  filters.add(deptList);
  filters.add(brokerList);
  return filters;
 }


}

The 'filters' ArrayList can actually return 2 or more ArrayList. Like if there's 3 
ArrayLists, I would like an html output such as:







tia,

Emmanuel

  



-
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online

html:options question

2003-01-06 Thread Gus Delgado
I populate an html:option tag with a collection. I use the html:option 
to create a new user in my system and to edit a user in my system.


  


When doing an edit I want the html:option to be shown with the current 
accessType of the user I'm editing.

Example. the options are "Read-only", "Admin", and "Analyst" that's the 
order of the collection, when I edit a user that is Admin, I want the 
drop-down to show with the "Admin" being selected,

How can I accomplish this. Thanks in advanced.




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



RE: html:options

2003-05-27 Thread shirishchandra.sakhare
There are other optiosn to use it...
I ahve never used it with Arays but i have used it with Collections...

First i use jsp:useBean tag to get the collection from the form and make it available 
in the page scope and then use html:options with collection="beanName"

where beanName is the eban created through useBean tag..There must eb some way to use 
it with arrays...

Let me know if u dont find anything..May be tomorrow i will find some time to look at 
the doc..
regards,
Shirish

-Original Message-
From: Abhinav (Cognizant) [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 5:44 PM
To: Struts Users Mailing List
Subject: RE: html:options


correct me if I am wrong. 
This would work if getOptionList() returns an array of String.
In my case array is of Objects and one attribute of that object has to be displayed.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 9:07 PM
To: [EMAIL PROTECTED]
Subject: RE: html:options


check the documentation for the tag...

use name="formBeanName" property="optionList"

-Original Message-
From: Abhinav (Cognizant) [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 5:38 PM
To: Struts Users Mailing List
Subject: RE: html:options


Yea...with collection it works. But what if my collection of objects is obtained from 
the form-bean.
(I dont want to use scripting to first take the collection out of the form-bean.)

-Original Message-
From: Gareth Andrew [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 9:00 PM
To: Struts Users Mailing List
Subject: Re: html:options


In one of my JSPs I have:



 

where locales is an array of beans with getISOCode() and 
getDisplayName() methods.

Hope this helps,

Gareth


Abhinav (Cognizant) wrote:

>I have one form bean with getter/setters for property List.
>getter returns a vector of objects of type { getID(), getDesc(),  setID(), setDesc() }
> 
>I have to use this vector to populate a select box in html using html:select/options
>somehow i am unable to make out labelProperty, labelName
> 
>Can someone gimme an example how this can be done.
> 
> 
> 
>
>  
>
>
>
>-
>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]



-
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]



RE: html:options

2003-05-27 Thread Abhinav (Cognizant)
I was able to do it like that. 




  

Thanks a lot all you ppl.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 9:39 PM
To: [EMAIL PROTECTED]
Subject: RE: html:options


There are other optiosn to use it...
I ahve never used it with Arays but i have used it with Collections...

First i use jsp:useBean tag to get the collection from the form and make it available 
in the page scope and then use html:options with collection="beanName"

where beanName is the eban created through useBean tag..There must eb some way to use 
it with arrays...

Let me know if u dont find anything..May be tomorrow i will find some time to look at 
the doc..
regards,
Shirish

-Original Message-
From: Abhinav (Cognizant) [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 5:44 PM
To: Struts Users Mailing List
Subject: RE: html:options


correct me if I am wrong. 
This would work if getOptionList() returns an array of String.
In my case array is of Objects and one attribute of that object has to be displayed.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 9:07 PM
To: [EMAIL PROTECTED]
Subject: RE: html:options


check the documentation for the tag...

use name="formBeanName" property="optionList"

-Original Message-
From: Abhinav (Cognizant) [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 5:38 PM
To: Struts Users Mailing List
Subject: RE: html:options


Yea...with collection it works. But what if my collection of objects is obtained from 
the form-bean.
(I dont want to use scripting to first take the collection out of the form-bean.)

-Original Message-
From: Gareth Andrew [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 9:00 PM
To: Struts Users Mailing List
Subject: Re: html:options


In one of my JSPs I have:



 

where locales is an array of beans with getISOCode() and 
getDisplayName() methods.

Hope this helps,

Gareth


Abhinav (Cognizant) wrote:

>I have one form bean with getter/setters for property List.
>getter returns a vector of objects of type { getID(), getDesc(),  setID(), setDesc() }
> 
>I have to use this vector to populate a select box in html using html:select/options
>somehow i am unable to make out labelProperty, labelName
> 
>Can someone gimme an example how this can be done.
> 
> 
> 
>
>  
>
>
>
>-
>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]



-
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]



** Message from InterScan E-Mail VirusWall NT **

** No virus found in attached file noname.htm

No Virus detected in the attached file(s).
* End of message ***


This e-mail and any files transmitted with it are for the sole use of the intended 
recipient(s) and may contain confidential and privileged information. If you are not 
the 
intended recipient, please contact the sender by reply e-mail and destroy all copies 
of 
the original message. 
Any unauthorised review, use, disclosure, dissemination, forwarding, printing or 
copying 
of this email or any action taken in reliance on this e-mail is strictly prohibited 
and 
may be unlawful.

  Visit us at http://www.cognizant.com

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

RE: html:options

2003-05-27 Thread Kandi Potter
hey thanksmaybe I'll try to minimize my code.

-Original Message-
From: Abhinav (Cognizant) [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 12:15 PM
To: Struts Users Mailing List
Subject: RE: html:options


I was able to do it like that. 




  

Thanks a lot all you ppl.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 9:39 PM
To: [EMAIL PROTECTED]
Subject: RE: html:options


There are other optiosn to use it...
I ahve never used it with Arays but i have used it with Collections...

First i use jsp:useBean tag to get the collection from the form and make it available 
in the page scope and then use html:options with collection="beanName"

where beanName is the eban created through useBean tag..There must eb some way to use 
it with arrays...

Let me know if u dont find anything..May be tomorrow i will find some time to look at 
the doc..
regards,
Shirish

-Original Message-
From: Abhinav (Cognizant) [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 5:44 PM
To: Struts Users Mailing List
Subject: RE: html:options


correct me if I am wrong. 
This would work if getOptionList() returns an array of String.
In my case array is of Objects and one attribute of that object has to be displayed.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 9:07 PM
To: [EMAIL PROTECTED]
Subject: RE: html:options


check the documentation for the tag...

use name="formBeanName" property="optionList"

-Original Message-
From: Abhinav (Cognizant) [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 5:38 PM
To: Struts Users Mailing List
Subject: RE: html:options


Yea...with collection it works. But what if my collection of objects is obtained from 
the form-bean.
(I dont want to use scripting to first take the collection out of the form-bean.)

-Original Message-
From: Gareth Andrew [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 9:00 PM
To: Struts Users Mailing List
Subject: Re: html:options


In one of my JSPs I have:



 

where locales is an array of beans with getISOCode() and 
getDisplayName() methods.

Hope this helps,

Gareth


Abhinav (Cognizant) wrote:

>I have one form bean with getter/setters for property List.
>getter returns a vector of objects of type { getID(), getDesc(),  setID(), setDesc() }
> 
>I have to use this vector to populate a select box in html using html:select/options
>somehow i am unable to make out labelProperty, labelName
> 
>Can someone gimme an example how this can be done.
> 
> 
> 
>
>  
>
>
>
>-
>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]



-
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]




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



html:select / html:options

2004-03-23 Thread Christian Schlaefcke
Hi Folks!

for several days I mess around with html:select and html:options.

I want to access a collection with names or numbers (just
java.lang.String). This collection is available in the session. For
testing I generated my own collection in the jsp

<%
 java.util.Collection list = new java.util.ArrayList();
 teilnehmerListe.add("name1");
 teilnehmerListe.add("name2");
 teilnehmerListe.add("name3");
 session.setAttribute("myList", list);
%>
 
  
   
  
  OK
 

When I run this I get an IllegalArgumentException: no name specified

I found out that both "select" and "options" have an argument "name" so I
added some dummies "test1" and "test2" just to have it and get (as
expected) another error: no bean found by that name "test1".

What am I doing wrong? Can someone point me to the right direction?

Thanx and Regards,

Chris


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



RE: html:options

2002-09-30 Thread Sri Sankaran

The first technique couples your presentation with your business logic more closely 
than does the latter.  So, my preference would be using the .

You can maintain the collection that makes up the options in the form bean for the 
page.  Initialization must be handled via the associated action class.

Sri

-Original Message-
From: Doug Dates [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, September 29, 2002 8:35 PM
To: Struts Users Mailing List
Subject: html:options


I want to display a dropdown list. The list items are "By First Name", "By Last Name", 
"By Date". I think I can do it by the following way:


 By First Name 
 By Last Name 
 By Date  

Is there any disadvantages to use above approach compared with using 
? If I use  instead of using above individual 
,as following:


   

where should I set myArrayList? in init method of my servlet class, or in my action 
form bean, or somewhere else? I am not quite understand it. Could some one please help 
me?

Thank you

Doug



__ 

Post your free ad now! http://personals.yahoo.ca


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


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




html:options ordering

2002-10-30 Thread Dennis Muhlestein
I have a hashtable with key/value that get displayed by an html:options
tag.  

Works ok, but they are ordered in reverse order of the id.  That isn't
any performance problem, but it looks a little strange to the user.

For instance, what if you wanted the options in alphabetical order?  In
my case, I need them ordered by the key for each options.

Any Suggestions?
TIA
-Dennis


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>




html:options question

2002-09-12 Thread Michael Lee

I want to populate an  with data from a Map (HashMap). I have

...
<% pageContext.setAttribute("allUserRoles", Lookup.getData(Constant.USER.USER_ROLES)); 
%>
...


  


I don't see an example in the struts-exercise-taglib.war under html:select
It is vector or Object[].
Ideas?
thanks,
Mike




html:options bug?

2002-03-11 Thread Lawlor, Frank

The Struts Options tag seems to have problems accessing collections 
that are in some other object (e.g., your form).  The following dotted
notation should work (I thought) (roleList is an ArrayList):

   

   

or alternatively:

   

   

But both of these result in an error that a bean cannot be found in
roleList.
A workaround is to "cache" the list:

   
   

   

Is this a bug or expected behavior?

Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




html:options bug?

2002-04-22 Thread Hoang, Hai

 
I've been using the html:options tag like following without any problems in
the past.
 







 
 
However, I recently get this weird javax.servlet.ServletException:
PropertyDescriptor: internal error
while merging PDs: type mismatch between read and write methods

 

When I change the code to the following and everything is working fine...Any
ideas?

 



<%

User[] users = (User[])session.getAttribute("allusers");

if (users != null)

{

for (int i = 0; i < users.length; i++)   

{%>

<%=users[i].getName()%>

<%}

}%>



 

Thank you




RE: HTML:OPTIONS

2001-09-13 Thread Princeton Lau

Chris,

What sort of errors are you getting?

Below is a reprint of a message I posted a few weeks ago.  I believe it
addresses a similar question.

Princeton



Re: html:options not understanding collections from form beans?




From: Princeton Lau 
Subject: Re: html:options not understanding collections from form beans? 
Date: Fri, 17 Aug 2001 10:14:38 -0700 




Hello,

I struggled with the options tag because I did not understand what it meant
by 'collection'.  I could not pass a collection along with a request because
I was at my index page.  In other words, nothing had been done yet.  

I instantiated the bean that had the collection and then used a  to make the collection visible to the options tag.

This is a sample define statement for a bean named Cost, with an ArrayList
(an array of costCentre objects) called costCentres.


I then reference it in my form via:
.
.
.
  

  
.
.
.

I hope this helps.

Princeton



-Original Message-
From: Chris Heinemann [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 13, 2001 1:23 PM
To: Struts User Group
Subject: HTML:OPTIONS


I have a collection of java.lang.String objects.  How do I get the
html:options tag to output them?

My code is :
<%
Collection c = reportBuilder.getAvailableStartDates();
pageContext.setAttribute("availStartDates",c);
%>



 <%
try{

//I know this is where things are breaking I have tried serval
variations to no avail
%>
 
<%}catch (Exception h){
h.printStackTrace();  //because things don't work... this might give a
clue :(
  }
%>



Thanks,
Chris Heinemann





Re: HTML:OPTIONS

2001-09-14 Thread Chris Heinemann

I figured it out.  I need to have an intermediate "bean" to hold the values.
Thanks for you help.  I do think it would be very helpfull if an options tag
where passed only collection it call the toString method.  At least things
wouldn't blow up.  In a great many cases that would be the simplest thing.

Thank you,
Chris

Princeton Lau wrote:

> Chris,
>
> What sort of errors are you getting?
>
> Below is a reprint of a message I posted a few weeks ago.  I believe it
> addresses a similar question.
>
> Princeton
>
> Re: html:options not understanding collections from form beans?
>
> 
> ----
>
> From: Princeton Lau
> Subject: Re: html:options not understanding collections from form beans?
> Date: Fri, 17 Aug 2001 10:14:38 -0700
>
> 
> 
>
> Hello,
>
> I struggled with the options tag because I did not understand what it meant
> by 'collection'.  I could not pass a collection along with a request because
> I was at my index page.  In other words, nothing had been done yet.
>
> I instantiated the bean that had the collection and then used a  .../> to make the collection visible to the options tag.
>
> This is a sample define statement for a bean named Cost, with an ArrayList
> (an array of costCentre objects) called costCentres.
> 
>
> I then reference it in my form via:
> .
> .
> .
>   
> labelProperty="label"/>
>   
> .
> .
> .
>
> I hope this helps.
>
> Princeton
>
> -Original Message-
> From: Chris Heinemann [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 13, 2001 1:23 PM
> To: Struts User Group
> Subject: HTML:OPTIONS
>
> I have a collection of java.lang.String objects.  How do I get the
> html:options tag to output them?
>
> My code is :
> <%
> Collection c = reportBuilder.getAvailableStartDates();
> pageContext.setAttribute("availStartDates",c);
> %>
>
>  type='ReportBuilderActionForm' scope='session' >
>  value='<%=reportBuilder.getStartWeek()%>' >
>  <%
> try{
>
> //I know this is where things are breaking I have tried serval
> variations to no avail
> %>
>  
> <%}catch (Exception h){
> h.printStackTrace();  //because things don't work... this might give a
> clue :(
>   }
> %>
> 
> 
>
> Thanks,
> Chris Heinemann




RE: html:options

2002-05-01 Thread James Mitchell

  
  

  


JM


> -Original Message-
> From: Jayaraman Dorai [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 01, 2002 2:52 PM
> To: [EMAIL PROTECTED]
> Subject: html:options
> 
> 
> Hi,
>  
> I want in my drop down a blank record. This needs to be the 
> default. This provides the user an option to not select anything( 
> It is a null field). 
>  
> Is it possible to do this other than putting an empty string in 
> the collection. How to set this blank string as the default(not 
> affecting the user's selected value in the edit mode)? 
>  
> I hope I am clear. 
>  
> Jayaraman
> 

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




RE: html:options

2002-05-01 Thread Leonardo Maciel


insert line 

like this:




 

Actually  should do




-Original Message-
From: Jayaraman Dorai [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 2:52 PM
To: [EMAIL PROTECTED]
Subject: html:options


Hi,
 
I want in my drop down a blank record. This needs to be the default. This
provides the user an option to not select anything( It is a null field). 
 
Is it possible to do this other than putting an empty string in the
collection. How to set this blank string as the default(not affecting the
user's selected value in the edit mode)? 
 
I hope I am clear. 
 
Jayaraman

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




RE: html:options

2002-05-01 Thread Chen, Dean (Zhun)

I have a similar situation:

I'm trying to display the keys of an enumeration in a drop down list.

The keys are Integers and are stored in a Hashtable
>reports.put(new Integer(reportID), item);

The function getReportsKeys returns  reports.keys();

I have two questions:

1. Can html:options collection be used with an enumeration?

2. How can I display the list of keys in JSP?
I have this, what should go in ___WHAT_GOES_HERE???,
I tried intValue   //from the Integer class, but I get
"javax.servlet.ServletException: No getter method for property
reports.reportsKeys of bean com.gs.ed.sh.GLOBAL"

if there's no solution, would I have to create another class call reportID
with getters & setters?
here's the code


--Select Report
Type--

  

Thanks,

Dean Chen

-Original Message-
From: Leonardo Maciel [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 2:55 PM
To: 'Struts Users Mailing List'
Subject: RE: html:options



insert line 

like this:




 

Actually  should do




-Original Message-
From: Jayaraman Dorai [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 2:52 PM
To: [EMAIL PROTECTED]
Subject: html:options


Hi,
 
I want in my drop down a blank record. This needs to be the default. This
provides the user an option to not select anything( It is a null field). 
 
Is it possible to do this other than putting an empty string in the
collection. How to set this blank string as the default(not affecting the
user's selected value in the edit mode)? 
 
I hope I am clear. 
 
Jayaraman

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

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




RE: html:options

2002-05-01 Thread Jayaraman Dorai

Thanks, it looks so trivial now.

-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 3:02 PM
To: Struts Users Mailing List
Subject: RE: html:options


  
  

  


JM


> -Original Message-
> From: Jayaraman Dorai [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 01, 2002 2:52 PM
> To: [EMAIL PROTECTED]
> Subject: html:options
> 
> 
> Hi,
>  
> I want in my drop down a blank record. This needs to be the 
> default. This provides the user an option to not select anything( 
> It is a null field). 
>  
> Is it possible to do this other than putting an empty string in 
> the collection. How to set this blank string as the default(not 
> affecting the user's selected value in the edit mode)? 
>  
> I hope I am clear. 
>  
> Jayaraman
> 

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


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




MessageResource, html:options & i182

2003-08-28 Thread Lars Bergström
Part 1
On a jsp page I want to have a html:select of the type that has a
predefined
number of options, e.g. different sports. Now, I want to make use of
Struts
internalization where the differents locales text strings are retrieved
from
its locale properties file. 

If I read the text strings from the Message resource file one by one
then I
have to edit my java code when I find out that I want another sport in
my
html:select. In my case a new sport is added very seldomly. 

Is there a nice way of using struts tags like logic:iterate together
with
html:select or 
Can I in some nice looking way with the help of MessageResourceBundle
class
retrieve all text strings starting with sports.* ? 

Part 2

Have being doing some thinking and reading,

In chapter 13.4.3 (Struts in Action) I found text talking about exaktly
this.
Still, the "keys" array must be populated in some way. One alternative
is to
have a separate properties file that holds all the keys for different
sports.
Another alternative is to have a database table containing the keys. 

org.apache.scaffold.text.MessageUtils? Whereever did it go? Can't find
it!
Anyone? 

An aspect of this is how often you estimate that the information will be
edited by the end user. If the end user never or almost never add new
sports,
then saving the i18n strings in a Resource files would be alright.
However, if
the end user quite frequently changes the information, perhaps would it
then
be more convenient to store the information in a database since it can
be
viewed more a part of the application rather than a part of the delivery
of
the product. 

Best regards

Lasse Bergström

 

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



Simple html:options question

2003-09-11 Thread Kumar M
Hi all,

I have an ArraList of strings that I want to show in a drop-down box. The 
same thing is both the label as well as the value. Can anybody tell me how I 
can do this using html:options? The collection in html:options is expected 
to hold JSP beans, which is not the case in my situation.

Thanks in advance!

_
Need more e-mail storage? Get 10MB with Hotmail Extra Storage.   
http://join.msn.com/?PAGE=features/es

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


RE: URGENT: html:options

2003-10-14 Thread Daniel Haynes
I think your collection needs to implement the List interface (use an
ArrayList instead of a vector)

-Original Message-
From: ajay brar [mailto:[EMAIL PROTECTED]
Sent: 14 October 2003 12:45
To: [EMAIL PROTECTED]
Subject: URGENT: html:options

hi!
i'm getting a problem with my html:options
what i have is a MyUtils class with a method to retrieve a list of agency
id's from the database
class MyUtils
{
   //gets agencyIds creates LabelValueBeans and chucks them into a Vector
 public static Vector getAgencyIds()
}

in my jsp page i had
<%@ page import="MyUtils" %>

<%  agencyIds= MyUtils.getAgencyIds();   %>
i then had

  


this gave me an error, setCollection(java.lang.String) cannot be applied to
java.util.Vector
this was a compiler error.

i tried doing,
changed MyUtils to
class MyUtils
{
   private Vector agencyIds=new Vector();
   //gets agencyIds creates LabelValueBeans and chucks them into a Vector
 public Vector getAgencyIds()
}
<%@ page import="MyUtils" %>


  


this gave me an error saying it couldn't find bean agencyId in any scope.

could someone please help.

thanks
cheers
ajay

_
ninemsn Premium transforms your e-mail with colours, photos and animated
text. Click here  http://ninemsn.com.au/premium/landing.asp


-
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]



RE: URGENT: html:options

2003-10-14 Thread ajay brar
hi!

I think your collection needs to implement the List interface (use an
ArrayList instead of a vector)
but a vector implements the List interface, or so says the api
any other ideas


-Original Message-
From: ajay brar [mailto:[EMAIL PROTECTED]
Sent: 14 October 2003 12:45
To: [EMAIL PROTECTED]
Subject: URGENT: html:options
hi!
i'm getting a problem with my html:options
what i have is a MyUtils class with a method to retrieve a list of agency
id's from the database
class MyUtils
{
   //gets agencyIds creates LabelValueBeans and chucks them into a Vector
 public static Vector getAgencyIds()
}
in my jsp page i had
<%@ page import="MyUtils" %>

<%  agencyIds= MyUtils.getAgencyIds();   %>
i then had

  

this gave me an error, setCollection(java.lang.String) cannot be applied to
java.util.Vector
this was a compiler error.
i tried doing,
changed MyUtils to
class MyUtils
{
   private Vector agencyIds=new Vector();
   //gets agencyIds creates LabelValueBeans and chucks them into a Vector
 public Vector getAgencyIds()
}
<%@ page import="MyUtils" %>


  
value="value" />


this gave me an error saying it couldn't find bean agencyId in any scope.

could someone please help.

thanks
cheers
ajay
_
ninemsn Premium transforms your e-mail with colours, photos and animated
text. Click here  http://ninemsn.com.au/premium/landing.asp
-
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]
_
E-mail just got a whole lot better. New ninemsn Premium. Click here 
http://ninemsn.com.au/premium/landing.asp

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


Re: URGENT: html:options

2003-10-14 Thread Nicolas De Loof
collection attribute of  tag is used to set the name of a bean (in some 
scope) that is a collection of the
items off the select-box.

You need to put your Vector into page or request scope to use this tag:

<%
request.setAttribute("items", agencyIds);
%>


   


Nico.


- Original Message - 
From: "ajay brar" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 14, 2003 2:53 PM
Subject: RE: URGENT: html:options


> hi!
>
> >I think your collection needs to implement the List interface (use an
> >ArrayList instead of a vector)
> but a vector implements the List interface, or so says the api
> any other ideas
>
>
>
> >
> >-Original Message-
> >From: ajay brar [mailto:[EMAIL PROTECTED]
> >Sent: 14 October 2003 12:45
> >To: [EMAIL PROTECTED]
> >Subject: URGENT: html:options
> >
> >hi!
> >i'm getting a problem with my html:options
> >what i have is a MyUtils class with a method to retrieve a list of agency
> >id's from the database
> >class MyUtils
> >{
> >//gets agencyIds creates LabelValueBeans and chucks them into a Vector
> >  public static Vector getAgencyIds()
> >}
> >
> >in my jsp page i had
> ><%@ page import="MyUtils" %>
> >
> ><%  agencyIds= MyUtils.getAgencyIds();   %>
> >i then had
> >
> >>labelProperty="label" />
> >
> >
> >this gave me an error, setCollection(java.lang.String) cannot be applied to
> >java.util.Vector
> >this was a compiler error.
> >
> >i tried doing,
> >changed MyUtils to
> >class MyUtils
> >{
> >private Vector agencyIds=new Vector();
> >//gets agencyIds creates LabelValueBeans and chucks them into a Vector
> >  public Vector getAgencyIds()
> >}
> ><%@ page import="MyUtils" %>
> >
> >
> >>label="label"
> >value="value" />
> >
> >
> >this gave me an error saying it couldn't find bean agencyId in any scope.
> >
> >could someone please help.
> >
> >thanks
> >cheers
> >ajay
> >
> >_
> >ninemsn Premium transforms your e-mail with colours, photos and animated
> >text. Click here  http://ninemsn.com.au/premium/landing.asp
> >
> >
> >-
> >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]
> >
>
> _
> E-mail just got a whole lot better. New ninemsn Premium. Click here
> http://ninemsn.com.au/premium/landing.asp
>
>
> -
> 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]



Re: URGENT: html:options

2003-10-14 Thread ajay brar
hi!
thanks for the reply.
doesn't the jsp import statement followed by the usebean ie,
%@ page import="MyUtils" %>

introduce the agencyIds into page scope.
also with the example you gave me should

   

shouldn't the value of collections be items, since that is the key you used.

thanks
cheers
ajay

From: "Nicolas De Loof" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: Re: URGENT: html:options
Date: Tue, 14 Oct 2003 15:11:57 +0200
collection attribute of  tag is used to set the name of a 
bean (in some scope) that is a collection of the
items off the select-box.

You need to put your Vector into page or request scope to use this tag:

<%
request.setAttribute("items", agencyIds);
%>

   

Nico.

- Original Message -
From: "ajay brar" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 14, 2003 2:53 PM
Subject: RE: URGENT: html:options
> hi!
>
> >I think your collection needs to implement the List interface (use an
> >ArrayList instead of a vector)
> but a vector implements the List interface, or so says the api
> any other ideas
>
>
>
> >
> >-Original Message-
> >From: ajay brar [mailto:[EMAIL PROTECTED]
> >Sent: 14 October 2003 12:45
> >To: [EMAIL PROTECTED]
> >Subject: URGENT: html:options
> >
> >hi!
> >i'm getting a problem with my html:options
> >what i have is a MyUtils class with a method to retrieve a list of 
agency
> >id's from the database
> >class MyUtils
> >{
> >//gets agencyIds creates LabelValueBeans and chucks them into a 
Vector
> >  public static Vector getAgencyIds()
> >}
> >
> >in my jsp page i had
> ><%@ page import="MyUtils" %>
> >
> ><%  agencyIds= MyUtils.getAgencyIds();   %>
> >i then had
> >
> >   
> >labelProperty="label" />
> >
> >
> >this gave me an error, setCollection(java.lang.String) cannot be 
applied to
> >java.util.Vector
> >this was a compiler error.
> >
> >i tried doing,
> >changed MyUtils to
> >class MyUtils
> >{
> >private Vector agencyIds=new Vector();
> >//gets agencyIds creates LabelValueBeans and chucks them into a 
Vector
> >  public Vector getAgencyIds()
> >}
> ><%@ page import="MyUtils" %>
> >
> >
> >   
> >label="label"
> >value="value" />
> >
> >
> >this gave me an error saying it couldn't find bean agencyId in any 
scope.
> >
> >could someone please help.
> >
> >thanks
> >cheers
> >ajay
> >
> >_
> >ninemsn Premium transforms your e-mail with colours, photos and 
animated
> >text. Click here  http://ninemsn.com.au/premium/landing.asp
> >
> >
> >-
> >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]
> >
>
> _
> E-mail just got a whole lot better. New ninemsn Premium. Click here
> http://ninemsn.com.au/premium/landing.asp
>
>
> -
> 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]
_
Get less junk mail with ninemsn Premium. Click here  
http://ninemsn.com.au/premium/landing.asp

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


Re: URGENT: html:options

2003-10-14 Thread Nicolas De Loof


create a scripting variable "agencyIds" and a page scope bean "agencyIds". This 
created vector is empty.

<%  agencyIds= MyUtils.getAgencyIds();   %>

chags the object referenced by the scripting variable, but not the page scoped bean.

You should use something like this, assuming populateAgencyIds(List) adds items to an 
existing List :

<% MyUtils.populateAgencyIds(agencyIds); %>

Nico.



- Original Message - 
From: "ajay brar" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 14, 2003 3:18 PM
Subject: Re: URGENT: html:options


> hi!
> thanks for the reply.
> doesn't the jsp import statement followed by the usebean ie,
> %@ page import="MyUtils" %>
> 
> introduce the agencyIds into page scope.
> also with the example you gave me should
> >
> > > label="label"
> > value="value" />
> >
> shouldn't the value of collections be items, since that is the key you used.
> 
> thanks
> cheers
> ajay
> 
> 
> >From: "Nicolas De Loof" <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >Subject: Re: URGENT: html:options
> >Date: Tue, 14 Oct 2003 15:11:57 +0200
> >
> >collection attribute of  tag is used to set the name of a 
> >bean (in some scope) that is a collection of the
> >items off the select-box.
> >
> >You need to put your Vector into page or request scope to use this tag:
> >
> ><%
> > request.setAttribute("items", agencyIds);
> >%>
> >
> >
> > > label="label"
> > value="value" />
> >
> >
> >Nico.
> >
> >
> >- Original Message -
> >From: "ajay brar" <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Sent: Tuesday, October 14, 2003 2:53 PM
> >Subject: RE: URGENT: html:options
> >
> >
> > > hi!
> > >
> > > >I think your collection needs to implement the List interface (use an
> > > >ArrayList instead of a vector)
> > > but a vector implements the List interface, or so says the api
> > > any other ideas
> > >
> > >
> > >
> > > >
> > > >-Original Message-
> > > >From: ajay brar [mailto:[EMAIL PROTECTED]
> > > >Sent: 14 October 2003 12:45
> > > >To: [EMAIL PROTECTED]
> > > >Subject: URGENT: html:options
> > > >
> > > >hi!
> > > >i'm getting a problem with my html:options
> > > >what i have is a MyUtils class with a method to retrieve a list of 
> >agency
> > > >id's from the database
> > > >class MyUtils
> > > >{
> > > >//gets agencyIds creates LabelValueBeans and chucks them into a 
> >Vector
> > > >  public static Vector getAgencyIds()
> > > >}
> > > >
> > > >in my jsp page i had
> > > ><%@ page import="MyUtils" %>
> > > >
> > > ><%  agencyIds= MyUtils.getAgencyIds();   %>
> > > >i then had
> > > >
> > > >> > >labelProperty="label" />
> > > >
> > > >
> > > >this gave me an error, setCollection(java.lang.String) cannot be 
> >applied to
> > > >java.util.Vector
> > > >this was a compiler error.
> > > >
> > > >i tried doing,
> > > >changed MyUtils to
> > > >class MyUtils
> > > >{
> > > >private Vector agencyIds=new Vector();
> > > >//gets agencyIds creates LabelValueBeans and chucks them into a 
> >Vector
> > > >  public Vector getAgencyIds()
> > > >}
> > > ><%@ page import="MyUtils" %>
> > > >
> > > >
> > > >> > >label="label"
> > > >value="value" />
> > > >
> > > >
> > > >this gave me an error saying it couldn't find bean agencyId in any 
> >scope.
> > > >
> > > >could someone please help.
> > > >
> > > >thanks
> > > >cheers
> > > >ajay
> > > >
> > > >_
> > > >ninemsn Premium transforms your

html:options maximum length?

2003-10-30 Thread Matt Redman
I have a an Array with a large list of names in it (up to about 1000+ or
more).
I need to display these names in a drop down list, but when The page loads
it
simply stops loading after about 837 lines.
 
The code I am using is:
 



 
Any ideas why it only displays a part of the Array and not the full thing?
 
Any help is appreciated,
 
Matt
__
Disclaimer: 
This email and any files transmitted with it are confidential and 
intended solely for the use of the individual or entity to whom 
they are addressed. 

If you have received this email in error, please notify the addressee 
by return email and delete the email. 

This email transmission is the property of HAS Solutions and any 
information it contains is legally protected. HAS Solutions has no liability

(including liability in negligence) to any person for any loss or damage
consequential or otherwise suffered or incurred by that person resulting
directly or indirectly from either the use of, or reliance on, the
information contained herein.
__



beginner's html:options question

2004-01-20 Thread Anderson, James H [IT]
I have a collection of LabelValueBeans as a property of another bean (an Action), and 
I store this bean in session scope with "preparedData" as the key. But when I try and 
access it using html:option, I get the following error:

"Cannot find bean preparedData in any scope"

Here's html:option related stuff:



> 
Any help greatly appreciated!

jim

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

html:options selected attribute

2003-02-12 Thread Jason Vinson
Hi folks,

   There my be a simple answer to this that I am overlooking, but I am populating a 
pull down select, and I can't figure out a good way to set the selected attribute to 
the first element.  I am using a collection (string array) and my jsp has this code:

 

  

  

All I want to do is have the first option selected, and it is defaulting to the last 
option.

any help?

TIA,
Jason

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




html:options and javascript

2003-03-12 Thread Neth
Hello,

I have an existing application which i converted into struts,
however i'm having some problem with regards to option with javascript.
The picture of the user should be reflected whenever his/her user id is
selected from the drop down box.

Below is the working application:


function showimage()
{
if (!document.images)
return
document.images.pictures.src=document.mygallery.userId.options[document.mygallery.userId.selectedIndex].value;

}


 
   <% for (int i=0;i

   <%=LoginManager.getusers(i)%>
   <% } %>
 
 


 
   <% if(LoginManager.getNoUsers()!=0){
   init = "pix\\" + LoginManager.getusers(0) + ".jpg";
  }
   %>

 
 

Conversion into struts not working


function showimage(){
 if (!document.images)
 return
 
document.images.pictures.src=document.forms.userId.options[document.forms.userId.selectedIndex].value;
// error here
}


   
  
 
 
 


Thanks



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



RE: Html:Options usage

2003-03-17 Thread du Plessis, Corneil C




-Original Message-
From: e gg [mailto:[EMAIL PROTECTED]
Sent: 17 March, 2003 15:16
To: [EMAIL PROTECTED]
Subject: Html:Options usage



Hi, I have a bean class that returns an ArrayList of ArrayLists for my
dropdowns. I am really confused on how to show this dropdowns. Here's my
bean class:

public class UserAccessBean implements java.io.Serializable {
 

List deptList  = new ArrayList();
List brokerList = new ArrayList();
List filters = new ArrayList();


 public List getFilters() {
 deptList.add(new LabelValueBean("1", "Department1"));
 deptList.add(new LabelValueBean("2", "Department2"));
 deptList.add(new LabelValueBean("3", "Department3"));


 brokerList.add(new LabelValueBean("broker1", "BrokerDepartment1"));
 brokerList.add(new LabelValueBean("broker2", "BrokerDepartment2"));
 brokerList.add(new LabelValueBean("broker3", "BrokerDepartment3"));
 
  filters.add(deptList);
  filters.add(brokerList);
  return filters;
 }


}

The 'filters' ArrayList can actually return 2 or more ArrayList. Like if
there's 3 ArrayLists, I would like an html output such as:







tia,

Emmanuel

  



-
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online

__

Disclaimer and confidentiality note


Everything in this e-mail and any attachments relating to the official business of 
Standard Bank Group Limited is proprietary to the company. It is confidential, legally 
privileged and protected by law. Standard Bank does not own and endorse any other 
content. 
Views and opinions are those of the sender unless clearly stated as being that of 
Standard Bank. 

The person addressed in the e-mail is the sole authorised recipient. Please notify the 
sender 
immediately if it has unintentionally reached you and do not read, disclose or use the 
content
in any way. 

Standard Bank can not assure that the integrity of this communication has been 
maintained nor 
that it is free of errors, virus, interception or interference.

__

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



RE: Html:Options usage

2003-03-18 Thread e gg

thanks for replying but the solution doesn't work, so I changed it  a bit:











 

and I got this error:

Error Message: No getter method available for property filter0 for bean under name 
org.apache.struts.taglib.html.BEAN
Error Code: 500
Target Servlet: null
Error Stack: 
javax.servlet.jsp.JspException: No getter method available for property filter0 for 
bean under name org.apache.struts.taglib.html.BEAN 
 at org.apache.struts.taglib.html.SelectTag.doStartTag(SelectTag.java:309) 


 

 "du Plessis, Corneil C" <[EMAIL PROTECTED]> wrote:
'>name="filter" label="label" value="value"/>


-Original Message-
From: e gg [mailto:[EMAIL PROTECTED]
Sent: 17 March, 2003 15:16
To: [EMAIL PROTECTED]
Subject: Html:Options usage



Hi, I have a bean class that returns an ArrayList of ArrayLists for my
dropdowns. I am really confused on how to show this dropdowns. Here's my
bean class:

public class UserAccessBean implements java.io.Serializable {


List deptList = new ArrayList();
List brokerList = new ArrayList();
List filters = new ArrayList();


public List getFilters() {
deptList.add(new LabelValueBean("1", "Department1"));
deptList.add(new LabelValueBean("2", "Department2"));
deptList.add(new LabelValueBean("3", "Department3"));


brokerList.add(new LabelValueBean("broker1", "BrokerDepartment1"));
brokerList.add(new LabelValueBean("broker2", "BrokerDepartment2"));
brokerList.add(new LabelValueBean("broker3", "BrokerDepartment3"));

filters.add(deptList);
filters.add(brokerList);
return filters;
}


}

The 'filters' ArrayList can actually return 2 or more ArrayList. Like if
there's 3 ArrayLists, I would like an html output such as:



tia,Emmanuel -Do you Yahoo!?Yahoo! Web Hosting - 
establish your business online__Disclaimer 
and confidentiality noteEverything in this e-mail and any attachments relating to the 
official business of Standard Bank Group Limited is proprietary to the company. It is 
confidential, legally privileged and protected by law. Standard Bank does not own and 
endorse any other content. Views and opinions are those of the sender unless clearly 
stated as being that of Standard Bank. The person addressed in the e-mail is the sole 
authorised recipient. Please notify the sender immediately if it has unintentionally 
reached you and do not read, disclose or use the contentin any way. Standard Bank can 
not assure that the integrity of this communication has been maintained nor that it is 
free of errors, virus, interception or 
interference.__-To
 unsubscribe, e-mail: [EMAIL PROTECTED] additional commands, e-mail: [EMAIL PROTECTED]


-
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!

html:options encoded property

2002-12-09 Thread Nathalie Foures
Hi!

I wrote a JSP page with the following lines :
...

   

...

where name and url are the String attributes of a bean named Proxy. This
code displays a box, with a list of "names". When I select a name, this
returns the corresponding "url". The problem is that the url is written
with escaped characters, BUT displayed with unescaped characters.

For example, the bean Proxy has the following url linked with the name
"something" : "http://myhome/hello&action="doSomething"";.
But, the resulting html page looks like this :
...

   http://myhome/hello&action="doSomething"";>something
...

The " character is translated. As a result the option value becomes
"http://hello&action="; : it stops at the first ":" character and doesn't
take the whole url! doSomething is forgotten...

I looked for attributes like "filter" for the html:options tag, but I
didn't succeed...Has someone an idea to help me!

Thank you!

Nathalie

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




html:select and html:options

2003-01-03 Thread Jose Luis
hi everyone, i have a page whit the following code:







where sectorCompany is an ArrayList that i built prior to view the jsp. My problem is:

what i really need is to pass to the result action the value which represents the 
labels that contains the SectorCompany ArrayList, so, How i can build a select that 
shows labels but that also stores the id (longs representing registers in a RDBMS) to 
pass this id?


Thank everybody in advance.

ps. If someOne knows a subject in the mailing list which already solves this plese 
redirectme to it.

José Luis






Re: html:options question

2003-01-06 Thread Heather Buch
I did something similar, with optionsCollection (which I like).

Here is my code:


 


for optionsCollection, my "property" is the name of my bean, and I think 
you have to pluralize it (example availablecourselabel --> 
availablecourselabels) to indicate that it's a collection. The "label" 
and "value" attributes just
refer to properties of my AvailableCourseLabel bean (get 
availableCourseconcatenated, and getAvailablecourseinstanceid). I hope 
this helps  a little.

Best,

Heather Buch


Gus Delgado wrote:

I populate an html:option tag with a collection. I use the html:option 
to create a new user in my system and to edit a user in my system.


  


When doing an edit I want the html:option to be shown with the current 
accessType of the user I'm editing.

Example. the options are "Read-only", "Admin", and "Analyst" that's 
the order of the collection, when I edit a user that is Admin, I want 
the drop-down to show with the "Admin" being selected,

How can I accomplish this. Thanks in advanced.




--
To unsubscribe, e-mail:   

For additional commands, e-mail: 






--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: html:options question

2003-01-06 Thread Rick Reumann


On Monday, January 6, 2003, 2:14:38 PM, Gus wrote:

GD> 
GD> labelProperty="label"/>
GD> 

GD> Example. the options are "Read-only", "Admin", and "Analyst" that's the 
GD> order of the collection, when I edit a user that is Admin, I want the 
GD> drop-down to show with the "Admin" being selected,

GD> How can I accomplish this. Thanks in advanced.

Just make sure "accessType" is set to whatever the value is for
"Admin" in the options. In other words the value fields in
accessTypeList should have "Admin", "Analyst", "Read-only" and
then accessType should also be one of those names as well. (Personally
I usually like to use ints for those values. So that accessType would
be an int value and in the accesTypeList you'd have corresponding
ints for the values and the label would be your String for the title
(Admin, Analyst, etc)). If that doesn't make sense let me know. I
typed this up very quickly:)

-- 

Rick
mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: html:options question

2003-01-06 Thread Gus Delgado
Thanks it work!.

-Gus D.
Rick Reumann wrote:


On Monday, January 6, 2003, 2:14:38 PM, Gus wrote:

GD> 
GD> labelProperty="label"/>
GD> 

GD> Example. the options are "Read-only", "Admin", and "Analyst" that's the 
GD> order of the collection, when I edit a user that is Admin, I want the 
GD> drop-down to show with the "Admin" being selected,

GD> How can I accomplish this. Thanks in advanced.

Just make sure "accessType" is set to whatever the value is for
"Admin" in the options. In other words the value fields in
accessTypeList should have "Admin", "Analyst", "Read-only" and
then accessType should also be one of those names as well. (Personally
I usually like to use ints for those values. So that accessType would
be an int value and in the accesTypeList you'd have corresponding
ints for the values and the label would be your String for the title
(Admin, Analyst, etc)). If that doesn't make sense let me know. I
typed this up very quickly:)

 





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: html:select / html:options

2003-05-27 Thread Abhinav (Cognizant)
That means we are keeping unsafeValues and unsafeLabels separately in our form-bean. 
(Though they are related -- i think so)
What if these two are kept encapsulated in an object.

-Original Message-
From: Kandi Potter [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 9:06 PM
To: Struts Users Mailing List
Subject: RE: html:select / html:options


I used the following with vectors of unsafeValues and unsafeLabels in my incidentForm 
bean.




 







-Original Message-
From: Abhinav (Cognizant) [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 11:20 AM
To: Struts Users Mailing List
Subject: html:select / html:options


I have a vector of Objects of a class whose attributes are ID and Name.
This vector is set in the form bean.

I want to display that vector as a select/options field.
ID part will form the value and Name the displayable option.

How can this be done.

Thanx a lot.


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



** Message from InterScan E-Mail VirusWall NT **

** No virus found in attached file noname.htm

No Virus detected in the attached file(s).
* End of message ***


This e-mail and any files transmitted with it are for the sole use of the intended 
recipient(s) and may contain confidential and privileged information. If you are not 
the 
intended recipient, please contact the sender by reply e-mail and destroy all copies 
of 
the original message. 
Any unauthorised review, use, disclosure, dissemination, forwarding, printing or 
copying 
of this email or any action taken in reliance on this e-mail is strictly prohibited 
and 
may be unlawful.

  Visit us at http://www.cognizant.com

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

Re: html:select / html:options

2003-05-27 Thread Denis Avdic
use optionsCollection tag

property:  name of the collection in the  form Bean
label :  The property of the bean within the collection which represents 
the label to be rendered for each option. (ie. Name)
value: The property of the bean within the collection which represents 
the value to be rendered for each option. (ie ID)

thus:







Abhinav (Cognizant) wrote:

That means we are keeping unsafeValues and unsafeLabels separately in our form-bean. 
(Though they are related -- i think so)
What if these two are kept encapsulated in an object.
-Original Message-
From: Kandi Potter [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 9:06 PM
To: Struts Users Mailing List
Subject: RE: html:select / html:options
I used the following with vectors of unsafeValues and unsafeLabels in my incidentForm bean.




    
   





-Original Message-
From: Abhinav (Cognizant) [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 11:20 AM
To: Struts Users Mailing List
Subject: html:select / html:options
I have a vector of Objects of a class whose attributes are ID and Name.
This vector is set in the form bean.
I want to display that vector as a select/options field.
ID part will form the value and Name the displayable option.
How can this be done.

Thanx a lot.

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


 



** Message from InterScan E-Mail VirusWall NT **

** No virus found in attached file noname.htm

No Virus detected in the attached file(s).
* End of message ***
 



This e-mail and any files transmitted with it are for the sole use of the intended 
recipient(s) and may contain confidential and privileged information. If you are not the 
intended recipient, please contact the sender by reply e-mail and destroy all copies of 
the original message. 
Any unauthorised review, use, disclosure, dissemination, forwarding, printing or copying 
of this email or any action taken in reliance on this e-mail is strictly prohibited and 
may be unlawful.

 Visit us at http://www.cognizant.com

 



-
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]


RE: html:select / html:options

2003-05-27 Thread Kandi Potter
I'm just learning here as well.but that is what worked for me.   I actually store 
the vectors in a CollectionForm with the two vectors as members.  I don't know if this 
was the most graceful way to handle the problem, but it worked for me.  I have 
something like this:

I used a CollectionForm for the same purpose as you would like to.  I have several 
drop-down selections so I just create a CollectionForm object for each, and populate 
the labels and values from my business object, which I'm sure you have done already.

also, for state management, the collectionForms are stored in a transaction to be 
re-used during the same session.  This way I can grab them for any action where I need 
the same drop-down list.   

public class CollectionForm   implements Serializable {
private Vector labels;
private Vector values;

...

public class IncidentForm extends ActionForm implements Serializable {
public Vector getUnsafeLabels(){
return CollectionForm.getLabels();

}

public Vector getUnsafeValues(){
return CollectionForm.getValues();
   
}
...



-Original Message-
From: Abhinav (Cognizant) [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 11:49 AM
To: Struts Users Mailing List
Subject: RE: html:select / html:options


That means we are keeping unsafeValues and unsafeLabels separately in our form-bean. 
(Though they are related -- i think so)
What if these two are kept encapsulated in an object.

-Original Message-
From: Kandi Potter [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 9:06 PM
To: Struts Users Mailing List
Subject: RE: html:select / html:options


I used the following with vectors of unsafeValues and unsafeLabels in my incidentForm 
bean.




 







-Original Message-
From: Abhinav (Cognizant) [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 11:20 AM
To: Struts Users Mailing List
Subject: html:select / html:options


I have a vector of Objects of a class whose attributes are ID and Name.
This vector is set in the form bean.

I want to display that vector as a select/options field.
ID part will form the value and Name the displayable option.

How can this be done.

Thanx a lot.


-
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]



nested beans/html:options

2004-01-25 Thread Mohan Radhakrishnan
Hi
   I am using nested beans. What is the equivalent using nested beans
for the following ?


  

"OBJECTIVE" is in the session scope.


I tried several options but none worked.


Mohan


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



html:options and html:select

2004-02-02 Thread Otto, Frank
hello,
 
I have following bean:
 
public class CProduct {
 
private Integer id;
 
private String name
 
public Integer getId() {return id;}
puclic void setId(Integer id){
...
}
 
My form class contains a java.util.List of CProduct bean.
 
How can I display the List as select box? I want to use the id as value and the name 
as label of the select box.
 
For example:
 

scanner
harddisk

 
Has anyone an idea?
 
Regards,
 
Frank
 


Usage of< html:options>

2004-02-17 Thread anant.parnami

Hi,

I am a newbie in struts,
I have to populate a dropdown using html:options. I have to use a collection of beans. 
This collection should be stored in my Action Form.

I have a collection of CountryBeans named as collectionCountry.
In my action class I am writing
request.setAttribute("countryList",collectionCountry);

In my jsp I am writing


Now I want to Store this collection in my ActionForm and get it in the jsp. what 
changes do I need to do to implement the same

Can you please suggest me some way of doing this

Thanks for any help in advance

Regards

Anant Parnami



-Original Message-
From: Manuel Lenz [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 17, 2004 1:49 PM
To: Struts Users Mailing List
Subject: No Action is executed







Hi to all,
my struts-webApplication is used by almost 80 people.
After 1-2 weeks my application doesn´t react anymore,
if I do call an ActionClass which will connect to an oracle database.

So I guess I do have a problem with the database connection.
My database config shows that:

  
  
  
  
  
  



I do work with normal statements and with prepared statements. I guess there might by 
to much opened result sets, statements and database connection. But our 
serverAdministrator says, that there are only 5 unused database connections left. Max 
value is 20.

Does anybody have an idea?

Greetings, Manuel


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


Confidentiality Notice

The information contained in this electronic message and any attachments to this 
message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged 
information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

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



html:options with validate

2004-02-17 Thread Sniadach, Tomasz
hi , 
i have an ActionForm with countries in html:options , there are some
other fields, that i have to validate. So, when i submit and errors
occur, the field selected in countries is set to default. Is there a way
to mark the selected field? 
The other fields (text fields) are not cleared.

In my JSP i have something like this:




in the Form ;

public String getSelectedLand() {
return eb.getLand()[0]; 
}

public String[] getCountries() {
return eb.getCountries();
}

Thx for suggestions.
Tomek


RE: html:select / html:options

2004-03-23 Thread Lokanath
hi ,

i think u have to get the bean from session to some Collection
useing session.getAttribute("mylist") then assign it to some collection.then
use that collection for populating the select

   lokee

-Original Message-
From: Christian Schlaefcke [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 23, 2004 2:45 AM
To: Struts Users Mailing List
Subject: html:select / html:options


Hi Folks!

for several days I mess around with html:select and html:options.

I want to access a collection with names or numbers (just
java.lang.String). This collection is available in the session. For
testing I generated my own collection in the jsp

<%
 java.util.Collection list = new java.util.ArrayList();
 teilnehmerListe.add("name1");
 teilnehmerListe.add("name2");
 teilnehmerListe.add("name3");
 session.setAttribute("myList", list);
%>
 
  
   
  
  OK
 

When I run this I get an IllegalArgumentException: no name specified

I found out that both "select" and "options" have an argument "name" so I
added some dummies "test1" and "test2" just to have it and get (as
expected) another error: no bean found by that name "test1".

What am I doing wrong? Can someone point me to the right direction?

Thanx and Regards,

Chris


-
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]



RE: html:select / html:options

2004-03-23 Thread Sanoj, Antony (IE10)
Hi,

I believe you need to read the following link 
http://www.jajakarta.org/struts/struts1.1/documentation/ja/target/userGuide/
printer/struts-html.html#options

This should give you an idea of what the attributes of html:options are.
Collection should be a set of java beans. Rules are clearly provided in the
above link.

I can give you an example using 


 
  
  
  

  
  
  
 
 

 

   
  



Regards, 
Sanoj Antony 


-Original Message-
From: Christian Schlaefcke [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 23, 2004 4:15 PM
To: Struts Users Mailing List
Subject: html:select / html:options


Hi Folks!

for several days I mess around with html:select and html:options.

I want to access a collection with names or numbers (just
java.lang.String). This collection is available in the session. For
testing I generated my own collection in the jsp

<%
 java.util.Collection list = new java.util.ArrayList();
 teilnehmerListe.add("name1");
 teilnehmerListe.add("name2");
 teilnehmerListe.add("name3");
 session.setAttribute("myList", list);
%>
 
  
   
  
  OK
 

When I run this I get an IllegalArgumentException: no name specified

I found out that both "select" and "options" have an argument "name" so I
added some dummies "test1" and "test2" just to have it and get (as
expected) another error: no bean found by that name "test1".

What am I doing wrong? Can someone point me to the right direction?

Thanx and Regards,

Chris


-
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]



Re: html:select / html:options

2004-03-23 Thread Mark Lowe
session.setAttribute("myList", list);
session.setAttribute("myList",list.toArray());

for some reason you need to cast to list to an array.

On 24 Mar 2004, at 01:23, Lokanath wrote:

hi ,

i think u have to get the bean from session to some Collection
useing session.getAttribute("mylist") then assign it to some 
collection.then
use that collection for populating the select

   lokee

-Original Message-
From: Christian Schlaefcke [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 23, 2004 2:45 AM
To: Struts Users Mailing List
Subject: html:select / html:options
Hi Folks!

for several days I mess around with html:select and html:options.

I want to access a collection with names or numbers (just
java.lang.String). This collection is available in the session. For
testing I generated my own collection in the jsp
<%
 java.util.Collection list = new java.util.ArrayList();
 teilnehmerListe.add("name1");
 teilnehmerListe.add("name2");
 teilnehmerListe.add("name3");
 session.setAttribute("myList", list);
%>
 
  
   
  
  OK
 
When I run this I get an IllegalArgumentException: no name specified

I found out that both "select" and "options" have an argument "name" 
so I
added some dummies "test1" and "test2" just to have it and get (as
expected) another error: no bean found by that name "test1".

What am I doing wrong? Can someone point me to the right direction?

Thanx and Regards,

Chris

-
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]


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


Re: html:options ordering

2002-10-30 Thread Danny Mui
Hash Tables don't guarantee order when you pull them out enmasse. 
probably best bet is to store it in a list and sort accordingly 
(Collections.sort).


Dennis Muhlestein wrote:

I have a hashtable with key/value that get displayed by an html:options
tag.  

Works ok, but they are ordered in reverse order of the id.  That isn't
any performance problem, but it looks a little strange to the user.

For instance, what if you wanted the options in alphabetical order?  In
my case, I need them ordered by the key for each options.

Any Suggestions?
TIA
-Dennis


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>
 





--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>




RE: html:options ordering

2002-10-30 Thread Karr, David
> -Original Message-
> From: Dennis Muhlestein [mailto:dennis@;zserve.com]
> Sent: Wednesday, October 30, 2002 9:41 AM
> 
> I have a hashtable with key/value that get displayed by an 
> html:options
> tag.  
> 
> Works ok, but they are ordered in reverse order of the id.  That isn't
> any performance problem, but it looks a little strange to the user.
> 
> For instance, what if you wanted the options in alphabetical 
> order?  In
> my case, I need them ordered by the key for each options.

I would look into the Commons Collections library.  It appears you could use
either the DoubleOrderedMap or the SequencedHashMap.  I haven't personally
used either of these.

--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>




Re: html:options ordering

2002-10-30 Thread Sven Bischoff
Dennis Muhlestein wrote:


I have a hashtable with key/value that get displayed by an html:options
tag. 
Works ok, but they are ordered in reverse order of the id.  That isn't
any performance problem, but it looks a little strange to the user.

For instance, what if you wanted the options in alphabetical order?  In
my case, I need them ordered by the key for each options.


if you're using jdk1.4, try java.util.LinkedHashMap which preserves 
insertion-order.


-Dennis


Sven


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>




Re: html:options ordering

2002-10-30 Thread Dennis Muhlestein
Thanks for the comments.  Seems to make more sense not to have 
any ordering functionality in the html:options tag anyway.

On Wed, 2002-10-30 at 10:40, Dennis Muhlestein wrote:
> I have a hashtable with key/value that get displayed by an html:options
> tag.  
> 
> Works ok, but they are ordered in reverse order of the id.  That isn't
> any performance problem, but it looks a little strange to the user.
> 
> For instance, what if you wanted the options in alphabetical order?  In
> my case, I need them ordered by the key for each options.
> 
> Any Suggestions?
> TIA
> -Dennis
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>
> 



--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>




Help with html:options

2002-09-04 Thread Kamal . K . Kang

hi all,

I am getting the following exception in html:options tag.

[ServletException in:/jsp/EditServerBody.jsp] No getter method available 
for property value for bean under name nngList' 

This is how I am using it



Where nngList is of type Vector and it contains elements of type 
OptionValue which has getValue() and getLabel().

Anything else I am missing.


Kamal


The information contained in this message may be privileged 
and confidential and protected from disclosure.  If the 
reader of this message is not the intended recipient, or an 
employee or agent responsible for delivering this message to 
the intended recipient, you are hereby notified that any 
reproduction, dissemination or distribution of this 
communication is strictly prohibited. If you have received 
this communication in error, please notify us immediately by 
replying to the message and deleting it from your computer.

Thank you.
Tellabs


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




CachedRowSet for html:options

2002-03-08 Thread Sunder

Hi,
I am currently retrieving a cachedRowSet from a session bean and
displaying lists using the rowset. I would like to use the struts
html:options tag to do the same, From the documentation, it looks like I
have to put this rowset into a collection and use the same. Is there a
better way to do this?

Thanks,
Sunder


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




Re: html:options bug?

2002-03-11 Thread Arron Bates

The collection attribute needs the bean reference only. The dot notation 
is for your property. Because the collection isn't the bean itself 
you'll have to use a define tag or something to make a bean reference 
directly to your collection, then use that reference in your collection 
attribute.

For your second example... The collection attribute is overriding, and 
ignores the name attribute. It's meant to be the direct link to a bean 
reference that itself is a collection.

Arron.


Lawlor, Frank wrote:

>The Struts Options tag seems to have problems accessing collections 
>that are in some other object (e.g., your form).  The following dotted
>notation should work (I thought) (roleList is an ArrayList):
>
>   
>labelProperty="description"/>
>   
>
>or alternatively:
>
>   
>labelProperty="description"/>
>   
>
>But both of these result in an error that a bean cannot be found in
>roleList.
>A workaround is to "cache" the list:
>
>   scope="session" />
>   
>labelProperty="description"/>
>   
>
>Is this a bug or expected behavior?
>
>Frank Lawlor
>Athens Group, Inc.
>(512) 345-0600 x151
>Athens Group, an employee-owned consulting firm integrating technology
>strategy and software solutions.
>
>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




usage of html:options

2002-04-03 Thread Slava_L

we have and ActionForm with Collection field (4xmpl list of smthing)
how should i use tag html:options to fill parent tag html:select with values of list 
(from our Collection) 
In uptodate we use this scheme: 
in jsp file we have
 -> related with ActionForm in struts-config.xml



.

but how can u do the same thin' w/o bean:define ?

Thnx! 




html:select and html:options

2001-08-06 Thread Stefan Faist

Hello all,
I these two lists:













I want this:
When I select one element in the list <... id="names" ...> the then the list
<... id="aktivitaeten" ...> get elements, that are the activities from the
element of the first list. Is there a way to call a action when I select a
element?
I hope you understand what I want.

Is there any way to do this?
Can someone help me?

Best regards,
STEFAN


--
hmi-Informatik GmbH
Zettachring 6 - D-70567 Stuttgart
E-Mail: [EMAIL PROTECTED]
http://www.hmi-informatik.de




html:options and rowsets

2001-09-13 Thread Matt Raible

Can the html:options tag handle collection="rowsetname"?  If not, has someone
contributed a library that will?

Thanks,

Matt

__
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/



html:options and FormBean

2001-10-25 Thread Francois Duchaussoy

Hi,

I have an ActionForm with a Collection object inside.
I'd like to use the  tag to display that Collection.
Could anyone give me an example on how to do that?

something like that??


Thanks.
Francois.



html:options with FormBean

2001-10-25 Thread Francois Duchaussoy

> I have an ActionForm with a Collection object inside.
> I'd like to use the  tag to display that Collection.
> Could anyone give me an example on how to do that?
> 
> something like that??
>  labelProperty="value"/>
> 
> Thanks.
> Francois.



Html:options question help

2002-06-26 Thread Eyassu, Daniel

IF I have an ActionFrom that looks like
 

public class WorkAuthForm extends ActionForm
{
 private ArrayList engineers;

public ArrayList getEngineers()
{
return this.engineers;
}

public void setEngineers(ArrayList engineers)
{
this.engineers = engineers;
}
 
..
}
 

And engineers are:

public class Engineer
{

private String id;

private String name;

/** Creates a new instance of Engineer */
public Engineer()
{
}

public void setId(String id)
{
this.id = id;
}

public String getId()
{
return id;
}

public void setName(String name)
{
this.name = name;
}

public String getName()
{
return name;
}
}
 

why can"t I do the following:
 


   
 
 

Thanks
Dan



Re: Struggling with html:options

2003-07-09 Thread sjones

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>


<%@ page language="java"
 import=" com.ubs.directory.common.DirectoryEqualityOperator, java.util.*"
contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"
%>










<%
List o = DirectoryEqualityOperator.getOperationNames();
request.setAttribute("yerSelectBox", o);
%>








<%
 for (int i=0; i < o.size(); i++) {
String eqt = (String)o.get(i);
%>
<%=eqt %>
<%
 }
%>





I get this error,  can anyone help


[7/9/03 12:50:10:016 EDT] 868b89 WebGroup E SRVE0026E: [Servlet Error]-[No
getter method available for property key for bean under name yerSelectBox]:
javax.servlet.jsp.JspException: No getter method available for property key
for bean under name yerSelectBox
at org.apache.struts.taglib.html.OptionsTag.doEndTag(OptionsTag.java:257)
at
org.apache.jsp._ypEqualityOperatorOptions._jspService(_ypEqualityOperatorOpt
ions.java:163)
at
com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
"sjones" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Good Morning Everyone.
>
> I have a List object and i need my JSP page
> to build a drop down list box using the List as the source
> for the options.
>
> I can do it with a scriplet but i need to one of the struts tags
> 
> 
>
> can anyone help me with use one of these tags.
>
> I am looking at the java.docs but it doesn't really help me.
>
> the List is also accessible from a classs name EqualityOperators
>
> List o = EqualityOperators.getOperators();




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



RE: Struggling with html:options

2003-07-09 Thread James Childers
Try this.

In your Action:

ArrayList months = new ArrayList();
months.add(new LabelValueBean("January", 1);
months.add(new LabelValueBean("Februrary", 2);
request.setAttribute("months", months);

In your JSP:





HTH,

-= J

> "sjones" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Good Morning Everyone.
> >
> > I have a List object and i need my JSP page
> > to build a drop down list box using the List as the source
> > for the options.
> >
> > I can do it with a scriplet but i need to one of the struts tags
> > 
> > 
> >
> > can anyone help me with use one of these tags.
> >
> > I am looking at the java.docs but it doesn't really help me.
> >
> > the List is also accessible from a classs name EqualityOperators
> >
> > List o = EqualityOperators.getOperators();

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



html:options list source question

2003-07-13 Thread Craig Berry
After much googling and head-scratching, I finally have an html:options tag working on 
a jsp.  The problem is that I don't know why one component of the solution is needed, 
and I was hoping someone can explain it to me.
 
My ActionForm subclass, EditDeForm, has a pair of methods to provide the option list 
as part of the form bean:

public Collection getNumFmtOptions() {
  ArrayList list = new ArrayList();
  list.add(new LabelValueBean("None", "0"));
  list.add(new LabelValueBean("Comma separated", "1"));
  list.add(new LabelValueBean("Currency", "2"));
  return list;
}
 
public void setNumFmtOptions(Collection options) {
  // No op, here to satisfy bean-ness.
}

The jsp page contains an html:form section linked via action mapping to the EditDeForm 
type.  In it, there is a select/options section that looks like this:


  
 

I had thought that this would be enough to make it work.  The html:options is in the 
context of an html:form that knows about the current form bean, and the form bean has 
a property numFmtOptions that contains what is needed to populate the options list.  
But when I tried just this, I got a "cannot find bean" error on numFmtOptions.
 
The googling mentioned above finally revealed that I had to add this at the top of my 
jsp:



My question is:  Why?  What is this additional definition for?  What information does 
it supply that isn't already available to html:options inside the html:form context?
 
I'm happy that I have my code working, but I'd be even happier if I knew why it's 
working. :)
 
-- 
Craig Berry
Principal Architect
PortBlue Corp.
 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

RE: MessageResource, html:options & i182

2003-08-28 Thread Paul McCulloch
You could use a single key with some sort of delimter:

sports.options=Football\Hockey\Badminton

and parse the key to create your options.

Paul

-Original Message-
From: Lars Bergström [mailto:[EMAIL PROTECTED]
Sent: 28 August 2003 12:25
To: [EMAIL PROTECTED]
Subject: MessageResource, html:options & i182


Part 1
On a jsp page I want to have a html:select of the type that has a
predefined
number of options, e.g. different sports. Now, I want to make use of
Struts
internalization where the differents locales text strings are retrieved
from
its locale properties file. 

If I read the text strings from the Message resource file one by one
then I
have to edit my java code when I find out that I want another sport in
my
html:select. In my case a new sport is added very seldomly. 

Is there a nice way of using struts tags like logic:iterate together
with
html:select or 
Can I in some nice looking way with the help of MessageResourceBundle
class
retrieve all text strings starting with sports.* ? 

Part 2

Have being doing some thinking and reading,

In chapter 13.4.3 (Struts in Action) I found text talking about exaktly
this.
Still, the "keys" array must be populated in some way. One alternative
is to
have a separate properties file that holds all the keys for different
sports.
Another alternative is to have a database table containing the keys. 

org.apache.scaffold.text.MessageUtils? Whereever did it go? Can't find
it!
Anyone? 

An aspect of this is how often you estimate that the information will be
edited by the end user. If the end user never or almost never add new
sports,
then saving the i18n strings in a Resource files would be alright.
However, if
the end user quite frequently changes the information, perhaps would it
then
be more convenient to store the information in a database since it can
be
viewed more a part of the application rather than a part of the delivery
of
the product. 

Best regards

Lasse Bergström

 

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


**
Axios Email Confidentiality Footer
Privileged/Confidential Information may be contained in this message. If you are not 
the addressee indicated in this message (or responsible for delivery of the message to 
such person), you may not copy or deliver this message to anyone. In such case, you 
should destroy this message, and notify us immediately. If you or your employer does 
not consent to Internet email messages of this kind, please advise us immediately. 
Opinions, conclusions and other information expressed in this message are not given or 
endorsed by my Company or employer unless otherwise indicated by an authorised 
representative independent of this message.
WARNING:
While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted 
via electronic mail attachments we cannot guarantee that attachments do not contain 
computer virus code.  You are therefore strongly advised to undertake anti virus 
checks prior to accessing the attachment to this electronic mail.  Axios Systems Ltd 
grants no warranties regarding performance use or quality of any attachment and 
undertakes no liability for loss or damage howsoever caused.


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



Re: Simple html:options question

2003-09-11 Thread Kris Schneider
Pretty sure you can just do:



It should use the list for both the values and the labels. If the list is a
property on your form:



If the list is a property of some other bean:



Quoting Kumar M <[EMAIL PROTECTED]>:

> 
> Hi all,
> 
> I have an ArraList of strings that I want to show in a drop-down box. The 
> same thing is both the label as well as the value. Can anybody tell me how I
> 
> can do this using html:options? The collection in html:options is expected 
> to hold JSP beans, which is not the case in my situation.
> 
> Thanks in advance!

-- 
Kris Schneider <mailto:[EMAIL PROTECTED]>
D.O.Tech   <http://www.dotech.com/>

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



Re: html:options maximum length?

2003-10-30 Thread Richard Yee
I think you should re-think your UI design. Besides being very slow, the 
select box will be very annoying and difficult for the end user to use. You 
should try and narrow down the users choices before they get to the select 
box page so that you only need to show a few dozen options at most.

Regards,

Richard

At 04:22 PM 10/30/2003, you wrote:
I have a an Array with a large list of names in it (up to about 1000+ or
more).
I need to display these names in a drop down list, but when The page loads
it
simply stops loading after about 837 lines.
The code I am using is:

labelProperty="consultantName" /> Any ideas why it only displays a part of 
the Array and not the full thing? Any help is appreciated, Matt 
__ Disclaimer: 
This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. 
If you have received this email in error, please notify the addressee by 
return email and delete the email. This email transmission is the property 
of HAS Solutions and any information it contains is legally protected. HAS 
Solutions has no liability (including liability in negligence) to any 
person for any loss or damage consequential or otherwise suffered or 
incurred by that person resulting directly or indirectly from either the 
use of, or reliance on, the information contained herein. 
__


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


html:options == null after inputForward

2003-02-07 Thread Kersten
Hi,
I have an ActionForm for my JSP with contains one String for the 
"html:select", one String-Array for the options property and one 
String-Array for the optionslabel.
There are getter and setter - Methods for all of these variables.

...
private String pwGruppe_ausgewaehlt = null;
private String pwGruppeID[] = null;
private String pwGruppeLabel[] = null;
...
//I don't want to show the whole getter and setter here...

In my JSP I'm using the following to show a popup-menu:





To show this in my JSP is no problem. But if the ActionForm detect a 
problem (in the validate - methode) in the JSP, it tries to redirect 
to the JSP with the error and the old data from the JSP. But struts seems 
not to be able to catch the data from
the "options". While loading the JSP I get an error that the pwGruppeID is 
null. Is there a way to solve this problem?

ciao Oliver.

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




AW: html:options selected attribute

2003-02-12 Thread Slobodan Kasterovic
Hi !

Look my sample:
### Form
private ArrayList projektfilterliste;
private String[] projektfilter;

### JSP





### Action
ArrayList filterInhalt = new ArrayList();
filterInhalt.add(new LabelValueBean(
getAllProjectsDescription(request),
"One"));
filterInhalt.add(new LabelValueBean(
getAllProjectsDescription(request),
"Two"));
nextForm.setProjektfilterliste(filterInhalt);
request.setAttribute("projektfilterliste",filterInhalt);  // !!!
// Preselection
ArrayList preselectedFilter = new ArrayList();
preselectedFilter.add("One");
nextForm.setProjektfilter(
(String[]) preselectedFilter.toArray(new String[0])); // can multiple 
to


bye

Slobodan Kasterovic


--> -Ursprungliche Nachricht-
--> Von: Jason Vinson [mailto:[EMAIL PROTECTED]]
--> Gesendet: Mittwoch, 12. Februar 2003 13:51
--> An: Struts Users Mailing List
--> Betreff: html:options selected attribute
-->
-->
--> Hi folks,
-->
-->There my be a simple answer to this that I am
--> overlooking, but I am populating a pull down select, and I
--> can't figure out a good way to set the selected attribute
--> to the first element.  I am using a collection (string
--> array) and my jsp has this code:
-->
-->  
-->  property="queuesName" size="1">
-->   
--> 
-->   
-->
--> All I want to do is have the first option selected, and it
--> is defaulting to the last option.
-->
--> any help?
-->
--> TIA,
--> Jason
-->
--> 
--> -
--> 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]




RE: html:options selected attribute

2003-02-12 Thread Sri Sankaran
Take your pick of

http://marc.theaimsgroup.com/?l=struts-user&m=103416927522003&w=2
http://marc.theaimsgroup.com/?l=struts-user&m=103313043614360&w=2
http://marc.theaimsgroup.com/?l=struts-user&m=103254783510467&w=2
http://marc.theaimsgroup.com/?l=struts-user&m=102406536726794&w=2

Or just look at the same application that ships with Struts (html-select.jsp in 
struts-exercise-taglib).

Please do search the archives before posting

Sri

-Original Message-
From: Jason Vinson [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, February 12, 2003 9:25 AM
To: Struts Users Mailing List
Subject: Re: html:options selected attribute


I am not exactly following the logic here.  Could you elaborate a little more?

Thanks,
Jason


---Original Message---
From: Slobodan Kasterovic <[EMAIL PROTECTED]>
Sent: 02/12/03 08:24 AM
To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
Subject: AW: html:options selected attribute

> 
> Hi !

Look my sample:
### Form
private ArrayList projektfilterliste;
private String[] projektfilter;

### JSP


 

### Action
ArrayList filterInhalt = new ArrayList();
filterInhalt.add(new LabelValueBean(
getAllProjectsDescription(request),
"One"));
filterInhalt.add(new LabelValueBean(
getAllProjectsDescription(request),
"Two"));
nextForm.setProjektfilterliste(filterInhalt);
request.setAttribute("projektfilterliste",filterInhalt);  // !!! // Preselection 
ArrayList preselectedFilter = new ArrayList();
preselectedFilter.add("One"); nextForm.setProjektfilter(
(String[]) preselectedFilter.toArray(new String[0])); // can multiple 
to


bye

Slobodan Kasterovic


--> -Ursprungliche Nachricht-
--> Von: Jason Vinson [mailto:[EMAIL PROTECTED]]
--> Gesendet: Mittwoch, 12. Februar 2003 13:51
--> An: Struts Users Mailing List
--> Betreff: html:options selected attribute
-->
-->
--> Hi folks,
-->
-->There my be a simple answer to this that I am overlooking, but I 
--> am populating a pull down select, and I can't figure out a good way 
--> to set the selected attribute to the first element.  I am using a 
--> collection (string
--> array) and my jsp has this code:
-->
-->  
-->  size="1">
-->   
--> 
-->   
-->
--> All I want to do is have the first option selected, and it is 
--> defaulting to the last option.
-->
--> any help?
-->
--> TIA,
--> Jason
-->
--> 
--> -
--> 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]

> 

-
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]




RE: html:options encoded property

2002-12-10 Thread Kocur, David
Correct me if I'm wrong, but aren't the "e; entries unnecessary?
Couldn't you just remove them?

-Original Message-
From: Nathalie Foures [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 9:52 AM
To: [EMAIL PROTECTED]
Subject: html:options encoded property


Hi!

I wrote a JSP page with the following lines :
...

   

...

where name and url are the String attributes of a bean named Proxy. This
code displays a box, with a list of "names". When I select a name, this
returns the corresponding "url". The problem is that the url is written
with escaped characters, BUT displayed with unescaped characters.

For example, the bean Proxy has the following url linked with the name
"something" : "http://myhome/hello&action="doSomething"";.
But, the resulting html page looks like this :
...

   http://myhome/hello&action="doSomething"";>something
...

The " character is translated. As a result the option value becomes
"http://hello&action="; : it stops at the first ":" character and doesn't
take the whole url! doSomething is forgotten...

I looked for attributes like "filter" for the html:options tag, but I
didn't succeed...Has someone an idea to help me!

Thank you!

Nathalie

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

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




Ye olde html:options tag?

2003-01-02 Thread Michael P
I apologize for this basic question, but I'm new to struts and Java web
programming in general, and I really can't get the  tag to
work...

The error I'm getting, specifically, is:
  javax.servlet.jsp.JspException: No getter method available for property
email for bean under name users

My JSP defines a collection like this:
  

Then tries to use it like this:
  

  

My understanding of this is that it will call getUsers() on the
adminLoginForm bean to get a Collection, and then on each item within the
collection, will call getEmail() to retrieve the option property and
label.

Do I need to define a bean somewhere (in some XML file?) for the user
objects contained within the collection or something?  The collection
contains UserView objects that /do/, in fact, have a getEmail() method, so
I can't figure out why this won't work.

I have defined a form-bean for the login form:
  

  

Thanks for any help you can offer...

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: html:select and html:options

2003-01-03 Thread Sterin, Ilya
You can use the LabelValueBean class for that, see www.husted.com for
examples.

Ilya

-Original Message-
From: Jose Luis
To: Struts Users Mailing List
Sent: 1/3/03 11:04 AM
Subject: html:select and html:options

hi everyone, i have a page whit the following code:







where sectorCompany is an ArrayList that i built prior to view the jsp.
My problem is:

what i really need is to pass to the result action the value which
represents the labels that contains the SectorCompany ArrayList, so, How
i can build a select that shows labels but that also stores the id
(longs representing registers in a RDBMS) to pass this id?


Thank everybody in advance.

ps. If someOne knows a subject in the mailing list which already solves
this plese redirectme to it.

José Luis






Re: html:select and html:options

2003-01-03 Thread Jose Luis
RE: html:select and html:optionsnow i have the page www.husted.com/struts/, please 
could you guideme where exactly or moreless?

Thanks
p.s happy new year
  - Original Message - 
  From: Sterin, Ilya 
  To: 'Jose Luis ' ; 'Struts Users Mailing List ' 
  Sent: Friday, January 03, 2003 7:08 PM
  Subject: RE: html:select and html:options


  You can use the LabelValueBean class for that, see www.husted.com for examples. 

  Ilya 

  -Original Message- 
  From: Jose Luis 
  To: Struts Users Mailing List 
  Sent: 1/3/03 11:04 AM 
  Subject: html:select and html:options 

  hi everyone, i have a page whit the following code: 

   

   

   

  where sectorCompany is an ArrayList that i built prior to view the jsp. 
  My problem is: 

  what i really need is to pass to the result action the value which 
  represents the labels that contains the SectorCompany ArrayList, so, How 
  i can build a select that shows labels but that also stores the id 
  (longs representing registers in a RDBMS) to pass this id? 



  Thank everybody in advance. 

  ps. If someOne knows a subject in the mailing list which already solves 
  this plese redirectme to it. 

  José Luis 







html:select and html:options example?

2003-06-15 Thread Stephan Niedermeier
Hello,

who can give me an example, how to use the html:select in conjunction with
html:options? I had already defined an ActionForm and JSP like follows. The
listing of the option-Elements works fine but not the "reshowing" of the
selected elements of the list, because after I have clicked the submit
button I've got an IllegalArgumentException (BeanUtils.populate):

java.lang.IllegalArgumentException: argument type mismatch
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUtils.j
ava:1789)
at
org.apache.commons.beanutils.PropertyUtils.setNestedProperty(PropertyUtils.j
ava:1684)
at
org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.java:17
13)
at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:1019)
{...}

My FormBean looks like this:
{...}
public final class RoleEditForm extends ActionForm {
{...}public void setAllUsers(ArrayList allUsers)
 this.allUsers = allUsers;}public ArrayList getAllUsers()
 return this.allUsers;}
{...}}
The allUsers list contains user objects. The user objects have the accessor
methods getId(), getName().
My JSP looks like this:





After clicking the submit button I've got the Exception. That's wrong?

Thank you very much!
Regards
Stephan



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



Re: html:options and html:select

2004-02-02 Thread Claire Wall
you can do the following:



">




'property' of the select box should be the name of the property in your
FormBean that you wish to store the selected value in.
You then iterate through the list in your form by using the 
tag. For every object in your list an  tag is written, where the
value is the property 'id' of the current CProduct and the name displayed in
the select box is the name of this CProduc object. This may not work as it
stands due to using an Integer object - i'm not certain that you can set the
value of a select box option to an Integer object. You'd have to try it and
see, and perhaps somebody can clarify this further, but I've never tried
this myself.

HTH
claire :)

- Original Message -
From: "Otto, Frank" <[EMAIL PROTECTED]>
To: "Struts-User (E-Mail)" <[EMAIL PROTECTED]>
Sent: Monday, February 02, 2004 12:11 PM
Subject: html:options and html:select


> hello,
>
> I have following bean:
>
> public class CProduct {
>
> private Integer id;
>
> private String name
>
> public Integer getId() {return id;}
> puclic void setId(Integer id){
> ...
> }
>
> My form class contains a java.util.List of CProduct bean.
>
> How can I display the List as select box? I want to use the id as value
and the name as label of the select box.
>
> For example:
>
> 
> scanner
> harddisk
> 
>
> Has anyone an idea?
>
> Regards,
>
> Frank
>
>



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



Re: html:options and html:select

2004-02-02 Thread Mark Lowe


ArrayList productList = new ArrayList();

CProduct product = new CProduct();
product.setId(new Integer(1));
product.setName("My Product");
productList.add(product);

request.setAttribute("products",productList.toArray());

...

--


If you dont want to have a refering action then you can have an action 
that returns null rather than a forward. and do this in jstl



Cheers Mark

On 2 Feb 2004, at 13:11, Otto, Frank wrote:

hello,

I have following bean:

public class CProduct {

private Integer id;

private String name

public Integer getId() {return id;}
puclic void setId(Integer id){
...
}
My form class contains a java.util.List of CProduct bean.

How can I display the List as select box? I want to use the id as 
value and the name as label of the select box.

For example:


scanner
harddisk

Has anyone an idea?

Regards,

Frank



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


AW: html:options and html:select

2004-02-02 Thread Otto, Frank
Thanks for your answer, but

I have found out, that I can use html:optionsCollection.





Regards,

Frank

-Ursprüngliche Nachricht-
Von: Claire Wall [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 2. Februar 2004 13:22
An: Struts Users Mailing List
Betreff: Re: html:options and html:select


you can do the following:



">




'property' of the select box should be the name of the property in your
FormBean that you wish to store the selected value in.
You then iterate through the list in your form by using the 
tag. For every object in your list an  tag is written, where the
value is the property 'id' of the current CProduct and the name displayed in
the select box is the name of this CProduc object. This may not work as it
stands due to using an Integer object - i'm not certain that you can set the
value of a select box option to an Integer object. You'd have to try it and
see, and perhaps somebody can clarify this further, but I've never tried
this myself.

HTH
claire :)

- Original Message -
From: "Otto, Frank" <[EMAIL PROTECTED]>
To: "Struts-User (E-Mail)" <[EMAIL PROTECTED]>
Sent: Monday, February 02, 2004 12:11 PM
Subject: html:options and html:select


> hello,
>
> I have following bean:
>
> public class CProduct {
>
> private Integer id;
>
> private String name
>
> public Integer getId() {return id;}
> puclic void setId(Integer id){
> ...
> }
>
> My form class contains a java.util.List of CProduct bean.
>
> How can I display the List as select box? I want to use the id as value
and the name as label of the select box.
>
> For example:
>
> 
> scanner
> harddisk
> 
>
> Has anyone an idea?
>
> Regards,
>
> Frank
>
>



-
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]



RE: html:options and html:select

2004-02-02 Thread anant.parnami

Hi Frank

Try using

Request.setAttribute("collectionName",list);





I have tried putting the Collection as the request attribute never in
the form bean. One more thing make user you provide exact path of
CProduct in the name field.

Regards

Anant

-Original Message-
From: Otto, Frank [mailto:[EMAIL PROTECTED]
Sent: Monday, February 02, 2004 5:41 PM
To: Struts-User (E-Mail)
Subject: html:options and html:select


hello,

I have following bean:

public class CProduct {

private Integer id;

private String name

public Integer getId() {return id;}
puclic void setId(Integer id){
...
}

My form class contains a java.util.List of CProduct bean.

How can I display the List as select box? I want to use the id as value
and the name as label of the select box.

For example:


scanner
harddisk


Has anyone an idea?

Regards,

Frank


Confidentiality Notice

The information contained in this electronic message and any attachments to this 
message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged 
information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

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



RE: html:options and html:select

2004-02-02 Thread Guillermo Meyer
Otto, you can take a look at http://providers.sourceforge.net/, this
project can help you in filling options in selects. There is a 0.1
version, butwe are working in 0.2 with a lot of improvements.

Cheers.
Guillermo.

-Original Message-
From: Otto, Frank [mailto:[EMAIL PROTECTED] 
Sent: Lunes, 02 de Febrero de 2004 09:28 a.m.
To: 'Struts Users Mailing List'
Subject: AW: html:options and html:select


Thanks for your answer, but

I have found out, that I can use html:optionsCollection.


 

Regards,

Frank

-Ursprüngliche Nachricht-
Von: Claire Wall [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 2. Februar 2004 13:22
An: Struts Users Mailing List
Betreff: Re: html:options and html:select


you can do the following:



">




'property' of the select box should be the name of the property in your
FormBean that you wish to store the selected value in. You then iterate
through the list in your form by using the  tag. For
every object in your list an  tag is written, where the value is
the property 'id' of the current CProduct and the name displayed in the
select box is the name of this CProduc object. This may not work as it
stands due to using an Integer object - i'm not certain that you can set
the value of a select box option to an Integer object. You'd have to try
it and see, and perhaps somebody can clarify this further, but I've
never tried this myself.

HTH
claire :)

- Original Message -
From: "Otto, Frank" <[EMAIL PROTECTED]>
To: "Struts-User (E-Mail)" <[EMAIL PROTECTED]>
Sent: Monday, February 02, 2004 12:11 PM
Subject: html:options and html:select


> hello,
>
> I have following bean:
>
> public class CProduct {
>
> private Integer id;
>
> private String name
>
> public Integer getId() {return id;}
> puclic void setId(Integer id){
> ...
> }
>
> My form class contains a java.util.List of CProduct bean.
>
> How can I display the List as select box? I want to use the id as 
> value
and the name as label of the select box.
>
> For example:
>
> 
> scanner
> harddisk
> 
>
> Has anyone an idea?
>
> Regards,
>
> Frank
>
>



-
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]

NOTA DE CONFIDENCIALIDAD
Este mensaje (y sus anexos) es confidencial, esta dirigido exclusivamente a las 
personas direccionadas en el mail y puede contener informacion (i)de propiedad 
exclusiva de Interbanking S.A. o (ii) amparada por el secreto profesional. Cualquier 
opinion en el contenido, es exclusiva de su autor y no representa necesariamente la 
opinion de Interbanking S.A. El acceso no autorizado, uso, reproduccion, o divulgacion 
esta prohibido. Interbanking S.A no asumira responsabilidad ni obligacion legal alguna 
por cualquier informacion incorrecta o alterada contenida en este mensaje. Si usted ha 
recibido este mensaje por error, le rogamos tenga la amabilidad de destruirlo 
inmediatamente junto con todas las copias del mismo, notificando al remitente. No 
debera utilizar, revelar, distribuir, imprimir o copiar este mensaje ni ninguna de sus 
partes si usted no es el destinatario. Muchas gracias.



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



RE: html:options and html:select

2004-02-02 Thread Jiin-Her Lu
If your list stores objects which is the type of Struts' LabelValueBean (provides only 
getValue() and getLabel() methods), then you can simply as 






Jiin-Her Lu
(816) 926-2145

>>> [EMAIL PROTECTED] 02/02/04 06:31AM >>>

Hi Frank

Try using

Request.setAttribute("collectionName",list);





I have tried putting the Collection as the request attribute never in
the form bean. One more thing make user you provide exact path of
CProduct in the name field.

Regards

Anant

-Original Message-
From: Otto, Frank [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 02, 2004 5:41 PM
To: Struts-User (E-Mail)
Subject: html:options and html:select


hello,

I have following bean:

public class CProduct {

private Integer id;

private String name

public Integer getId() {return id;}
puclic void setId(Integer id){
...
}

My form class contains a java.util.List of CProduct bean.

How can I display the List as select box? I want to use the id as value
and the name as label of the select box.

For example:


scanner
harddisk


Has anyone an idea?

Regards,

Frank


Confidentiality Notice

The information contained in this electronic message and any attachments to this 
message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged 
information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

-
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]



Repost : Usage of< html:options>

2004-02-17 Thread anant.parnami





Hi,

I am a newbie in struts,

I have to populate a dropdown using html:options. I have to use a collection of beans. 
This collection should be stored in my Action Form.

I have a collection of CountryBeans named as collectionCountry. In my action class I 
am writing

request.setAttribute("countryList",collectionCountry);

In my jsp I am writing


Now I want to Store this collection in my ActionForm and get it in the jsp. what 
changes do I need to do to implement the same


Can you please suggest me some way of doing this


Thanks for any help in advance

Regards

Anant Parnami




-Original Message-
From: Manuel Lenz [mailto:[EMAIL PROTECTED]

Sent: Tuesday, February 17, 2004 1:49 PM
To: Struts Users Mailing List
Subject: No Action is executed







Hi to all,
my struts-webApplication is used by almost 80 people.
After 1-2 weeks my application doesn´t react anymore,
if I do call an ActionClass which will connect to an oracle database.

So I guess I do have a problem with the database connection.
My database config shows that:

  
  
  
  
  
  



I do work with normal statements and with prepared statements. I guess there might by 
to much opened result sets, statements and database connection. But our 
serverAdministrator says, that there are only 5 unused database connections left. Max 
value is 20.

Does anybody have an idea?

Greetings, Manuel


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


Confidentiality Notice


The information contained in this electronic message and any attachments to this 
message are intended for the exclusive use of the addressee(s) and may contain 
confidential or privileged information. If you are not the intended recipient, please 
notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of 
this message and any attachments.

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


Confidentiality Notice

The information contained in this electronic message and any attachments to this 
message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged 
information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

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



Re: Help with html:options

2002-09-04 Thread Matt Veitas

Change the attribute "name"  to "collection" and it should work.

This tag operates in one of two major modes, depending on whether or not 
the |collection| attribute is specified. If the |collection| attribute 
is included, the following rules apply:

* The *collection* attribute is interpreted as the name of a JSP
  bean, in some scope, that itself represents a collection of
  individual beans, one per option value to be rendered.
* The *property* attribute is interpreted as the name of a property
  of the individual beans included in the collection, and is used to
  retrieve the value that will be returned to the server if this
  option is selected.
* The *labelProperty* attribute is interpreted as the name of a
  property of the individual beans included in the collection, and
  is used to retrieve the label that will be displayed to the user
  for this option. If the |labelProperty| attribute is not
  specified, the property named by the |property| attribute will be
  used to select both the value returned to the server and the label
  displayed to the user for this option.



[EMAIL PROTECTED] wrote:

>hi all,
>
>I am getting the following exception in html:options tag.
>
>[ServletException in:/jsp/EditServerBody.jsp] No getter method available 
>for property value for bean under name nngList' 
>
>This is how I am using it
>
>
>
>Where nngList is of type Vector and it contains elements of type 
>OptionValue which has getValue() and getLabel().
>
>Anything else I am missing.
>
>
>Kamal
>
>
>The information contained in this message may be privileged 
>and confidential and protected from disclosure.  If the 
>reader of this message is not the intended recipient, or an 
>employee or agent responsible for delivering this message to 
>the intended recipient, you are hereby notified that any 
>reproduction, dissemination or distribution of this 
>communication is strictly prohibited. If you have received 
>this communication in error, please notify us immediately by 
>replying to the message and deleting it from your computer.
>
>Thank you.
>Tellabs
>
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>
>
>  
>


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




html:select and html:options tags

2002-03-01 Thread Viet Kevin


Hello all

My question is about the struts html:select and html:options tags

public class xxxForm extends ActionForm 
{
private Person choosed;
private Collection persons;


public get...
// accessors for this attributes are defined but I do not display
// them
}

When creating the form I set the choosed properties to firs instance in the persons 
list
xxxForm.setChoosed(xxxForm.getPersons.iterator.next());

Then I want to display that list in a html page for selecting a person in that list.
The html select must list all the persons AND the chooseen one must be displayed first 
(setting the html-attibute selected="selected" for the choosen one)

The other problem is that I want to use an index (an int that index the instances in 
the list) as the value
of the html option tag (not the name of the person)

so the html produced must be something like : 

 John  
 Henri 
 Max 


I play a lot of time trying to obtain this result with the struts tags 
but never figured out how to do it

Please tell me if it is possible to do or propose me an other solution
but I must have an index in my list so the value in the option tag must 
be an int


And the last question is I can't see what the attribute named tabindex in the 
html:select
tag is used for?

Thx in advance

=
-- KeV -- 
=

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




Re: CachedRowSet for html:options

2002-03-09 Thread Adam Hardy

You mean you're displaying a list in a table or you are displaying a select drop-down 
box?

The html:options tag works great with forms, it'll initialize the select box to what's 
in the form object, and it'll display appropriate labels and set up the appropriate 
values on each option.

You can quite easily use the CachedRowSet.toCollection(column) to return any column of 
the rowset as a collection. Instead of putting the whole rowset in the session, you'll 
have to put a collection for the values and a collection for the labels. A few more 
lines of code, yes, but not exactly difficult.

If your lists are just lists and not select boxes (it's not clear from your message), 
use a logic:iterate tag.



On Fri, 08 March 2002, Sunder wrote:

> 
> Hi,
> I am currently retrieving a cachedRowSet from a session bean and
> displaying lists using the rowset. I would like to use the struts
> html:options tag to do the same, From the documentation, it looks like I
> have to put this rowset into a collection and use the same. Is there a
> better way to do this?
> 
> Thanks,
> Sunder
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


Find the best deals on the web at AltaVista Shopping!
http://www.shopping.altavista.com

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




RE: CachedRowSet for html:options

2002-03-09 Thread Sunder R Somasundaram

Thanks for your reply; it is a select box with single or multiple
options. Do I have to put in both the values and the labels even if both
are the same?


-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, March 09, 2002 5:03 AM
To: [EMAIL PROTECTED]
Subject: Re: CachedRowSet for html:options

You mean you're displaying a list in a table or you are displaying a
select drop-down box?

The html:options tag works great with forms, it'll initialize the select
box to what's in the form object, and it'll display appropriate labels
and set up the appropriate values on each option.

You can quite easily use the CachedRowSet.toCollection(column) to return
any column of the rowset as a collection. Instead of putting the whole
rowset in the session, you'll have to put a collection for the values
and a collection for the labels. A few more lines of code, yes, but not
exactly difficult.

If your lists are just lists and not select boxes (it's not clear from
your message), use a logic:iterate tag.



On Fri, 08 March 2002, Sunder wrote:

> 
> Hi,
> I am currently retrieving a cachedRowSet from a session bean and
> displaying lists using the rowset. I would like to use the struts
> html:options tag to do the same, From the documentation, it looks like
I
> have to put this rowset into a collection and use the same. Is there a
> better way to do this?
> 
> Thanks,
> Sunder
> 
> 
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


Find the best deals on the web at AltaVista Shopping!
http://www.shopping.altavista.com

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



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




RE: CachedRowSet for html:options

2002-03-10 Thread Adam Hardy

http://jakarta.apache.org/struts/doc-1.0.2/struts-html.html#options

* If the labelProperty attribute is not specified, the property named by the 
property attribute will be used to select both the value returned to the server and 
the label displayed to the user for this option.




On Sat, 09 March 2002, "Sunder R Somasundaram" wrote:

> 
> Thanks for your reply; it is a select box with single or multiple
> options. Do I have to put in both the values and the labels even if both
> are the same?
> 
> 
> -Original Message-
> From: Adam Hardy [mailto:[EMAIL PROTECTED]] 
> Sent: Saturday, March 09, 2002 5:03 AM
> To: [EMAIL PROTECTED]
> Subject: Re: CachedRowSet for html:options
> 
> You mean you're displaying a list in a table or you are displaying a
> select drop-down box?
> 
> The html:options tag works great with forms, it'll initialize the select
> box to what's in the form object, and it'll display appropriate labels
> and set up the appropriate values on each option.
> 
> You can quite easily use the CachedRowSet.toCollection(column) to return
> any column of the rowset as a collection. Instead of putting the whole
> rowset in the session, you'll have to put a collection for the values
> and a collection for the labels. A few more lines of code, yes, but not
> exactly difficult.
> 
> If your lists are just lists and not select boxes (it's not clear from
> your message), use a logic:iterate tag.
> 
> 
> 
> On Fri, 08 March 2002, Sunder wrote:
> 
> > 
> > Hi,
> > I am currently retrieving a cachedRowSet from a session bean and
> > displaying lists using the rowset. I would like to use the struts
> > html:options tag to do the same, From the documentation, it looks like
> I
> > have to put this rowset into a collection and use the same. Is there a
> > better way to do this?
> > 
> > Thanks,
> > Sunder
> > 
> > 
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 
> 
> Find the best deals on the web at AltaVista Shopping!
> http://www.shopping.altavista.com
> 
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


Find the best deals on the web at AltaVista Shopping!
http://www.shopping.altavista.com

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




html:options problem with labelProperty

2002-03-13 Thread Allen Walker

I have the following:

[html:select property="merchandiseCategory"]
[html:options property="merchandiseCategoryCodes" 
labelProperty="merchandiseCategoryDescriptions"/]
[/html:select]

Now when I take out the labelProperty attribute, all works. When the 
labelProperty attribute is in, I get:

java.lang.NullPointerException at 
org.apache.struts.taglib.html.OptionsTag.doEndTag(OptionsTag.java:296) at 
_jsp._cbmsi._admin._editbookrecord__jsp._jspService(D:\work\resin-1.2.7\webapps\cbmsi\admin\editbookrecord.jsp:101)
 



This worked fine until I moved to Struts 1.0.2. There is nothing wrong with 
my formbean, it contains the "merchandiseCategoryDescriptions" getter on 
the associated form bean.

Thanks for any help.

--
Allen Walker
<[EMAIL PROTECTED]>
Yahoo MessengerID: "auswalk"


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




html:options Iterator Creation error -

2002-03-25 Thread Sunder

Hi, 
I am trying to implement the html:options tag in one of our
applications,

I have a form bean with the following attributes,

private Collection securityOptions = null;
private String security = "Default";

In my action class, I populate the collection with 

PersonalForm perform = (PersonalForm) form;
Collection list = (Collection) new ArrayList();
for(int i = 0; i<10; i++)
{
list.add(new LabelValueBean("Default","Value"));
}
perform.setSecurityOptions(list);

and finally in my jsp, I try to display the collection using
html:options tag as follows

 
 
  


I get the following error when I try to view the page

javax.servlet.ServletException: Cannot create iterator for
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex
tImpl.java:463)
at
org.apache.jsp.personal$jsp._jspService(personal$jsp.java:1031)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServle
t.java:202)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatc
her.java:683)
- Root Cause -
javax.servlet.jsp.JspException: Cannot create iterator for
at
org.apache.struts.taglib.html.OptionsTag.getIterator(OptionsTag.java:420
)
at
org.apache.struts.taglib.html.OptionsTag.doEndTag(OptionsTag.java:222)
at
org.apache.jsp.personal$jsp._jspService(personal$jsp.java:785)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

Any comments,suggestions? Appreciate your help.

Thanks,
Sunder



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




  1   2   3   >