Re: html:option tag

2008-12-16 Thread Dave Newton
Use the html:options [1] or html:optionsCollection tag [2]?

[1] http://struts.apache.org/1.2.9/userGuide/struts-html.html#options
[2] http://struts.apache.org/1.2.9/userGuide/struts-html.html#optionsCollection

Dave


--- On Tue, 12/16/08, m.harig m.ha...@gmail.com wrote:

 From: m.harig m.ha...@gmail.com
 Subject: Re: html:option tag
 To: user@struts.apache.org
 Date: Tuesday, December 16, 2008, 8:23 AM
 is there anyone to answer my question%-|
 
 
 
 m.harig wrote:
  
  hi all
   
   am getting no.of users from DAO class and all
 username are in the form of
  User Object.
  
  ArrayList list = new ArrayList();
while(rs.next()){
  User user = new User();
   user.setUsername(abc);
  list.add(user);
 }
  
   this is my code . 
 %
ArrayList userList =
  (ArrayList)request.getAttribute(users);
 %
  
  
html:select
 property=username
  logic:iterate id=users
 collection=%=userList%
 
 length=%=+(userList.size()-1)%
  html:option
 value=bean:write name=users
  property=username//html:option
  /logic:iterate
  /html:select
  
 i can populate my User object by bean write
 . How do i set my
  username value to html:option
 value=.. anyone please let me clear
  
 
 -- 
 View this message in context:
 http://www.nabble.com/%3Chtml%3Aoption%3E-tag-tp21028416p21032987.html
 Sent from the Struts - User mailing list archive at
 Nabble.com.
 
 
 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail:
 user-h...@struts.apache.org

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



Re: html:option tag

2008-12-16 Thread m.harig


   is there anyone to answer my question%-|



m.harig wrote:
 
 hi all
  
  am getting no.of users from DAO class and all username are in the form of
 User Object.
 
 ArrayList list = new ArrayList();
   while(rs.next()){
 User user = new User();
  user.setUsername(abc);
 list.add(user);
}
 
  this is my code . 
%
   ArrayList userList =
 (ArrayList)request.getAttribute(users);
%
 
 
   html:select property=username
   logic:iterate id=users 
 collection=%=userList%
 length=%=+(userList.size()-1)%
   html:option value=bean:write 
 name=users
 property=username//html:option
   /logic:iterate
   /html:select
 
i can populate my User object by bean write . How do i set my
 username value to html:option value=.. anyone please let me clear
 

-- 
View this message in context: 
http://www.nabble.com/%3Chtml%3Aoption%3E-tag-tp21028416p21032987.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



html:option tag

2008-12-15 Thread m.harig

hi all
 
 am getting no.of users from DAO class and all username are in the form of
User Object.

ArrayList list = new ArrayList();
  while(rs.next()){
User user = new User();
 user.setUsername(abc);
list.add(user);
   }

 this is my code . 
   %
  ArrayList userList = (ArrayList)request.getAttribute(users);
   %


  html:select property=username
logic:iterate id=users 
collection=%=userList%
length=%=+(userList.size()-1)%
html:option value=bean:write 
name=users
property=username//html:option
/logic:iterate
/html:select

   i can populate my User object by bean write . How do i set my
username value to html:option value=.. anyone please let me clear
-- 
View this message in context: 
http://www.nabble.com/%3Chtml%3Aoption%3E-tag-tp21028416p21028416.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



bugs? or limition of struts 1.x? html:select html:option value=bean

2007-09-14 Thread john lee
Could any expert tell me why?
 
bean:write name='myselection' property='agent'/ has the value of illinois .
 
but, the following code do not set value=illinois', still literal string of 
bean:write name='myselection' property='agent'/, or this is the limition of 
Struts 1.x?
 
html:select property=agent
logic:iterate id=myselection name=mylist scope=session 
type=AgentForm
  html:option value=bean:write name='myselection' 
property='agent'/
bean:write name='myselection' property='agent'/
  /html:option
/logic:iterate
/html:select
 
no matter i use single quote or double quote around, still not solve the 
problem, pls give me ur hands,
 
tks in advance
 
   
-
Pinpoint customers who are looking for what you sell. 

RE: bugs? or limition of struts 1.x? html:select html:option value=bean

2007-09-14 Thread Slattery, Tim - BLS
html:option value=bean:write name='myselection'
property='agent'/

You can't nest tags in this way. It's not a Struts limitation, it's an
XML thing. You can makme it work by using the EL version of the html
tags:

html-el:option value=${myselection.agent}/

Or is it agent.myselection? I'm not terribly familiar with the bean
tags.


--
Tim Slattery
[EMAIL PROTECTED]


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



RE: bugs? or limition of struts 1.x? html:select html:option value=bean

2007-09-14 Thread john lee
Tim,
   
  tks for your input, but after i change to html-el:option, it show null in 
the list box on screen, 
  after i change html:select to html-el:select, the value just show on screen, 
but the list box is gone.
   
  do u know why?
   
  tks u so much
   
  john
 

Slattery, Tim - BLS [EMAIL PROTECTED] wrote:
   property='agent'/

You can't nest tags in this way. It's not a Struts limitation, it's an
XML thing. You can makme it work by using the EL version of the html
tags:



Or is it agent.myselection? I'm not terribly familiar with the bean
tags.


--
Tim Slattery
[EMAIL PROTECTED]


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



   
-
Building a website is a piece of cake. 
Yahoo! Small Business gives you all the tools to get online.

option value= selected converted to html:option value=

2006-11-10 Thread Søren Blidorf

How can I convert the following to Struts:

select name=rapport
option value=one selectedone/option
option value=twotwo/option
option value=treetree/option
/select

This does not work:

html:select property=rapport
html:option value=one selectedone/option
html:option value=twotwo/option
html:option value=treetree/option
/html:select

It is very important for me to specify which is selected

BR.

Soren, DK


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



Re: option value= selected converted to html:option value=

2006-11-10 Thread Mike Baroukh

Hi.

I think that you don't have so specify selected : struts will 
automatically add it if the value of the option is equals to the value 
of the property ...


Mike


Søren Blidorf a écrit :

How can I convert the following to Struts:

select name=rapport
option value=one selectedone/option
option value=twotwo/option
option value=treetree/option
/select

This does not work:

html:select property=rapport
html:option value=one selectedone/option
html:option value=twotwo/option
html:option value=treetree/option
/html:select

It is very important for me to specify which is selected

BR.

Soren, DK


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

  



--

Mike Baroukh

---
Cardiweb  - 31 Rue de Mogador Paris IXeme
06 63 57 27 22 - 01 53 21 82 63 - Jabber: [EMAIL PROTECTED]
http://www.cardiweb.com
---


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

SV: option value= selected converted to html:option value=

2006-11-10 Thread Søren Blidorf
Hi Mike.

That's what I hoped.

There is a request.GetParameter(rapport), but that does not do
anything to the html:select

Soren

-Oprindelig meddelelse-
Fra: Mike Baroukh [mailto:[EMAIL PROTECTED] 
Sendt: 10. november 2006 17:33
Til: Struts Users Mailing List
Cc: [EMAIL PROTECTED]
Emne: Re: option value= selected converted to html:option value=

Hi.

I think that you don't have so specify selected : struts will 
automatically add it if the value of the option is equals to the value 
of the property ...

Mike


Søren Blidorf a écrit :
 How can I convert the following to Struts:

 select name=rapport
 option value=one selectedone/option
 option value=twotwo/option
 option value=treetree/option
 /select

 This does not work:

 html:select property=rapport
 html:option value=one selectedone/option
 html:option value=twotwo/option
 html:option value=treetree/option
 /html:select

 It is very important for me to specify which is selected

 BR.

 Soren, DK


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

   


-- 

Mike Baroukh

---
Cardiweb  - 31 Rue de Mogador Paris IXeme
06 63 57 27 22 - 01 53 21 82 63 - Jabber: [EMAIL PROTECTED]
http://www.cardiweb.com
---




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



Re: SV: option value= selected converted to html:option value=

2006-11-10 Thread Laurie Harper
'rapport' needs to be a property on your form bean, not a request 
parameter/attribute. The 'property' attribute on the html:select tag 
tells Struts that the current selection is stored in that property. If 
the value of any enclosed html:option tag matches the value in that 
property, the corresponding option will automatically be selected.


L.

Søren Blidorf wrote:

Hi Mike.

That's what I hoped.

There is a request.GetParameter(rapport), but that does not do
anything to the html:select

Soren

-Oprindelig meddelelse-
Fra: Mike Baroukh [mailto:[EMAIL PROTECTED] 
Sendt: 10. november 2006 17:33

Til: Struts Users Mailing List
Cc: [EMAIL PROTECTED]
Emne: Re: option value= selected converted to html:option value=

Hi.

I think that you don't have so specify selected : struts will 
automatically add it if the value of the option is equals to the value 
of the property ...


Mike


Søren Blidorf a écrit :

How can I convert the following to Struts:

select name=rapport
option value=one selectedone/option
option value=twotwo/option
option value=treetree/option
/select

This does not work:

html:select property=rapport
html:option value=one selectedone/option
html:option value=twotwo/option
html:option value=treetree/option
/html:select

It is very important for me to specify which is selected

BR.

Soren, DK


-
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:option on a nested collection

2006-03-23 Thread Shoukat, Faisal
Hi Guys,

 

I have a formBean which has a collection of objects within it called Apps.
Each App object has several fields with one of these fields being a
collection or list of Strings.

 

ExampleFormBean properties are

 

String Name

String Class

String Student

List apps

 

Each app object looks like this

String first

String second

List actions.  --- This is a collection of Strings

 

I am trying to display the actions of the app object in a drop down list.
But am having a few problems with the option tag.

 

So far I have this:

logic:iterate name=exampleformbean property=apps id=app

 

html:select property=action 

   logic:iterate id=act name=app property=actions
indexId=index

 html:option value=1bean:write
name=act//html:option

 

/logic:iterate

 /html:select

 

This code displays the drop down with the correct string values showing.
However where I have put one above as the option value I actually want to
put something like the actual String i.e: bean:write name=act/.

 

Does anyone know how I can do this. I have tried html:options and
optionscollections but could not get them to work.

 

If the suggestion is to go with nested tags please provide an example as I
could not get far with this either.

 

Secondly, If I submit the form but have modified two rows from the drop down
when I get to the action class how can I know which rows I have modified.

 

Thanks in advance

 



Re: html:option on a nested collection

2006-03-23 Thread Vinit Sharma
You can use EL extention of html tag and use something like this:

html:option value=${exampleFormBean.apps.actions.act}bean:write
name=act//html:option

Assuming getters are defined for all properties.

Regds,


On 3/23/06, Shoukat, Faisal [EMAIL PROTECTED] wrote:

 Hi Guys,



 I have a formBean which has a collection of objects within it called Apps.
 Each App object has several fields with one of these fields being a
 collection or list of Strings.



 ExampleFormBean properties are



 String Name

 String Class

 String Student

 List apps



 Each app object looks like this

 String first

 String second

 List actions.  --- This is a collection of Strings



 I am trying to display the actions of the app object in a drop down list.
 But am having a few problems with the option tag.



 So far I have this:

 logic:iterate name=exampleformbean property=apps id=app



 html:select property=action 

logic:iterate id=act name=app property=actions
 indexId=index

  html:option value=1bean:write
 name=act//html:option



 /logic:iterate

  /html:select



 This code displays the drop down with the correct string values showing.
 However where I have put one above as the option value I actually want to
 put something like the actual String i.e: bean:write name=act/.



 Does anyone know how I can do this. I have tried html:options and
 optionscollections but could not get them to work.



 If the suggestion is to go with nested tags please provide an example as I
 could not get far with this either.



 Secondly, If I submit the form but have modified two rows from the drop
 down
 when I get to the action class how can I know which rows I have modified.



 Thanks in advance







--
Vinit Sharma


RE: html:option on a nested collection

2006-03-23 Thread Shoukat, Faisal
When I do the below in the form it submits
{exampleFormBean.apps.actions.act}

As the value.  I have a getter defined for apps in the formbean and in apps
there is a getter for actions.  

There is no getter for act as this is deifined in the iterate tag

Still stuck!!

-Original Message-
From: Vinit Sharma [mailto:[EMAIL PROTECTED] 
Sent: 23 March 2006 15:01
To: Struts Users Mailing List
Subject: Re: html:option on a nested collection

You can use EL extention of html tag and use something like this:

html:option value=${exampleFormBean.apps.actions.act}bean:write
name=act//html:option

Assuming getters are defined for all properties.

Regds,


On 3/23/06, Shoukat, Faisal [EMAIL PROTECTED] wrote:

 Hi Guys,



 I have a formBean which has a collection of objects within it called Apps.
 Each App object has several fields with one of these fields being a
 collection or list of Strings.



 ExampleFormBean properties are



 String Name

 String Class

 String Student

 List apps



 Each app object looks like this

 String first

 String second

 List actions.  --- This is a collection of Strings



 I am trying to display the actions of the app object in a drop down list.
 But am having a few problems with the option tag.



 So far I have this:

 logic:iterate name=exampleformbean property=apps id=app



 html:select property=action 

logic:iterate id=act name=app property=actions
 indexId=index

  html:option value=1bean:write
 name=act//html:option



 /logic:iterate

  /html:select



 This code displays the drop down with the correct string values showing.
 However where I have put one above as the option value I actually want to
 put something like the actual String i.e: bean:write name=act/.



 Does anyone know how I can do this. I have tried html:options and
 optionscollections but could not get them to work.



 If the suggestion is to go with nested tags please provide an example as I
 could not get far with this either.



 Secondly, If I submit the form but have modified two rows from the drop
 down
 when I get to the action class how can I know which rows I have modified.



 Thanks in advance







--
Vinit Sharma


 
The Northgate IS Content Screening and Inspection system has scanned this 
message for malicious and inappropriate content and none was found. Please
take care 
when opening attachments even when these are expected and from known and
trusted 
sources. 



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



Re: html:option on a nested collection

2006-03-23 Thread Vinit Sharma
Try using:
html:option value=${exampleFormBean.apps.actions[3]}bean:write
name=act//html:option

If act is the third element in the list apps.


On 3/23/06, Shoukat, Faisal [EMAIL PROTECTED] wrote:

 When I do the below in the form it submits
 {exampleFormBean.apps.actions.act}

 As the value.  I have a getter defined for apps in the formbean and in
 apps
 there is a getter for actions.

 There is no getter for act as this is deifined in the iterate tag

 Still stuck!!

 -Original Message-
 From: Vinit Sharma [mailto:[EMAIL PROTECTED]
 Sent: 23 March 2006 15:01
 To: Struts Users Mailing List
 Subject: Re: html:option on a nested collection

 You can use EL extention of html tag and use something like this:

 html:option value=${exampleFormBean.apps.actions.act}bean:write
 name=act//html:option

 Assuming getters are defined for all properties.

 Regds,


 On 3/23/06, Shoukat, Faisal [EMAIL PROTECTED] wrote:
 
  Hi Guys,
 
 
 
  I have a formBean which has a collection of objects within it called
 Apps.
  Each App object has several fields with one of these fields being a
  collection or list of Strings.
 
 
 
  ExampleFormBean properties are
 
 
 
  String Name
 
  String Class
 
  String Student
 
  List apps
 
 
 
  Each app object looks like this
 
  String first
 
  String second
 
  List actions.  --- This is a collection of Strings
 
 
 
  I am trying to display the actions of the app object in a drop down
 list.
  But am having a few problems with the option tag.
 
 
 
  So far I have this:
 
  logic:iterate name=exampleformbean property=apps id=app
 
 
 
  html:select property=action 
 
 logic:iterate id=act name=app property=actions
  indexId=index
 
   html:option value=1bean:write
  name=act//html:option
 
 
 
  /logic:iterate
 
   /html:select
 
 
 
  This code displays the drop down with the correct string values showing.
  However where I have put one above as the option value I actually want
 to
  put something like the actual String i.e: bean:write name=act/.
 
 
 
  Does anyone know how I can do this. I have tried html:options and
  optionscollections but could not get them to work.
 
 
 
  If the suggestion is to go with nested tags please provide an example as
 I
  could not get far with this either.
 
 
 
  Secondly, If I submit the form but have modified two rows from the drop
  down
  when I get to the action class how can I know which rows I have
 modified.
 
 
 
  Thanks in advance
 
 
 
 
 


 --
 Vinit Sharma


 
 
 The Northgate IS Content Screening and Inspection system has scanned this
 message for malicious and inappropriate content and none was found. Please
 take care
 when opening attachments even when these are expected and from known and
 trusted
 sources.

 
 

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




--
Vinit Sharma


RE: html:option on a nested collection

2006-03-23 Thread Shoukat, Faisal
I don't see how the order of elements would matter because apps is a
collection within the formBean.  A get on this returns the actions
collection.  The action collection is just a list of Strings.  

The act variable you are speaking about is just something I have assigned as
an id in my logic iterate tag  : logic:iterate id=act name=app
property=actions

I am sorry if I misinterpreted what you mean??

-Original Message-
From: Vinit Sharma [mailto:[EMAIL PROTECTED] 
Sent: 23 March 2006 15:35
To: Struts Users Mailing List
Subject: Re: html:option on a nested collection

Try using:
html:option value=${exampleFormBean.apps.actions[3]}bean:write
name=act//html:option

If act is the third element in the list apps.


On 3/23/06, Shoukat, Faisal [EMAIL PROTECTED] wrote:

 When I do the below in the form it submits
 {exampleFormBean.apps.actions.act}

 As the value.  I have a getter defined for apps in the formbean and in
 apps
 there is a getter for actions.

 There is no getter for act as this is deifined in the iterate tag

 Still stuck!!

 -Original Message-
 From: Vinit Sharma [mailto:[EMAIL PROTECTED]
 Sent: 23 March 2006 15:01
 To: Struts Users Mailing List
 Subject: Re: html:option on a nested collection

 You can use EL extention of html tag and use something like this:

 html:option value=${exampleFormBean.apps.actions.act}bean:write
 name=act//html:option

 Assuming getters are defined for all properties.

 Regds,


 On 3/23/06, Shoukat, Faisal [EMAIL PROTECTED] wrote:
 
  Hi Guys,
 
 
 
  I have a formBean which has a collection of objects within it called
 Apps.
  Each App object has several fields with one of these fields being a
  collection or list of Strings.
 
 
 
  ExampleFormBean properties are
 
 
 
  String Name
 
  String Class
 
  String Student
 
  List apps
 
 
 
  Each app object looks like this
 
  String first
 
  String second
 
  List actions.  --- This is a collection of Strings
 
 
 
  I am trying to display the actions of the app object in a drop down
 list.
  But am having a few problems with the option tag.
 
 
 
  So far I have this:
 
  logic:iterate name=exampleformbean property=apps id=app
 
 
 
  html:select property=action 
 
 logic:iterate id=act name=app property=actions
  indexId=index
 
   html:option value=1bean:write
  name=act//html:option
 
 
 
  /logic:iterate
 
   /html:select
 
 
 
  This code displays the drop down with the correct string values showing.
  However where I have put one above as the option value I actually want
 to
  put something like the actual String i.e: bean:write name=act/.
 
 
 
  Does anyone know how I can do this. I have tried html:options and
  optionscollections but could not get them to work.
 
 
 
  If the suggestion is to go with nested tags please provide an example as
 I
  could not get far with this either.
 
 
 
  Secondly, If I submit the form but have modified two rows from the drop
  down
  when I get to the action class how can I know which rows I have
 modified.
 
 
 
  Thanks in advance
 
 
 
 
 


 --
 Vinit Sharma




 
 The Northgate IS Content Screening and Inspection system has scanned this
 message for malicious and inappropriate content and none was found. Please
 take care
 when opening attachments even when these are expected and from known and
 trusted
 sources.



 

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




--
Vinit Sharma


 
The Northgate IS Content Screening and Inspection system has scanned this 
message for malicious and inappropriate content and none was found. Please
take care 
when opening attachments even when these are expected and from known and
trusted 
sources. 



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



RE: html:option on a nested collection

2006-03-23 Thread Shoukat, Faisal
I have this working using the following code:

tdhtml:select property=action 
logic:iterate id=act name=app property=actions indexId=index
 %
   String literal =(String) act;

   %
 html:option value=%=literal%bean:write name=act//html:option

 /logic:iterate
/html:select

But as you can see I am using java in the jsp: can anyone advise of some
other way of doing this

-Original Message-
From: Vinit Sharma [mailto:[EMAIL PROTECTED] 
Sent: 23 March 2006 15:35
To: Struts Users Mailing List
Subject: Re: html:option on a nested collection

Try using:
html:option value=${exampleFormBean.apps.actions[3]}bean:write
name=act//html:option

If act is the third element in the list apps.


On 3/23/06, Shoukat, Faisal [EMAIL PROTECTED] wrote:

 When I do the below in the form it submits
 {exampleFormBean.apps.actions.act}

 As the value.  I have a getter defined for apps in the formbean and in
 apps
 there is a getter for actions.

 There is no getter for act as this is deifined in the iterate tag

 Still stuck!!

 -Original Message-
 From: Vinit Sharma [mailto:[EMAIL PROTECTED]
 Sent: 23 March 2006 15:01
 To: Struts Users Mailing List
 Subject: Re: html:option on a nested collection

 You can use EL extention of html tag and use something like this:

 html:option value=${exampleFormBean.apps.actions.act}bean:write
 name=act//html:option

 Assuming getters are defined for all properties.

 Regds,


 On 3/23/06, Shoukat, Faisal [EMAIL PROTECTED] wrote:
 
  Hi Guys,
 
 
 
  I have a formBean which has a collection of objects within it called
 Apps.
  Each App object has several fields with one of these fields being a
  collection or list of Strings.
 
 
 
  ExampleFormBean properties are
 
 
 
  String Name
 
  String Class
 
  String Student
 
  List apps
 
 
 
  Each app object looks like this
 
  String first
 
  String second
 
  List actions.  --- This is a collection of Strings
 
 
 
  I am trying to display the actions of the app object in a drop down
 list.
  But am having a few problems with the option tag.
 
 
 
  So far I have this:
 
  logic:iterate name=exampleformbean property=apps id=app
 
 
 
  html:select property=action 
 
 logic:iterate id=act name=app property=actions
  indexId=index
 
   html:option value=1bean:write
  name=act//html:option
 
 
 
  /logic:iterate
 
   /html:select
 
 
 
  This code displays the drop down with the correct string values showing.
  However where I have put one above as the option value I actually want
 to
  put something like the actual String i.e: bean:write name=act/.
 
 
 
  Does anyone know how I can do this. I have tried html:options and
  optionscollections but could not get them to work.
 
 
 
  If the suggestion is to go with nested tags please provide an example as
 I
  could not get far with this either.
 
 
 
  Secondly, If I submit the form but have modified two rows from the drop
  down
  when I get to the action class how can I know which rows I have
 modified.
 
 
 
  Thanks in advance
 
 
 
 
 


 --
 Vinit Sharma




 
 The Northgate IS Content Screening and Inspection system has scanned this
 message for malicious and inappropriate content and none was found. Please
 take care
 when opening attachments even when these are expected and from known and
 trusted
 sources.



 

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




--
Vinit Sharma


 
The Northgate IS Content Screening and Inspection system has scanned this 
message for malicious and inappropriate content and none was found. Please
take care 
when opening attachments even when these are expected and from known and
trusted 
sources. 



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



RE: html:option on a nested collection

2006-03-23 Thread Wang, Hansen
Do something like this:

logic:iterate name=exampleformbean property=apps id=app
html:select name=app property=action 
html:optionCollections propety=actions /
/html:select
/logic:iterate

You also need to add action property to your app class. This is to
hold the input specified by html:select

Hansen 

-Original Message-
From: Shoukat, Faisal [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 23, 2006 10:37 AM
To: Struts Users Mailing List
Subject: RE: html:option on a nested collection

I have this working using the following code:

tdhtml:select property=action 
logic:iterate id=act name=app property=actions indexId=index
%
   String literal =(String) act;

   %
 html:option value=%=literal%bean:write
name=act//html:option

 /logic:iterate
/html:select

But as you can see I am using java in the jsp: can anyone advise of some
other way of doing this

-Original Message-
From: Vinit Sharma [mailto:[EMAIL PROTECTED]
Sent: 23 March 2006 15:35
To: Struts Users Mailing List
Subject: Re: html:option on a nested collection

Try using:
html:option value=${exampleFormBean.apps.actions[3]}bean:write
name=act//html:option

If act is the third element in the list apps.


On 3/23/06, Shoukat, Faisal [EMAIL PROTECTED] wrote:

 When I do the below in the form it submits 
 {exampleFormBean.apps.actions.act}

 As the value.  I have a getter defined for apps in the formbean and in

 apps there is a getter for actions.

 There is no getter for act as this is deifined in the iterate tag

 Still stuck!!

 -Original Message-
 From: Vinit Sharma [mailto:[EMAIL PROTECTED]
 Sent: 23 March 2006 15:01
 To: Struts Users Mailing List
 Subject: Re: html:option on a nested collection

 You can use EL extention of html tag and use something like this:

 html:option value=${exampleFormBean.apps.actions.act}bean:write
 name=act//html:option

 Assuming getters are defined for all properties.

 Regds,


 On 3/23/06, Shoukat, Faisal [EMAIL PROTECTED] wrote:
 
  Hi Guys,
 
 
 
  I have a formBean which has a collection of objects within it called
 Apps.
  Each App object has several fields with one of these fields being a 
  collection or list of Strings.
 
 
 
  ExampleFormBean properties are
 
 
 
  String Name
 
  String Class
 
  String Student
 
  List apps
 
 
 
  Each app object looks like this
 
  String first
 
  String second
 
  List actions.  --- This is a collection of Strings
 
 
 
  I am trying to display the actions of the app object in a drop down
 list.
  But am having a few problems with the option tag.
 
 
 
  So far I have this:
 
  logic:iterate name=exampleformbean property=apps id=app
 
 
 
  html:select property=action 
 
 logic:iterate id=act name=app property=actions
  indexId=index
 
   html:option value=1bean:write 
  name=act//html:option
 
 
 
  /logic:iterate
 
   /html:select
 
 
 
  This code displays the drop down with the correct string values
showing.
  However where I have put one above as the option value I actually 
  want
 to
  put something like the actual String i.e: bean:write name=act/.
 
 
 
  Does anyone know how I can do this. I have tried html:options and 
  optionscollections but could not get them to work.
 
 
 
  If the suggestion is to go with nested tags please provide an 
  example as
 I
  could not get far with this either.
 
 
 
  Secondly, If I submit the form but have modified two rows from the 
  drop down when I get to the action class how can I know which rows I

  have
 modified.
 
 
 
  Thanks in advance
 
 
 
 
 


 --
 Vinit Sharma





 
 The Northgate IS Content Screening and Inspection system has scanned 
 this message for malicious and inappropriate content and none was 
 found. Please take care when opening attachments even when these are 
 expected and from known and trusted sources.




 

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




--
Vinit Sharma




The Northgate IS Content Screening and Inspection system has scanned
this message for malicious and inappropriate content and none was found.
Please take care when opening attachments even when these are expected
and from known and trusted sources. 




-
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: using html:option

2006-03-06 Thread Wendy Smoak
On 3/5/06, Rizwan Ahamad [EMAIL PROTECTED] wrote:

 I am lost how to set the value inside
 html:option value=${row.VPAN8}
 as this always returns the whole thing inside the
 quotes like below

 option value=${row.VPAN8} 12495/option

 Servlet spec : 2.3
 Container : IBM WebSphere Application Server test environment

With Servlet 2.3, (and JSTL 1.0) you can use the Struts-EL extension
to enable expressions in Struts tag attributes.  As you've discovered,
the normal Struts tags don't understand expressions.

 * http://struts.apache.org/struts-el/struts-el.html

Struts-EL can be found in the 'contrib' directory of a Struts 1.2.x
binary distribution.

--
Wendy

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



using html:option

2006-03-05 Thread Rizwan Ahamad
Hi

 

I am having problems setting html:option dynamically along with sql
tags

 

Here is the source ,

After setting the databases and queries

 

THvendor/TH

TDhtml:select property=vendor

  c:forEach   var=row  items=${query1.rows} 

html:option value==${row.VPAN8} c:out
value=${row.VPAN8}//html:option

  /c:forEach

/html:select/TD

/TR

 

I am lost how to set the value inside html:option value=${row.VPAN8}
as this always returns the whole thing inside the quotes like below

 

option value=${row.VPAN8} 12495/option
 
Any help would be appreciated,
 
Thanks
Rizwan
http://www.rizwan.in http://www.rizwan.in/ 
 
 

 

 


---

This e-mail 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 e-mail in error please notify the Administrator. Please 
note that any views or opinions presented in this e-mail are solely those of 
the author and do not necessarily represent those of the company. Finally, the 
recipient should check this e-mail and any attachment for the presence of 
viruses. The company accepts no liability for any damage caused by any virus 
transmitted by this e-mail.

Jarir Bookstore ..not just a bookstore

Visit us: www.jarirbookstore.com
5/3/2006



Re: using html:option

2006-03-05 Thread Wendy Smoak
On 3/5/06, Rizwan Ahamad [EMAIL PROTECTED] wrote:

 html:option value==${row.VPAN8} c:out
 value=${row.VPAN8}//html:option
   /c:forEach

 I am lost how to set the value inside html:option value=${row.VPAN8}
 as this always returns the whole thing inside the quotes like below

 option value=${row.VPAN8} 12495/option

 Any help would be appreciated,

What Servlet spec version are you using?  (Alternately, what version
of what Servlet container?)

--
Wendy

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



RE: using html:option

2006-03-05 Thread Rizwan Ahamad
Servlet spec : 2.3
Container : IBM WebSphere Application Server test environment

-Original Message-
From: Wendy Smoak [mailto:[EMAIL PROTECTED] 
Sent: Sunday, March 05, 2006 10:55 PM
To: Struts Users Mailing List
Subject: Re: using html:option

On 3/5/06, Rizwan Ahamad [EMAIL PROTECTED] wrote:

 html:option value==${row.VPAN8} c:out
 value=${row.VPAN8}//html:option
   /c:forEach

 I am lost how to set the value inside html:option
value=${row.VPAN8}
 as this always returns the whole thing inside the quotes like below

 option value=${row.VPAN8} 12495/option

 Any help would be appreciated,

What Servlet spec version are you using?  (Alternately, what version
of what Servlet container?)

--
Wendy

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


---

This e-mail 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 e-mail in error please notify the Administrator. Please 
note that any views or opinions presented in this e-mail are solely those of 
the author and do not necessarily represent those of the company. Finally, the 
recipient should check this e-mail and any attachment for the presence of 
viruses. The company accepts no liability for any damage caused by any virus 
transmitted by this e-mail.

Jarir Bookstore ..not just a bookstore

Visit us: www.jarirbookstore.com
6/3/2006


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



How to display combination of two columns in label of html:option

2006-03-01 Thread digant . k . joshi
In my jsp I am using users ArrayList which is collection of User bean on 
server side.
My drop down list works fine as under when I use only one display userNameShort 
in my example.


html:select property=userIdNew
option value=-1Choose User.../option
html:options collection=users property=userId 
labelProperty=userNameShort /\
/html:select

Now I want to combine two attributes concatenation in label for e.g. 
userId+(+userNameShort+)

how would I do that ?

Thanks..





This communication is for informational purposes only. It is not intended
as an offer or solicitation for the purchase or sale of any financial
instrument or as an official confirmation of any transaction. All market prices,
data and other information are not warranted as to completeness or accuracy and
are subject to change without notice. Any comments or statements made herein 
do not necessarily reflect those of JPMorgan Chase  Co., its subsidiaries 
and affiliates.

Re: How to display combination of two columns in label of html:option

2006-03-01 Thread Rick Reumann
I don't use the html:options tag but standard jstl with html:option

html:select property=userIdNew
option value=-1Choose User.../option
c:forEach items=${users} var=user
html:option value=${user.userId}
c:out value=${user.userId}/(c:out value=${user.userNameShort
}/)
/html:option
/c:forEach
/html:select


On 3/1/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 In my jsp I am using users ArrayList which is collection of User bean on
 server side.
 My drop down list works fine as under when I use only one display
 userNameShort in my example.


html:select property=userIdNew
option value=-1Choose User.../option
html:options collection=users property=userId
 labelProperty=userNameShort /\
/html:select

 Now I want to combine two attributes concatenation in label for e.g.
 userId+(+userNameShort+)

 how would I do that ?

 Thanks..





 This communication is for informational purposes only. It is not intended
 as an offer or solicitation for the purchase or sale of any financial
 instrument or as an official confirmation of any transaction. All market
 prices,
 data and other information are not warranted as to completeness or
 accuracy and
 are subject to change without notice. Any comments or statements made
 herein
 do not necessarily reflect those of JPMorgan Chase  Co., its subsidiaries
 and affiliates.




--
Rick


Re: How to display combination of two columns in label of html:option

2006-03-01 Thread Michael Jouravlev
On 3/1/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 In my jsp I am using users ArrayList which is collection of User bean on
 server side.
 My drop down list works fine as under when I use only one display
 userNameShort in my example.

 html:select property=userIdNew
   option value=-1Choose User.../option
   html:options collection=users
 property=userId
 labelProperty=userNameShort /
 /html:select

 Now I want to combine two attributes concatenation in label for e.g.
 userId+(+userNameShort+)

 how would I do that ?

Create a read-only property in the User bean that returns
userId+(+userNameShort+). For example:

public class User ... {
  ...
  public String getUserIdAndName() {
return userId+(+userNameShort+);
  }
}

html:select property=userIdNew
  option value=-1Choose User.../option
  html:options collection=users
property=userId
labelProperty=userIdAndName /
/html:select

Michael.

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



Re: How to display combination of two columns in label of html:option

2006-03-01 Thread digant . k . joshi
Thanks Michael :
I can do what you suggested of creating read-only attribute in User 
class.
But all over I am using BeanUtils to copy back and forth Users 
properties to UserForm properties.
Is there a cleaner way so even after my adding/deleting properties 
in my User class, I don't need to make  corresponding change in UserForm 
class ?

Thanks again for looking into this.
Digant





Michael Jouravlev [EMAIL PROTECTED]
03/01/2006 04:44 PM
Please respond to Struts Users Mailing List

 
To: Struts Users Mailing List user@struts.apache.org
cc: 
Subject:Re: How to display combination of two columns in label 
of html:option


On 3/1/06, [EMAIL PROTECTED] [EMAIL PROTECTED] 
wrote:
 In my jsp I am using users ArrayList which is collection of User bean on
 server side.
 My drop down list works fine as under when I use only one display
 userNameShort in my example.

 html:select property=userIdNew
   option value=-1Choose User.../option
   html:options collection=users
 property=userId
 labelProperty=userNameShort /
 /html:select

 Now I want to combine two attributes concatenation in label for e.g.
 userId+(+userNameShort+)

 how would I do that ?

Create a read-only property in the User bean that returns
userId+(+userNameShort+). For example:

public class User ... {
  ...
  public String getUserIdAndName() {
return userId+(+userNameShort+);
  }
}

html:select property=userIdNew
  option value=-1Choose User.../option
  html:options collection=users
property=userId
labelProperty=userIdAndName /
/html:select

Michael.

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





This communication is for informational purposes only. It is not intended
as an offer or solicitation for the purchase or sale of any financial
instrument or as an official confirmation of any transaction. All market prices,
data and other information are not warranted as to completeness or accuracy and
are subject to change without notice. Any comments or statements made herein 
do not necessarily reflect those of JPMorgan Chase  Co., its subsidiaries 
and affiliates.

Re: How to display combination of two columns in label of html:option

2006-03-01 Thread digant . k . joshi
Rick:
What is benefit of using standard jstl over html:option.
One benefit is to problem like mine.
Any other ?
Digant





Rick Reumann [EMAIL PROTECTED]
03/01/2006 04:32 PM
Please respond to Struts Users Mailing List

 
To: Struts Users Mailing List user@struts.apache.org
cc: 
Subject:Re: How to display combination of two columns in label 
of html:option


I don't use the html:options tag but standard jstl with html:option

html:select property=userIdNew
option value=-1Choose User.../option
c:forEach items=${users} var=user
html:option value=${user.userId}
c:out value=${user.userId}/(c:out value=${user.userNameShort
}/)
/html:option
/c:forEach
/html:select


On 3/1/06, [EMAIL PROTECTED] [EMAIL PROTECTED] 
wrote:

 In my jsp I am using users ArrayList which is collection of User bean on
 server side.
 My drop down list works fine as under when I use only one display
 userNameShort in my example.


html:select property=userIdNew
option value=-1Choose User.../option
html:options collection=users 
property=userId
 labelProperty=userNameShort /\
/html:select

 Now I want to combine two attributes concatenation in label for e.g.
 userId+(+userNameShort+)

 how would I do that ?

 Thanks..





 This communication is for informational purposes only. It is not 
intended
 as an offer or solicitation for the purchase or sale of any financial
 instrument or as an official confirmation of any transaction. All market
 prices,
 data and other information are not warranted as to completeness or
 accuracy and
 are subject to change without notice. Any comments or statements made
 herein
 do not necessarily reflect those of JPMorgan Chase  Co., its 
subsidiaries
 and affiliates.




--
Rick




This communication is for informational purposes only. It is not intended
as an offer or solicitation for the purchase or sale of any financial
instrument or as an official confirmation of any transaction. All market prices,
data and other information are not warranted as to completeness or accuracy and
are subject to change without notice. Any comments or statements made herein 
do not necessarily reflect those of JPMorgan Chase  Co., its subsidiaries 
and affiliates.

html:option, how to print html characters in the label.

2006-02-20 Thread Robert Alexandersson
Hello, i want to output the String nbsp;Level 2 in my optionlists,
but the label attribute of options does not return this but the
transforemed amp;nbsp; mending it prints the text instead, is there any
way around this?


html:options collection=items property=id labelProperty=title /

Regards
Robert A


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



Re: html:option, how to print html characters in the label.

2006-02-20 Thread Nicolas De Loof


If you're looking for a way to indent options in a select box, you 
should use the optgroup HTML tag.


Nico.

Robert Alexandersson a écrit :

Hello, i want to output the String nbsp;Level 2 in my optionlists,
but the label attribute of options does not return this but the
transforemed amp;nbsp; mending it prints the text instead, is there any
way around this?


html:options collection=items property=id labelProperty=title /

Regards
Robert A


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


  


This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


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



RE: html:option, how to print html characters in the label.

2006-02-20 Thread Robert Alexandersson
Yes, but the problem is that I use endless indents from an attribute called 
depth that makes hard to use optgroup (I think so, have not tried it though), 
this is how I use depth.
O1-Depth1
02-Depth2
O3-Depth3
O4-Depth1
And so on.

I think I found a solution using filter=off in the options tag.

/Robert A

-Original Message-
From: Nicolas De Loof [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 20, 2006 11:35 AM
To: Struts Users Mailing List
Subject: Re: html:option, how to print html characters in the label.


If you're looking for a way to indent options in a select box, you 
should use the optgroup HTML tag.

Nico.

Robert Alexandersson a écrit :
 Hello, i want to output the String nbsp;Level 2 in my optionlists,
 but the label attribute of options does not return this but the
 transforemed amp;nbsp; mending it prints the text instead, is there any
 way around this?


 html:options collection=items property=id labelProperty=title /

 Regards
 Robert A


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


   

This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


-
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: Problem whith a arrayList and a html:option

2006-02-08 Thread José María Tristán
Hi,

This is ok. My application now capture data.

Thank you very much.

With best regards.

-Mensaje original-
De: Anjishnu Bandyopadhyay [mailto:[EMAIL PROTECTED]
Enviado el: miércoles, 08 de febrero de 2006 5:34
Para: Struts Users Mailing List
Asunto: RE: Problem whith a arrayList and a html:option



Hi,

 
Try this out: In the formBean, instead of an array list, try putting a
String array.

 
ActionForm: 
private String[] listEdad = null;

public String[] getListEdad () {

return listEdad;

}

public void setListEdad (String[] listEdad) {

this.listEdad = listEdad;

}

 
 
With best regards,

Anjishnu.

 
 
 
-Original Message-
From: José María Tristán [mailto:[EMAIL PROTECTED] Sent: Tuesday,
February 07, 2006 8:13 PM
To: user@struts.apache.org
Subject: Problem whith a arrayList and a html:option

 
Hello, Sorry by the text but I speak a little english. I have a problem with

a struts application.

I want capture data to a multiple select. I use a Arraylist into a Bean.

This is a part of my code of the actionform:

 
private List listEdad = new ArrayList();

 
public List getListEdad() {

return (this.listEdad);

}

 
public void setListEdad(ArrayList listEdad) {

this.listEdad = listEdad;

}

 
And this is part of code of jsp:

 
%

List arrayCodigo = new
ArrayList();

List arrayDescripcion = new
ArrayList();

 
arrayCodigo.add(100);

arrayDescripcion.add(SEDA
Solubles);

arrayCodigo.add(101);

 
arrayDescripcion.add(Liofilizados);

arrayCodigo.add(102);

 
arrayDescripcion.add(Cogeneracion);

 
 
 
pageContext.setAttribute(arrayCodigo, arrayCodigo);

 
pageContext.setAttribute(arrayDescripcion, arrayDescripcion);

%

 
html:form action=submit.do

ListEdad:

html:select property=listEdad multiple=true

html:options name=arrayCodigo

labelName=arrayDescripcion/html:options

/html:select

 
 
html:submit/html:submit

 
Then, I select, per example, Seda Solubles and Cogeneracion. The

application never go to setListEdad and never

save the values into listEdad.

Why?

 
 
Thank you.

 
 
-

To unsubscribe, e-mail: [EMAIL PROTECTED]

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

 


 CAUTION - Disclaimer *
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely
for the use of the addressee(s). If you are not the intended recipient,
please notify the sender by e-mail and delete the original message. Further,
you are not to copy, disclose, or distribute this e-mail or its contents to
any other person and any such actions are unlawful. This e-mail may contain
viruses. Infosys has taken every reasonable precaution to minimize this
risk, but is not liable for any damage you may sustain as a result of any
virus in this e-mail. You should carry out your own virus checks before
opening the e-mail or attachment. Infosys reserves the right to monitor and
review the content of all messages sent to or from this e-mail address.
Messages sent to or from this e-mail address may be stored on the Infosys
e-mail system.
***INFOSYS End of Disclaimer INFOSYS***

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

Problem whith a arrayList and a html:option

2006-02-07 Thread José María Tristán
Hello, Sorry by the text but I speak a little english. I have a problem with
a struts application.
I want capture data to a multiple select. I use a Arraylist into a Bean.
This is a part of my code of the actionform:

private List listEdad = new ArrayList();

public List getListEdad() {
return (this.listEdad);
}

public void setListEdad(ArrayList listEdad) {
this.listEdad = listEdad;
}

And this is part of code of jsp:

%
List arrayCodigo = new ArrayList();
List arrayDescripcion = new ArrayList();

arrayCodigo.add(100);
arrayDescripcion.add(SEDA Solubles);
arrayCodigo.add(101);
arrayDescripcion.add(Liofilizados);
arrayCodigo.add(102);
arrayDescripcion.add(Cogeneracion);


pageContext.setAttribute(arrayCodigo, 
arrayCodigo);
pageContext.setAttribute(arrayDescripcion, 
arrayDescripcion);
%

html:form action=submit.do
ListEdad:
html:select property=listEdad multiple=true
html:options name=arrayCodigo
labelName=arrayDescripcion/html:options
/html:select


html:submit/html:submit

Then, I select, per example, Seda Solubles and Cogeneracion. The
application never go to setListEdad and never
save the values into listEdad.
Why?


Thank you.


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



RE: Problem whith a arrayList and a html:option

2006-02-07 Thread Anjishnu Bandyopadhyay

Hi,



Try this out: In the formBean, instead of an array list, try putting a String 
array.



ActionForm:

private String[] listEdad = null;

public String[] getListEdad () {

return listEdad;

}

public void setListEdad (String[] listEdad) {

this.listEdad = listEdad;

}





With best regards,

Anjishnu.







-Original Message-
From: José María Tristán [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 07, 2006 8:13 PM
To: user@struts.apache.org
Subject: Problem whith a arrayList and a html:option



Hello, Sorry by the text but I speak a little english. I have a problem with

a struts application.

I want capture data to a multiple select. I use a Arraylist into a Bean.

This is a part of my code of the actionform:



private List listEdad = new ArrayList();



public List getListEdad() {

return (this.listEdad);

}



public void setListEdad(ArrayList listEdad) {

this.listEdad = listEdad;

}



And this is part of code of jsp:



%

List arrayCodigo = new 
ArrayList();

List arrayDescripcion = new 
ArrayList();



arrayCodigo.add(100);

arrayDescripcion.add(SEDA 
Solubles);

arrayCodigo.add(101);


arrayDescripcion.add(Liofilizados);

arrayCodigo.add(102);


arrayDescripcion.add(Cogeneracion);






pageContext.setAttribute(arrayCodigo, arrayCodigo);


pageContext.setAttribute(arrayDescripcion, arrayDescripcion);

%



html:form action=submit.do

ListEdad:

html:select property=listEdad multiple=true

html:options name=arrayCodigo

labelName=arrayDescripcion/html:options

/html:select





html:submit/html:submit



Then, I select, per example, Seda Solubles and Cogeneracion. The

application never go to setListEdad and never

save the values into listEdad.

Why?





Thank you.





-

To unsubscribe, e-mail: [EMAIL PROTECTED]

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





 CAUTION - Disclaimer *
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
for the use of the addressee(s). If you are not the intended recipient, please 
notify the sender by e-mail and delete the original message. Further, you are 
not to copy, disclose, or distribute this e-mail or its contents to any other 
person and any such actions are unlawful. This e-mail may contain viruses. 
Infosys has taken every reasonable precaution to minimize this risk, but is not 
liable for any damage you may sustain as a result of any virus in this e-mail. 
You should carry out your own virus checks before opening the e-mail or 
attachment. Infosys reserves the right to monitor and review the content of all 
messages sent to or from this e-mail address. Messages sent to or from this 
e-mail address may be stored on the Infosys e-mail system.
***INFOSYS End of Disclaimer INFOSYS***

html:select And html:option Tags

2006-01-12 Thread Asad Habib
Hello. I am using the select and options tags in one of my JSP pages. My 
first option has the value attribute set to an empty string (i.e. 
value='') and the second option has the value attribute equal to 0 (i.e. 
value=0). For some reason, when the page is accessed the first time by a 
user, the default selected value is the second option instead of the first 
option. Does anyone why this is the case? Thanks.


- Asad

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



Re: html:select And html:option Tags

2006-01-12 Thread Wendy Smoak
On 1/12/06, Asad Habib [EMAIL PROTECTED] wrote:

 Hello. I am using the select and options tags in one of my JSP pages. My
 first option has the value attribute set to an empty string (i.e.
 value='') and the second option has the value attribute equal to 0 (i.e.
 value=0). For some reason, when the page is accessed the first time by a
 user, the default selected value is the second option instead of the first
 option. Does anyone why this is the case? Thanks.

The framework will pre-select the option that matches the value of the
associated form property.  Make sure that the form property is set to
 if you want that one to be selected.

If you need more help, post the html:select tag and the relevant
parts of the form and action classes.

--
Wendy

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



using html:option tag

2005-09-27 Thread faisal.shoukat
Hi All,
 
I am using the html option tag embedded within the html select tag to
select a value from a drop down list as follows:
 
html:select property=title

html:option value=MrMr/html:option
html:option value=MrsMrs/html:option

/html:select
 
This works fine and I can save the correct value to the database.  The
question I have is how do I display the same option tag when updating
the user and the details are returned from a database.  So in plain
English after the user has saved the client to the db he then wants to
update the record.  A search is done but how do I display on the JSP
page the selected option with the option of seleting something else from
the drop down list.
 
Thanks in advance


Re: using html:option tag

2005-09-27 Thread Wendy Smoak

From: [EMAIL PROTECTED]


This works fine and I can save the correct value to the database.  The
question I have is how do I display the same option tag when updating
the user and the details are returned from a database.


The same JSP snippet you posted should work in both the 'add' and 'edit' 
forms.


For select list contents that are the same for every user, I use a 
ServletContextListener to place collections in application scope, and then 
use html:options or html:optionsCollection.  This avoids hard-coding the 
list of options.


--
Wendy Smoak 



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



Re: using html:option tag

2005-09-27 Thread glenn . deschenes
The html:select tag has an attribute value.
http://struts.apache.org/userGuide/struts-html.html#select
The value to compare with for marking an option selected. [RT Expr]

HTH,
Glenn



[EMAIL PROTECTED] 
27/09/2005 12:08 PM
Please respond to
Struts Users Mailing List user@struts.apache.org


To
user@struts.apache.org
cc

Subject
using html:option tag






Hi All,
 
I am using the html option tag embedded within the html select tag to
select a value from a drop down list as follows:
 
html:select property=title
 
html:option value=MrMr/html:option
html:option value=MrsMrs/html:option
 
/html:select
 
This works fine and I can save the correct value to the database.  The
question I have is how do I display the same option tag when updating
the user and the details are returned from a database.  So in plain
English after the user has saved the client to the db he then wants to
update the record.  A search is done but how do I display on the JSP
page the selected option with the option of seleting something else from
the drop down list.
 
Thanks in advance



Problem with html:option default selected

2005-09-14 Thread Kade Jeevan Kumar
Hi!
 
What is the corresponding code in Struts for the given html
 
select
option value=2Two/option
option value=1 selected=selectedone/option
/select
 
-Thanks in Advance
Jeevan



-
Yahoo! for Good
 Click here to donate to the Hurricane Katrina relief effort. 

Re: Problem with html:option default selected

2005-09-14 Thread Laurie Harper

http://svn.apache.org/builds/struts/maven/trunk/site-test/struts-taglib/tlddoc/html/tld-summary.html

See, in particular, the select, option, options, and optionsCollection tags.

L.

Kade Jeevan Kumar wrote:

Hi!
 
What is the corresponding code in Struts for the given html
 
select

option value=2Two/option
option value=1 selected=selectedone/option
/select
 
-Thanks in Advance

Jeevan



-
Yahoo! for Good
 Click here to donate to the Hurricane Katrina relief effort. 



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



reg. html:option tag

2005-09-08 Thread peru cheppanu

How would I see that an element is pre-selected or highlighted just the 
way it happens with selected keyword in regular option tag..
 
What I am trying to do here is populate a collection of objects on 
multi-select box, some of them pre-populated. I tried 
html:optionsCollection.. but I am trying to see if there is any way to get 
around this 
without having to use iterate tag and a regular option.
 
Thanks a bunch..
Asritha



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: reg. html:option tag

2005-09-08 Thread peru cheppanu
Let me rephrase my question here..
 
html:select has value attribute that is to be populated if one of the 
options is to be pre-selected.
 
What if I have to pre select multiple options.. may be using optionCollections 
etc. something like html:select having a value[] so that I can put in all 
values that are to be preselected. Do u know of a way to implement this?
 
Thanks


peru cheppanu [EMAIL PROTECTED] wrote:

How would I see that an element is pre-selected or highlighted just the 
way it happens with selected keyword in regular tag..

What I am trying to do here is populate a collection of objects on 
multi-select box, some of them pre-populated. I tried 
without having to use iterate tag and a regular option.

Thanks a bunch..
Asritha



__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
 Click here to donate to the Hurricane Katrina relief effort.

Re: reg. html:option tag -- solved

2005-09-08 Thread peru cheppanu

 

Here is the solution for the issue I raised. Yeah, it is a dumb question.

html:select name=someBean property=strArrValuesToBePreSelected

html:optionCollections name=sameBean property=valuesToBeDisplayed/

/html:select

If it is only one preselected vlaue then use value in html:select.

The catch here that I understood later is property in html:select should be 
array of strings if strings are displayed in the option list. 

 


-
 Click here to donate to the Hurricane Katrina relief effort.

Pre-population of html:select tag using multiple html:option tags

2005-08-18 Thread Chatzinikos, Fotis, VF-GR Consultant
Hello Everybody,

 

I am trying to pre-populate a jsp page form via the reset function of an
ActionForm. All values appear correctly in the form except the select /
option combinations. Could somebody have a look at the following and
provide some pointers? (Have not used html:select before...)

 

The ActionForm:

 

public final class ProccessPropertiesFormAction extends ActionForm

{

private String listlength = 20 ;

private String usesig = 0 ;

private String signature =  ;

private String fullname =  ;

private String replyto =  ;

private String maxwidth = 72 ;

private String maxheight = 20 ;

private String defsort = date ;  --- used to create the select

 

...

 

public void reset(ActionMapping mapping, HttpServletRequest request)

{

User user = (User) request.getSession().getAttribute(user) ;

 

listlength = Integer.toString(user.getPagesize()) ;

 

if (user.getUseSig())

usesig = 1 ;

else

usesig = 0 ;

 

signature = user.getSignature();

 

fullname = user.getRealname() ;

replyto = user.getReplyto() ;

maxwidth = user.getMaxwidth() ;

maxheight = user.getMaxheight();

defsort = user.getSortby();  // -- (this is date, subject,
etc)

 

and the JSP Page:

 

...

html:form action=/ProcessProperties

  tr class=row1

td align=leftbean:message key=properties.replyto//td

td align=righthtml:text size=30 property=replyto//td

  /tr

 

  tr class=row2

  td align=left

bean:message key=properties.defsort/

  /td

  td colspan=2 align =right

html:select property=defsort

option value=subjectbean:message
key=properties.subject//option

option value=datebean:message
key=properties.date//option

option value=senderbean:message
key=properties.sender//option

option value=sizebean:message
key=properties.size//option

option value=newbean:message
key=properties.new//option

option value=repforbean:message
key=properties.repfor//option

/html:select

  /td

  /tr

...

 

Thanks in advance,

Fotis



html:option

2005-06-14 Thread amitava . basak

I want 
html:option selected=true xxx /html:option

Is there a way out to select a default value at design time?  (I hate 
javascript!!... lol. )


Amitava Basak
ASE
Tata Consultancy Services Limited
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com

Notice: The information contained in this e-mail message and/or attachments to 
it may contain confidential or privileged information.   If you are not the 
intended recipient, any dissemination, use, review, distribution, printing or 
copying of the information contained in this e-mail message and/or attachments 
to it are strictly prohibited.   If you have received this communication in 
error, please notify us by reply e-mail or telephone and immediately and 
permanently delete the message and any attachments.  Thank you

RE: html:option

2005-06-14 Thread Nitish Kumar

use html:options tag along with the html:select

or

print option XXX 
using logic:iterate

logic:iterate ...
logic:equals ...
option selected=true bean:write ...
/logic:equals
logic:notEquals ...
option  bean:write ...
/logic:notEquals
/logic:iterate


Thanks and Regards,
Nitish Kumar
Tavant Technologies Ltd
Bangalore


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 14, 2005 11:53 AM
To: user@struts.apache.org
Subject: html:option



I want 
html:option selected=true xxx /html:option

Is there a way out to select a default value at design time?  (I hate 
javascript!!... lol. )


Amitava Basak
ASE
Tata Consultancy Services Limited
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com

Notice: The information contained in this e-mail message and/or attachments
to it may contain confidential or privileged information.   If you are not
the intended recipient, any dissemination, use, review, distribution,
printing or copying of the information contained in this e-mail message
and/or attachments to it are strictly prohibited.   If you have received
this communication in error, please notify us by reply e-mail or telephone
and immediately and permanently delete the message and any attachments.
Thank you

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



Re: html:option

2005-06-14 Thread Stéphane Zuckerman

Hello Amitava,

[EMAIL PROTECTED] a écrit :
I want 
html:option selected=true xxx /html:option


Is there a way out to select a default value at design time?  (I hate 
javascript!!... lol. )


You could always prepopulate your form before forwarding to the JSP :

public ActionForward execute(...) {
  form.setMySelect(my value);
  ...

  return mapping.findForward(/toMyJsp);
}

--
Stéphane Zuckerman

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



html:option tag

2005-04-21 Thread IVAN CORVILLO
Hi there,

Is it possible to pre-select a value from a dropdownlist htm:option 
tag?
  
Thanks

Iván Corvillo
Iconic, SL
Molinot 53
Pol.Ind.El Camí Ral
08860 Castelldefels
Tel: 902 195 962 / 93 419 54 45
Fax: 93 636 21 42
[EMAIL PROTECTED]


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



Re: html:option tag

2005-04-21 Thread Erik Weber
Yes, form field values (generated by the Struts tags) are synced with 
corresponding ActionForm field values when the page is rendered. So you 
can override the ActionForm's reset method to specify initial values. 
But typically you only want to do this when you are showing a fresh 
add form, not an update form (which will have values prepopulated from 
database records, presumably), and not when you are showing an add form 
that has failed server-side validation (in this case you want to 
maintain whatever the user had selected).

Erik

IVAN CORVILLO wrote:
Hi there,
Is it possible to pre-select a value from a dropdownlist htm:option 
tag?
 
Thanks

Iván Corvillo
Iconic, SL
Molinot 53
Pol.Ind.El Camí Ral
08860 Castelldefels
Tel: 902 195 962 / 93 419 54 45
Fax: 93 636 21 42
[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:option tag and Hashtable..is it possible

2005-01-11 Thread Ashish Kulkarni
Hi 
Thanx for the reply Brandon, i was able to get it
working after converting the Hashtable to ArrayList
having LabelValueBean like this
Hashtable ht = mapsContextData.getAS400List(oCtx);
Enumeration enu = ht.keys();
 ArrayList data = new ArrayList();
  while(enu.hasMoreElements())
 {
 String key = (String)enu.nextElement();
 String value = (String)ht.get(key);
 logger.debug(key is  + key +  value 
+ value);
 data.add(new LabelValueBean(value, key));
 }
But really hoped to be able to use Hashtable rather
then adding this code

Ashish
--- Brandon Mercer [EMAIL PROTECTED] wrote:

 Ashish Kulkarni wrote:
 
 Hi
 How do i display a drop down box from hashtable
 data
 here is my form definiation
 form-bean dynamic=true name=loginForm

type=org.apache.struts.validator.DynaValidatorForm
 form-property name=as400list
 type=java.util.Hashtable /
 /form-bean
 
 in my html i define
 html:form action=/login focus=userId
 method=post style=margin:0px; 
 // logic to display html:select with html:option
 tag
 /html:form
   
 
 Yes, totally possible.  Here are some snippets.  :-)
 This is what you'd have in your JSP
 html:select property=propertyname
 size=1
 html:options collection=beanname
 property=value 
 labelProperty=label/
 /html:selectbr
 
 And this is how I build the list in my classes:
 First my Action:
 
 ArrayList trusts = AssetData.getTrusts(
 getDataSource(request,trustmaster),
 errors);
 
 if ((assets == null) || (codes == null) ||
 (trusts == null)) {
 errors.add(
 ActionErrors.GLOBAL_ERROR,
 new
 ActionError(error.resultset.null));
 }  else {
 // Put our results set in a bean in the
 session
 session.setAttribute(assets, assets);
 session.setAttribute(codes, codes);
 session.setAttribute(trusts, trusts);
 }
 
 
 Now my Data:
public static ArrayList getTrusts(
 final DataSource dataSource,
 final ActionErrors errors)
 throws Exception {
 
 Connection conn = null;
 Statement stmt = null;
 ResultSet rs = null;
 ArrayList trusts = new ArrayList();
 
 try {
 conn = dataSource.getConnection();
 stmt = conn.createStatement();
 rs = stmt.executeQuery(select * from
 trusts;);

 // While there are results from our
 query
 // create the codes bean with the proper
 // values from the database.
 while (rs.next()) {
 trusts.add(
 new LabelValueBean(
 rs.getString(trust_name),
 rs.getString(code)));
 }

 } finally {
 if (rs != null) {
 rs.close();
 }
 if (stmt != null) {
 stmt.close();
 }
 if (conn != null) {
 conn.close();
 }
 
 }
 return trusts;
 }
 
 Hopefully this helps.
 Brandon
 

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




__ 
Do you Yahoo!? 
Yahoo! Mail - 250MB free storage. Do more. Manage less. 
http://info.mail.yahoo.com/mail_250

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



Re: html:option tag and Hashtable..is it possible

2005-01-11 Thread Rick Reumann
Ashish Kulkarni wrote the following on 1/11/2005 12:24 PM:
But really hoped to be able to use Hashtable rather
then adding this code
I assume this will work with Hashtable (not sure why you need to use a 
Hashtable over a HashMap).

c:forEach items=${yourMap} var=mapItem
html:option value=${mapItem.key}
${mapItem.value.someProperty}
/html:option
/c:forEach
--
Rick
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


html:option tag and Hashtable..is it possible

2005-01-10 Thread Ashish Kulkarni
Hi
How do i display a drop down box from hashtable data
here is my form definiation
form-bean dynamic=true name=loginForm
type=org.apache.struts.validator.DynaValidatorForm
form-property name=as400list
type=java.util.Hashtable /
/form-bean

in my html i define
html:form action=/login focus=userId
method=post style=margin:0px; 
// logic to display html:select with html:option tag
/html:form

Ashish



__ 
Do you Yahoo!? 
The all-new My Yahoo! - Get yours free! 
http://my.yahoo.com 
 


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



Re: html:option tag and Hashtable..is it possible

2005-01-10 Thread Brandon Mercer
Ashish Kulkarni wrote:
Hi
How do i display a drop down box from hashtable data
here is my form definiation
form-bean dynamic=true name=loginForm
type=org.apache.struts.validator.DynaValidatorForm
form-property name=as400list
type=java.util.Hashtable /
/form-bean
in my html i define
html:form action=/login focus=userId
method=post style=margin:0px; 
// logic to display html:select with html:option tag
/html:form
 

Yes, totally possible.  Here are some snippets.  :-)
This is what you'd have in your JSP
   html:select property=propertyname size=1
   html:options collection=beanname property=value 
labelProperty=label/
   /html:selectbr

And this is how I build the list in my classes:
First my Action:
   ArrayList trusts = AssetData.getTrusts(
   getDataSource(request,trustmaster), errors);
   if ((assets == null) || (codes == null) || (trusts == null)) {
   errors.add(
   ActionErrors.GLOBAL_ERROR,
   new ActionError(error.resultset.null));
   }  else {
   // Put our results set in a bean in the session
   session.setAttribute(assets, assets);
   session.setAttribute(codes, codes);
   session.setAttribute(trusts, trusts);
   }
Now my Data:
  public static ArrayList getTrusts(
   final DataSource dataSource,
   final ActionErrors errors)
   throws Exception {
   Connection conn = null;
   Statement stmt = null;
   ResultSet rs = null;
   ArrayList trusts = new ArrayList();
   try {
   conn = dataSource.getConnection();
   stmt = conn.createStatement();
   rs = stmt.executeQuery(select * from trusts;);
  
   // While there are results from our query
   // create the codes bean with the proper
   // values from the database.
   while (rs.next()) {
   trusts.add(
   new LabelValueBean(
   rs.getString(trust_name),
   rs.getString(code)));
   }
  
   } finally {
   if (rs != null) {
   rs.close();
   }
   if (stmt != null) {
   stmt.close();
   }
   if (conn != null) {
   conn.close();
   }

   }
   return trusts;
   }
Hopefully this helps.
Brandon
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Problem with html:option

2004-12-27 Thread Peter Neu
Hello all,
I got a problem using a HashMap with the html:option.
This code works when I use a LinkedList but I can't get
it to work with a HashMap. Can somebody tell what I have
to do to make it work with a HashMap?
html:select  property=id_mb   onchange=submit() 
html:options collection=HashMap property=id_mb   	 
labelProperty=ma/

/html:select
Best Regards ,
Peter
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


html:option problem

2004-11-23 Thread Dave Bender
Can anybody help me spot what I'm missing in creating an HTML SELECT box
with the html:option tag?

I'm iterating through a list of objects that have IDs and Names, plunking
the ids in for the value and the name for the name.  But the html:option
tag seems to insist that the bean isn't there and just prints my expression.
I'm going through a loop within a loop but that shouldn't make a difference.

This:
html:option value=${emailGroup.emailGroupID}
produces this:
option value=${emailGroup.emailGroupID}
instead of this:
option value=17


 'emailGroup' is defined and exists because I'm using it for label values.
In debugging this, I'm even printing the IDs in parentheses as part of the
label using c:out ... inside the html:option tags and it finds it just
fine.

 I'm going batty.  Can someone help?  (me find the problem, not help me go
batty).

Thanks in advance.

Dave

fuller excerpt of code:

html:select property=toGroup styleClass=box1 style=width=100%;
html:option value=/html:option
c:forEach var=emailGroupType items=${emailGroupTypes}
  html:option value=c:out
value=${emailGroupType.emailGroupTypeName}/c:out/html:option
c:forEach var=emailGroup items=${emailGroupType.emailGroups}
  html:option value=${emailGroup.emailGroupID}
c:out value=${emailGroup.emailGroupName}/
(c:out value=${emailGroup.emailGroupID}/)
  /html:option
/c:forEach
/c:forEach
/html:select



RE: html:option problem

2004-11-23 Thread Slattery, Tim - BLS
 This:
 html:option value=${emailGroup.emailGroupID}
 produces this:
 option value=${emailGroup.emailGroupID}
 instead of this:
 option value=17

Are you sure the html prefix references the EL version of the taglib?

--
Tim Slattery
[EMAIL PROTECTED]


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



RE: html:option problem

2004-11-23 Thread Dave Bender
It references /WEB-INF/struts-html.tld 



-Original Message-
From: Slattery, Tim - BLS [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 23, 2004 2:44 PM
To: 'Struts Users Mailing List'
Subject: RE: html:option problem


 This:
 html:option value=${emailGroup.emailGroupID}
 produces this:
 option value=${emailGroup.emailGroupID}
 instead of this:
 option value=17

Are you sure the html prefix references the EL version of the taglib?

--
Tim Slattery
[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:option problem

2004-11-23 Thread Slattery, Tim - BLS
 This:
 html:option value=${emailGroup.emailGroupID}
 produces this:
 option value=${emailGroup.emailGroupID}
 instead of this:
 option value=17

OK, so now I look at this a bit more closely.

You haven't terminated the option... tag. It should read:

option value=${emailGroup.emailGroupID}/

I would have expected an error message from that but what do I know?

--
Tim Slattery
[EMAIL PROTECTED]


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



RE: html:option problem

2004-11-23 Thread Dave Bender
No, it's terminated.  It's got an end tag /html:option.  The body of the
tag becomes the value.



-Original Message-
From: Slattery, Tim - BLS [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 23, 2004 3:27 PM
To: 'Struts Users Mailing List'
Subject: RE: html:option problem


 This:
 html:option value=${emailGroup.emailGroupID}
 produces this:
 option value=${emailGroup.emailGroupID}
 instead of this:
 option value=17

OK, so now I look at this a bit more closely.

You haven't terminated the option... tag. It should read:

option value=${emailGroup.emailGroupID}/

I would have expected an error message from that but what do I know?

--
Tim Slattery
[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:option problem

2004-11-23 Thread Richard Bywater
As Tim pointed out, I believe you'll need to make the html prefix
reference /WEB-INF/struts-html-el.tld

Richard.


On Tue, 23 Nov 2004 15:09:14 -0600, Dave Bender [EMAIL PROTECTED] wrote:
 It references /WEB-INF/struts-html.tld
 
 -Original Message-
 From: Slattery, Tim - BLS [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, November 23, 2004 2:44 PM
 To: 'Struts Users Mailing List'
 Subject: RE: html:option problem
 
  This:
  html:option value=${emailGroup.emailGroupID}
  produces this:
  option value=${emailGroup.emailGroupID}
  instead of this:
  option value=17
 
 Are you sure the html prefix references the EL version of the taglib?
 
 --
 Tim Slattery

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



Appending html:option to a html:link

2004-07-01 Thread Chris Roderick
Hi,

 

I have a JSP page that has a list of hml:links, each with a map of
attributes appended e.g.:

 

html:link href=SingleVectorChartAction.do? name=attributes

  chart

/html:link

 

(where attributes is a map).

 

On the same page, I have a html:select e.g.:

 

html:select name=VectorInfoForm property=chartFormat size=1

  html:option value=1DHTML /html:option

  html:option value=2Java/html:option

/html:select

 

When a user clicks on the link, I would like to append the currently
selected option from the html:select to the link, without submitting the
form.

 

Does anybody know if this is possible, and if so - how?

 

Thank you in advance,

 

Chris



RE: Appending html:option to a html:link

2004-07-01 Thread McCormack, Chris
Dont think its possilbe unless you use a bit of javascript. 
As its lunchtime I have knocked out a bit of a solution in javascript (not tested).


script language=javascript

  var queryString = ?;
  var count = 0;

function appendToUrl(newValue){

queryString +=+count+=+newValue;

}

function doLink(link){
   
   location.href=link+queryString;
}

/script


html:select name=VectorInfoForm property=chartFormat 
onChange=appendToUrl(this.options[selectedIndex].text) size=1

  html:option value=1DHTML/html:option

  html:option value=2Java/html:option

/html:select

a href='javascript:doLink(SingleVectorChartAction.do)'click meh/a

-Original Message-
From: Chris Roderick [mailto:[EMAIL PROTECTED]
Sent: 01 July 2004 13:49
To: [EMAIL PROTECTED]
Subject: Appending html:option to a html:link


Hi,

 

I have a JSP page that has a list of hml:links, each with a map of
attributes appended e.g.:

 

html:link href=SingleVectorChartAction.do? name=attributes

  chart

/html:link

 

(where attributes is a map).

 

On the same page, I have a html:select e.g.:

 

html:select name=VectorInfoForm property=chartFormat size=1

  html:option value=1DHTML /html:option

  html:option value=2Java/html:option

/html:select

 

When a user clicks on the link, I would like to append the currently
selected option from the html:select to the link, without submitting the
form.

 

Does anybody know if this is possible, and if so - how?

 

Thank you in advance,

 

Chris


***
This e-mail and its attachments are confidential
and are intended for the above named recipient
only. If this has come to you in error, please 
notify the sender immediately and delete this 
e-mail from your system.
You must take no action based on this, nor must 
you copy or disclose it or any part of its contents 
to any person or organisation.
Statements and opinions contained in this email may 
not necessarily represent those of Littlewoods.
Please note that e-mail communications may be monitored.
The registered office of Littlewoods Limited and its
subsidiaries is 100 Old Hall Street, Liverpool, L70 1AB.
Registered number of Littlewoods Limited is 262152.



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



RE: Appending html:option to a html:link

2004-07-01 Thread Chris Roderick
Thank you for your reply.

The only thing that is missing from this are the map of attributes that
I was originally appending to the html:link.  Is it a case of - you can
have one or the other?

Cheers,

Chris

 -Original Message-
 From: McCormack, Chris [mailto:[EMAIL PROTECTED]
 Sent: 01 July 2004 15:07
 To: Struts Users Mailing List
 Subject: RE: Appending html:option to a html:link
 
 Dont think its possilbe unless you use a bit of javascript.
 As its lunchtime I have knocked out a bit of a solution in javascript
(not tested).
 
 
 script language=javascript
 
   var queryString = ?;
   var count = 0;
 
 function appendToUrl(newValue){
 
   queryString +=+count+=+newValue;
 
 }
 
 function doLink(link){
 
location.href=link+queryString;
 }
 
 /script
 
 
 html:select name=VectorInfoForm property=chartFormat
 onChange=appendToUrl(this.options[selectedIndex].text) size=1
 
   html:option value=1DHTML/html:option
 
   html:option value=2Java/html:option
 
 /html:select
 
 a href='javascript:doLink(SingleVectorChartAction.do)'click
meh/a
 
 -Original Message-
 From: Chris Roderick [mailto:[EMAIL PROTECTED]
 Sent: 01 July 2004 13:49
 To: [EMAIL PROTECTED]
 Subject: Appending html:option to a html:link
 
 
 Hi,
 
 
 
 I have a JSP page that has a list of hml:links, each with a map of
 attributes appended e.g.:
 
 
 
 html:link href=SingleVectorChartAction.do? name=attributes
 
   chart
 
 /html:link
 
 
 
 (where attributes is a map).
 
 
 
 On the same page, I have a html:select e.g.:
 
 
 
 html:select name=VectorInfoForm property=chartFormat size=1
 
   html:option value=1DHTML /html:option
 
   html:option value=2Java/html:option
 
 /html:select
 
 
 
 When a user clicks on the link, I would like to append the currently
 selected option from the html:select to the link, without submitting
the
 form.
 
 
 
 Does anybody know if this is possible, and if so - how?
 
 
 
 Thank you in advance,
 
 
 
 Chris
 
 
 ***
 This e-mail and its attachments are confidential
 and are intended for the above named recipient
 only. If this has come to you in error, please
 notify the sender immediately and delete this
 e-mail from your system.
 You must take no action based on this, nor must
 you copy or disclose it or any part of its contents
 to any person or organisation.
 Statements and opinions contained in this email may
 not necessarily represent those of Littlewoods.
 Please note that e-mail communications may be monitored.
 The registered office of Littlewoods Limited and its
 subsidiaries is 100 Old Hall Street, Liverpool, L70 1AB.
 Registered number of Littlewoods Limited is 262152.
 
 
 
 -
 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: Appending html:option to a html:link

2004-07-01 Thread McCormack, Chris
Shove any parameters from your map in to the queryString using jstl

c:forEach items=${mapOfParams} var=blehc:set var=blehString 
value=${blehString}${bleh}//c:forEach

  var queryString = ?c:out value=${blehString} /;

would give you :

  var queryString = ?foo=barcheese=yummy;

(thats assuming each value in mapOfParams was a url param in the form name=value 
otherwise you would get queryString = ?foocheese; if you see what I mean)

hth
Chris McCormack

-Original Message-
From: Chris Roderick [mailto:[EMAIL PROTECTED]
Sent: 01 July 2004 14:14
To: Struts Users Mailing List
Subject: RE: Appending html:option to a html:link


Thank you for your reply.

The only thing that is missing from this are the map of attributes that
I was originally appending to the html:link.  Is it a case of - you can
have one or the other?

Cheers,

Chris

 -Original Message-
 From: McCormack, Chris [mailto:[EMAIL PROTECTED]
 Sent: 01 July 2004 15:07
 To: Struts Users Mailing List
 Subject: RE: Appending html:option to a html:link
 
 Dont think its possilbe unless you use a bit of javascript.
 As its lunchtime I have knocked out a bit of a solution in javascript
(not tested).
 
 
 script language=javascript
 
   var queryString = ?;
   var count = 0;
 
 function appendToUrl(newValue){
 
   queryString +=+count+=+newValue;
 
 }
 
 function doLink(link){
 
location.href=link+queryString;
 }
 
 /script
 
 
 html:select name=VectorInfoForm property=chartFormat
 onChange=appendToUrl(this.options[selectedIndex].text) size=1
 
   html:option value=1DHTML/html:option
 
   html:option value=2Java/html:option
 
 /html:select
 
 a href='javascript:doLink(SingleVectorChartAction.do)'click
meh/a
 
 -Original Message-
 From: Chris Roderick [mailto:[EMAIL PROTECTED]
 Sent: 01 July 2004 13:49
 To: [EMAIL PROTECTED]
 Subject: Appending html:option to a html:link
 
 
 Hi,
 
 
 
 I have a JSP page that has a list of hml:links, each with a map of
 attributes appended e.g.:
 
 
 
 html:link href=SingleVectorChartAction.do? name=attributes
 
   chart
 
 /html:link
 
 
 
 (where attributes is a map).
 
 
 
 On the same page, I have a html:select e.g.:
 
 
 
 html:select name=VectorInfoForm property=chartFormat size=1
 
   html:option value=1DHTML /html:option
 
   html:option value=2Java/html:option
 
 /html:select
 
 
 
 When a user clicks on the link, I would like to append the currently
 selected option from the html:select to the link, without submitting
the
 form.
 
 
 
 Does anybody know if this is possible, and if so - how?
 
 
 
 Thank you in advance,
 
 
 
 Chris
 
 
 ***
 This e-mail and its attachments are confidential
 and are intended for the above named recipient
 only. If this has come to you in error, please
 notify the sender immediately and delete this
 e-mail from your system.
 You must take no action based on this, nor must
 you copy or disclose it or any part of its contents
 to any person or organisation.
 Statements and opinions contained in this email may
 not necessarily represent those of Littlewoods.
 Please note that e-mail communications may be monitored.
 The registered office of Littlewoods Limited and its
 subsidiaries is 100 Old Hall Street, Liverpool, L70 1AB.
 Registered number of Littlewoods Limited is 262152.
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


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


***
This e-mail and its attachments are confidential
and are intended for the above named recipient
only. If this has come to you in error, please 
notify the sender immediately and delete this 
e-mail from your system.
You must take no action based on this, nor must 
you copy or disclose it or any part of its contents 
to any person or organisation.
Statements and opinions contained in this email may 
not necessarily represent those of Littlewoods.
Please note that e-mail communications may be monitored.
The registered office of Littlewoods Limited and its
subsidiaries is 100 Old Hall Street, Liverpool, L70 1AB.
Registered number of Littlewoods Limited is 262152.



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



R: html:option and c:out tags

2004-05-21 Thread Andrea M
Ops..typed it wrong
Correction:

html-el:options collection=${optionList}
property=${optionList.optionID}
labelProperty=${optionList.optionName}/

-Messaggio originale-
Da: Andrea M [mailto:[EMAIL PROTECTED] 
Inviato: venerdì 21 maggio 2004 7.39
A: 'Struts Users Mailing List'
Oggetto: R: html:option and c:out tags

Hi Padala
Why don't you use
html-el:options collection=optionList  property=${optionList.optionID}
labelProperty=${optionList.optionLabel}/

instead of manually cycling thru with  c:forEach  ?

-Messaggio originale-
Da: PADALA, SANDHYA (SBCSI) [mailto:[EMAIL PROTECTED] 
Inviato: giovedì 20 maggio 2004 22.41
A: Struts Users Mailing List
Oggetto: RE: html:option and c:out tags

Thanks Tim, I could solve my issue with the el tags. Now I am using el
tags in other places, Life is easy now.

Sandhya

-Original Message-
From: Slattery, Tim - BLS [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 20, 2004 1:25 PM
To: 'Struts Users Mailing List'
Subject: RE: html:option and c:out tags


 Hello ,
 I have a question on how to use C:out tag as the value 
 to the value attribute of html:option tag
 
 On my JSP
 
 html:select property=optionList
   c:forEach items=${TaskForm.optionList} 
 var=optionList


html:option value=c:out value=${optionList.optionID}/

That's the problem right there, you *cannot* nest tags. So use the el
version of the tag:

html-el:option value=${optionList.optionID}/


--
Tim Slattery
[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:option and c:out tags

2004-05-20 Thread PADALA, SANDHYA (SBCSI)
Hello ,
I have a question on how to use C:out tag as the value to the
value attribute of html:option tag

On my JSP

html:select property=optionList
c:forEach items=${TaskForm.optionList} var=optionList
   
   
   html:option value=c:out value=${optionList.optionID}/c:out
value=${optionList.optionName}//html:option
   
/c:forEach
 /html:select 

When I run this JSp and do a view source
I get the following code

select name=actionListoption value=c:out
value=${optionList.optionID}/abc/option
   

   
   
   option value=c:out value=${optionList.optionID}/xyz/option
   

   
   
   option value=c:out
value=${optionList.optionID}/pqr/option/select   

Can anyone of you tell me how can I get the c:out get evaluated and the
value to be stored in the value attribute of option tag.


Thanks in advance.
Sandhya

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



RE: html:option and c:out tags

2004-05-20 Thread Slattery, Tim - BLS
 Hello ,
 I have a question on how to use C:out tag as the value 
 to the value attribute of html:option tag
 
 On my JSP
 
 html:select property=optionList
   c:forEach items=${TaskForm.optionList} 
 var=optionList


html:option value=c:out value=${optionList.optionID}/

That's the problem right there, you *cannot* nest tags. So use the el
version of the tag:

html-el:option value=${optionList.optionID}/


--
Tim Slattery
[EMAIL PROTECTED]


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



RE: html:option and c:out tags

2004-05-20 Thread PADALA, SANDHYA (SBCSI)
Thanks Tim, I could solve my issue with the el tags. Now I am using el
tags in other places, Life is easy now.

Sandhya

-Original Message-
From: Slattery, Tim - BLS [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 20, 2004 1:25 PM
To: 'Struts Users Mailing List'
Subject: RE: html:option and c:out tags


 Hello ,
 I have a question on how to use C:out tag as the value 
 to the value attribute of html:option tag
 
 On my JSP
 
 html:select property=optionList
   c:forEach items=${TaskForm.optionList} 
 var=optionList


html:option value=c:out value=${optionList.optionID}/

That's the problem right there, you *cannot* nest tags. So use the el
version of the tag:

html-el:option value=${optionList.optionID}/


--
Tim Slattery
[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]



R: html:option and c:out tags

2004-05-20 Thread Andrea M
Hi Padala
Why don't you use
html-el:options collection=optionList  property=${optionList.optionID}
labelProperty=${optionList.optionLabel}/

instead of manually cycling thru with  c:forEach  ?

-Messaggio originale-
Da: PADALA, SANDHYA (SBCSI) [mailto:[EMAIL PROTECTED] 
Inviato: giovedì 20 maggio 2004 22.41
A: Struts Users Mailing List
Oggetto: RE: html:option and c:out tags

Thanks Tim, I could solve my issue with the el tags. Now I am using el
tags in other places, Life is easy now.

Sandhya

-Original Message-
From: Slattery, Tim - BLS [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 20, 2004 1:25 PM
To: 'Struts Users Mailing List'
Subject: RE: html:option and c:out tags


 Hello ,
 I have a question on how to use C:out tag as the value 
 to the value attribute of html:option tag
 
 On my JSP
 
 html:select property=optionList
   c:forEach items=${TaskForm.optionList} 
 var=optionList


html:option value=c:out value=${optionList.optionID}/

That's the problem right there, you *cannot* nest tags. So use the el
version of the tag:

html-el:option value=${optionList.optionID}/


--
Tim Slattery
[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:option / and co

2004-04-22 Thread Marc Tinnemeyer
hi everybody,

I got a collection in session scope which contains a lot of properties
that I want to use to fill comboboxes etc.

the objects stored in this collection look like:

id(int), property(string), value(string)

The propertyfield indicates where the object belongs to (eg. country or
os...).
So in my JSPs I want to iterate through this collection an pick the
objects belonging to the current combobox.
That's the theory, practically there is s.th. that keeps me from doing
this.

Here is what I did so far.

my collection is called PROPERTIES.


html:select property=bundesland size=1
 logic:iterate name=PROPERTIES id=element 
  logic:equal name=element property=property value=bundesland
   html:option value=bean:write name=element property=id / 
bean:write name=element property=value /
   /html:option
  /logic:equal
 /logic:iterate
/html:select


When I call that jsp, I receive the follwing error message equal
symbol expected (which points at):  
html:option value=bean:write name=element property=id / 
^^

So I replaced the doublequotes by singlequotes, which let the error
disappear, while putting the whole string bean:write... into my
valuefield :-(


Does anybody ever encountered a similar problem, and solved it or does
somebody have an idea how to solve this, maybe even in a more elegant way
?

Thanks in advance,

Kind Regards,
Marc Tinnemeyer

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



Re: html:option / and co

2004-04-22 Thread Henrique VIECILI
Hi Marc,

if you have a collection, it would be nice to use the html:options tag, which
iterates over a collection rendering option tags (you shall place inside
html:select or select to make sense)

in your case:

html:options collection=PROPERTIES property=id labelProperty=value /

i guess it will work!

[]´s
Henrique Viecili

- Original Message - 
From: Marc Tinnemeyer [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, April 22, 2004 11:39 AM
Subject: html:option / and co


 hi everybody,

 I got a collection in session scope which contains a lot of properties
 that I want to use to fill comboboxes etc.

 the objects stored in this collection look like:

 id(int), property(string), value(string)

 The propertyfield indicates where the object belongs to (eg. country or
 os...).
 So in my JSPs I want to iterate through this collection an pick the
 objects belonging to the current combobox.
 That's the theory, practically there is s.th. that keeps me from doing
 this.

 Here is what I did so far.

 my collection is called PROPERTIES.


 html:select property=bundesland size=1
  logic:iterate name=PROPERTIES id=element 
   logic:equal name=element property=property value=bundesland
html:option value=bean:write name=element property=id / 
 bean:write name=element property=value /
/html:option
   /logic:equal
  /logic:iterate
 /html:select


 When I call that jsp, I receive the follwing error message equal
 symbol expected (which points at):
 html:option value=bean:write name=element property=id / 
 ^^

 So I replaced the doublequotes by singlequotes, which let the error
 disappear, while putting the whole string bean:write... into my
 valuefield :-(


 Does anybody ever encountered a similar problem, and solved it or does
 somebody have an idea how to solve this, maybe even in a more elegant way
 ?

 Thanks in advance,

 Kind Regards,
 Marc Tinnemeyer

 -
 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:option / and co

2004-04-22 Thread Paul McCulloch
You cannot use a jsp tag as an attribute of another tag

html:option value=bean:write name=element property=id / 
^^
 bean:write name=element property=value /
/html:option

In general you can use rt to get round this:

bean:define id=the_id
bean:write name=element property=id /
/bean:define

html:option value=%the_id%
bean:write name=element property=value /
/html:option

However, in you case there is no reason to use the jsp html:option over
simple html option tags. You can do anything you like with html tags as
the jsp compiler does nothing with them:

option value=bean:write name=element property=id / 
 bean:write name=element property=value /
option

Having said all that, keeping everything in one big data structure seems a
bit messy.

Wht not define a different session scope attribute for each property, or
have a single hashmap of collections (id, value) in session scope, keyed on
property?

Paul


 -Original Message-
 From: Marc Tinnemeyer [mailto:[EMAIL PROTECTED]
 Sent: Thursday, April 22, 2004 3:39 PM
 To: [EMAIL PROTECTED]
 Subject: html:option / and co
 
 
 hi everybody,
 
 I got a collection in session scope which contains a lot of properties
 that I want to use to fill comboboxes etc.
 
 the objects stored in this collection look like:
 
 id(int), property(string), value(string)
 
 The propertyfield indicates where the object belongs to (eg. 
 country or
 os...).
 So in my JSPs I want to iterate through this collection an pick the
 objects belonging to the current combobox.
 That's the theory, practically there is s.th. that keeps me from doing
 this.
 
 Here is what I did so far.
 
 my collection is called PROPERTIES.
 
 
 html:select property=bundesland size=1
  logic:iterate name=PROPERTIES id=element 
   logic:equal name=element property=property value=bundesland
html:option value=bean:write name=element property=id / 
 bean:write name=element property=value /
/html:option
   /logic:equal
  /logic:iterate
 /html:select
 
 
 When I call that jsp, I receive the follwing error message equal
 symbol expected (which points at):  
 html:option value=bean:write name=element property=id / 
 ^^
 
 So I replaced the doublequotes by singlequotes, which let the error
 disappear, while putting the whole string bean:write... into my
 valuefield :-(
 
 
 Does anybody ever encountered a similar problem, and solved it or does
 somebody have an idea how to solve this, maybe even in a more 
 elegant way
 ?
 
 Thanks in advance,
 
 Kind Regards,
 Marc Tinnemeyer
 
 -
 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: html:option / and co

2004-04-22 Thread Marc Tinnemeyer
Thanks for your response Henrique,

I already tried your solution, but there is a problem with it. 
I don't want to get all objects from that collection only those that
have an attribute that matches a certain value.

for example:
in my collection I have three objects with the following attributes:

object 1:
id=1
property=country
value=Brazil

object 2:
id=2
property=sex
value=female

object 3:
id=3
property=country
value=France

now i have a comboxbox that shall display all my countries but not the
sexes. that's why I tried to do it using logic:equal so I need to
find a way to get only those objects from the collection that all have
the same property-field.

Marc



On Thu, 22 Apr 2004 11:52:39 -0300
Henrique VIECILI [EMAIL PROTECTED] wrote:

 Hi Marc,
 
 if you have a collection, it would be nice to use the html:options
 tag, which iterates over a collection rendering option tags (you
 shall place insidehtml:select or select to make sense)
 
 in your case:
 
 html:options collection=PROPERTIES property=id
 labelProperty=value /
 
 i guess it will work!
 
 []_s
 Henrique Viecili

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



Re: html:option / and co

2004-04-22 Thread Henrique VIECILI
Marc,

i think the best way, according to the MVC pattern (JSP is the View), you should
split the collection in 2 collections leaving the Control to your Action. But if
you don´t wanna do this you can try to use just option value='bean:write 
/'  instead of html:option

Henrique

- Original Message - 
From: Marc Tinnemeyer [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Thursday, April 22, 2004 12:49 PM
Subject: Re: html:option / and co


 Thanks for your response Henrique,

 I already tried your solution, but there is a problem with it.
 I don't want to get all objects from that collection only those that
 have an attribute that matches a certain value.

 for example:
 in my collection I have three objects with the following attributes:

 object 1:
 id=1
 property=country
 value=Brazil

 object 2:
 id=2
 property=sex
 value=female

 object 3:
 id=3
 property=country
 value=France

 now i have a comboxbox that shall display all my countries but not the
 sexes. that's why I tried to do it using logic:equal so I need to
 find a way to get only those objects from the collection that all have
 the same property-field.

 Marc



 On Thu, 22 Apr 2004 11:52:39 -0300
 Henrique VIECILI [EMAIL PROTECTED] wrote:

  Hi Marc,
 
  if you have a collection, it would be nice to use the html:options
  tag, which iterates over a collection rendering option tags (you
  shall place insidehtml:select or select to make sense)
 
  in your case:
 
  html:options collection=PROPERTIES property=id
  labelProperty=value /
 
  i guess it will work!
 
  []_s
  Henrique Viecili

 -
 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:option / and co

2004-04-22 Thread Marc Tinnemeyer
My Intention was to create a mulitpurpose-Collection, that contains
some stuff I need regulary. But maybe it's a better approach to split
them into several collections and then use the html:options...

I dont' want to use standard html option-Tag because sometimes I need
an entry in the comboxbox preselected and the struts
html:option(s)-Tags handle this quite well.

So I guess I'll split my super-collection. 

Thanks again for your replies !

Marc


On Thu, 22 Apr 2004 13:28:33 -0300
Henrique VIECILI [EMAIL PROTECTED] wrote:

 Marc,
 
 i think the best way, according to the MVC pattern (JSP is the View),
 you should split the collection in 2 collections leaving the Control
 to your Action. But if you don_t wanna do this you can try to use just
 option value='bean:write /'  instead of html:option
 
 Henrique

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