RE: nested:select default value

2002-10-18 Thread Rea, Ron
Yes, it is PMA.  Any ideas?

-Original Message-
From: Sri Sankaran [mailto:Sri.Sankaran@;sas.com] 
Sent: Friday, October 18, 2002 4:19 PM
To: Struts Users Mailing List
Subject: RE: nested:select default value

Have you ensured that the case of the strings match?  Make sure that
processResp is "PMA" and not "pma".

Sri

-Original Message-
From: Rea, Ron [mailto:rear@;coramhc.com] 
Sent: Friday, October 18, 2002 5:07 PM
To: '[EMAIL PROTECTED]'
Subject: nested:select default value


Hello,
 
I need to pre-set the value displayed in a drop-down via the 
tag.  Although the property used in the nested select tag has a value (I
wrote it out in the column next to the dropdown column to verify this), the
dropdown is not being preselected.  Any ideas:
 
Example: (processResp is "PMA")


CMPL
OVRD
RDA
BMA
PMA
DEND 

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



nested:select default value

2002-10-18 Thread Rea, Ron
Hello,
 
I need to pre-set the value displayed in a drop-down via the 
tag.  Although the property used in the nested select tag has a value (I
wrote it out in the column next to the dropdown column to verify this), the
dropdown is not being preselected.  Any ideas:
 
Example: (processResp is "PMA")


CMPL
OVRD
RDA
BMA
PMA
DEND




RE: nested:select default value

2002-10-18 Thread Rea, Ron
Sri,

If I add value="PMA" to the , ie.
, it pre-selects PMA in
the drop-down.  If I write  in the
previous column, it displays PMA.  

Can I somehow use the  in the value
parameter of the nested:select?

-Original Message-
From: Sri Sankaran [mailto:Sri.Sankaran@;sas.com] 
Sent: Friday, October 18, 2002 4:19 PM
To: Struts Users Mailing List
Subject: RE: nested:select default value

Have you ensured that the case of the strings match?  Make sure that
processResp is "PMA" and not "pma".

Sri

-----Original Message-
From: Rea, Ron [mailto:rear@;coramhc.com] 
Sent: Friday, October 18, 2002 5:07 PM
To: '[EMAIL PROTECTED]'
Subject: nested:select default value


Hello,
 
I need to pre-set the value displayed in a drop-down via the 
tag.  Although the property used in the nested select tag has a value (I
wrote it out in the column next to the dropdown column to verify this), the
dropdown is not being preselected.  Any ideas:
 
Example: (processResp is "PMA")


CMPL
OVRD
RDA
BMA
PMA
DEND 

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



Pop-up from with Nested loop

2002-10-08 Thread Rea, Ron

Has anyone ever used a pop-up form to fill data with a 
section?
 
I am displaying several rows of data using a JSP and the 
tag.  On each row, I want to create a link or button that, when clicked,
pops up a small page containing a textarea.  The user fills out the text
area, hits the close button, and that textarea  data is transferred back to
the parent form and placed in the correct property iteration within the
nested tag.  Any ideas???
 
Thanks.



RE: Is this possible?

2002-10-08 Thread Rea, Ron

Hi Joe,

Thanks for reply.  I tried this, but I get an error when I enter the pop-up
screen saying that "overrideExp" is not an object.  I'm pretty new to
javascript, so I'm not sure how to expose the data entered in the pop-up,
nor how to do a display within a javascript to see if the entered data is
going into a variable properly.  Any thoughts?

Thanks
Ron

-Original Message-
From: Joe Barefoot [mailto:[EMAIL PROTECTED]] 
Sent: Monday, October 07, 2002 7:36 PM
To: Struts Users Mailing List
Subject: RE: Is this possible?

>From what I see, there's no logic in your popup to populate the form field
(the Explanation) in your opening window.  You need to pass in the id of the
explanation field so you can populate it when the popup is closed:

Your function needs to accept a 'fieldName' argument and then do something
like this when you hit the close button:

onClick=opener.document.getElementById(fieldName).value =
this.document.getElementById(overrideExp).value; window.close


Since you're using the nested tags, you'll have to figure out what names it
gives the fields in the generated HTML so you can pass those in to the
JavaScript function.  I'm guessing it does something like:
gridArray[i].overrideExp


peace,
Joe



> -Original Message-
> From: Rea, Ron [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October 07, 2002 4:46 PM
> To: '[EMAIL PROTECTED]'
> Subject: Is this possible?
> 
> 
> Hello, 
> I'm not sure if this is possible from within a 
>  tag, any
> help would be greatly appreciated!
>  
> From within my JSP, I am iterating through several rows of data and
> displaying the data for modification.  One specific property is an
> Explanation field.  What I'd like to do is create a "memo" 
> link on each row
> of data, and when that link is hit, a small page is displayed 
> with only that
> rows Explanation data.  The user enters up to 300 bytes of 
> data for their
> Explanation, within the pop-up, and when they close the 
> pop-up, the specific
> rows Explanation property is updated within the 
>  section.   
>  
> I can create the pop-up, but after I enter the data, the rows 
> Explanation
> property is not updated.  Any ideas?  Is this possible?
>  
> Thanks!
>  
> Example of code:
>  
> JSP:
> 
>  filter="true"/> 
> 
>  value="A"/>Approve
>  value="D"/>Deny
> 
> 
> 
> ' ,' property="msgCode"
> filter="true"/>');" onMouseOver="window.status='Click to 
> enter an Override
> Explanation...';return true;" onMouseOut="window.status='';return
> true;">memo
> 
>   
>   
>  
> Javascript:
> 
> function getText(name, output, msg, dataValue, msgKey) {
> newwin = window.open('','','top=150,left=150,width=325,height=330');
> if (!newwin.opener) newwin.opener = self;
> with (newwin.document)
> {
> open();
> write('<html>');
> write('<body onLoad="document.form.box.focus()"><form 
> name=form>' + msg +
> '<br>');
> write('<p><left>Message Code: <strong>' + msgKey + '</strong>');
> write('<p><center><textarea name=overrideExp rows=10 cols=30 
> onKeyUp=' +
> output + '=this.value>' + dataValue + '</textarea>');
> write('<p><input type=button value="Click to close when finished"
> onClick=window.close()>');
> write('</center></form></body></html>');
> close();
>}
> }
> 
>  
> 

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



Is this possible?

2002-10-07 Thread Rea, Ron

Hello, 
I'm not sure if this is possible from within a  tag, any
help would be greatly appreciated!
 
>From within my JSP, I am iterating through several rows of data and
displaying the data for modification.  One specific property is an
Explanation field.  What I'd like to do is create a "memo" link on each row
of data, and when that link is hit, a small page is displayed with only that
rows Explanation data.  The user enters up to 300 bytes of data for their
Explanation, within the pop-up, and when they close the pop-up, the specific
rows Explanation property is updated within the  section.   
 
I can create the pop-up, but after I enter the data, the rows Explanation
property is not updated.  Any ideas?  Is this possible?
 
Thanks!
 
Example of code:
 
JSP:

 

Approve
Deny



' ,'');" onMouseOver="window.status='Click to enter an Override
Explanation...';return true;" onMouseOut="window.status='';return
true;">memo

  
  
 
Javascript:

function getText(name, output, msg, dataValue, msgKey) {
newwin = window.open('','','top=150,left=150,width=325,height=330');
if (!newwin.opener) newwin.opener = self;
with (newwin.document)
{
open();
write('');
write('
' + msg + '
'); write('

Message Code: ' + msgKey + ''); write('

'); write('

'); write('

'); close(); } }

Is this possible??

2002-09-30 Thread Rea, Ron

Hello everyone, 
Just wondering if someone can tell me if this is possible and, if so, how
this can be done?  I've been banging my head for several days trying to
figure out a way to display several rows of data on a JSP, allow the user to
update several rows at a time, then hit the submit button and have all
changes returned to the Action class so the database can be updated.  

I have seen an incomplete example which says that if you use an array it
will be repopulated, but I'm just to lame to be able to figure out all the
pieces from the small snippet of code.  Has anyone ever done this?  Is it
even possible to do using Struts? Hel...



Update array from JSP using Struts

2002-09-28 Thread Rea, Ron

According to one of Ted Husteds tips, in order to present a screen with
multiple records and allow the user to edit all records at once, then hit
submit, you have to break the record into arrays for each field and load the
array.  For example, Employee table will have row 1 name go to name[0], row
2 name go to name[1], etc...

Then you would use the logic:iterate tag  an it would autopopulate the
arrays.  Unfornately, I am unable to get the logic:iterate tag to work on an
array, and the example at Husted web site doesn't explain how the
logic:iterate parameters he has are set up.  Can someone take a look at this
example and tell me if you can make heads or tales of it???  

The tips are based on his futer book, but I can't figure out how to make it
work. 
Here's the link to his tip: 
http://www.husted.com/struts/tips/006.html 

Thanks! 

   



Help on use an array to capture multiple parameter - Husted

2002-09-27 Thread Rea, Ron

Ted Husted has a page which kinda explains how to use an array to capture
multiple parameters.  Unfortunately, it appears that something must be
missing from this example, as I have followed it as well as possible and yet
to get it to work.  
 
If one needs to display multiple records on the screen, and let the users
make modifications to each row, then hit one Submit button at the bottom of
the page so that all edits on all displayed rows takes place, Struts does
not appear to be able to do this.  I have tried several methods and have yet
to get any success.  
 
I would be greatly interested in hearing from anyone that has ever had
success using Struts to create a page that works as described above.   
 
This is the link to Ted's page describing this process, good luck...
 
http://www.husted.com/struts/tips/006.html
 
 
 
 



Scriptlet and

2002-09-27 Thread Rea, Ron

Can I place a  within a scriptlet?  I tried this, but to no
avail:
 
<%
for (int i = 0;i < ; i++) {
%>



RE: Iterate tag question

2002-09-27 Thread Rea, Ron

Joe, 

This ammmst works.  It displays the data just fine, but I get the
following error when I hit submit:

javax.servlet.ServletException: No collection found

Seems that it wants a collection to iterate through??  What'cha think?

Ron

-Original Message-
From: Joe Barefoot [mailto:[EMAIL PROTECTED]] 
Sent: Friday, September 27, 2002 1:04 PM
To: Struts Users Mailing List
Subject: RE: Iterate tag question

Okay, now I understand what you meant by "edit".  You might be right about
needing to use an array in this case, as I have never had to do exactly what
you're doing.  So, if you want to proceed in this vein, I *think* you should
do something like this:



   
   



Couple of things to note here:

1.  You are only using the iterate tag to get the index value.  Your two
arrays must be of the same length of course, and it doesn't matter which one
you iterate through.
2.  You are not using the id attribute of the iterage tag at all, but I
*think* it's required, so I left it there.
3.  The index is actually a big Integer, hence the intValue() method call.
4.  The attributes have single quotes around them for a reason.  There are
String literals embedded in the JSP expressions in the attributes...usually
the double quotes confuse the JSP compiler, so I put single quotes around
the attribute value itself.  This is valid, but you can't mix usage within a
tag (i.e. single and double for attributes)
5.  You may want to replace the String literals I have used with
prefix/suffix variables created from bean:define tags.  That was you can
eliminate some of the quotes and it might look cleaner to you.

6. (this is the important one) I've never had to do this, but AFAIK this
should work just fine.

7.  Hey, let me know if this works. ;)

peace,
Joe


> -Original Message-
> From: Rea, Ron [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 27, 2002 12:29 PM
> To: 'Struts Users Mailing List'
> Subject: RE: Iterate tag question
> 
> 
> If you have a working example of how I could actually modify 
> properties
> presented through an ArrayList, I would be forever grateful 
>  to see that.
> I have no problem presenting an ArrayList of properties, but 
> everything I
> have read indicates that you have to nead an edit button on 
> each row in
> order to send changed data back to the Action class.  Our 
> users want a table
> of data presented back to them, where they can make changes 
> to each row,
> then hit submit at the end and have the Action class update 
> the data table
> with the edits.  Unfortunately, I have not been able to do 
> this using an
> ArrayList, and I think the link to Husted's site indicated 
> the same, but
> maybe I'm wrong.   If you have, I'd really like to know how 
> you did it.
> 
> Thanks!
> 
> -Original Message-
> From: Joe Barefoot [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, September 27, 2002 12:15 PM
> To: Struts Users Mailing List
> Subject: RE: Iterate tag question
> 
> 
> 
> > -Original Message-
> > From: Rea, Ron [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, September 27, 2002 12:05 PM
> > To: 'Struts Users Mailing List'
> > Subject: RE: Iterate tag question
> > 
> > 
> > I originally had it as an arraylist of these properties, 
> but using an
> > ArrayList in the Iterate tag prevents me from being able to edit the
> 
> First, how would using an ArrayList prevent you from doing 
> any edits you
> could do with an array?  Edit within the action, right?
> 
> Second, in your snippet, you are using html:text, which 
> expects a single
> Object, but your getter is returning a String[].  Not what 
> you want to do.
> If you really want to use an array here, make it an array of 
> a tuple object
> (even with an ArrayList, this is the way to do it)...one that 
> has getCode()
> and getDesc() methods.  Then you iterate through these 
> objects, outputting
> your code and description.  Don't use two string arrays or 
> two ArrayLists.
> 
> peace,
> Joe
> 
> 
> > individual table row data, then hit one submit button at 
> the end.  Any
> > changes are lost.  
> > 
> > I tried following Husted's instructions on how to do this, 
> > found at this
> > link: http://www.husted.com/struts/tips/006.html, but the 
> > instructions are
> > not complete enough and I cannot get the iterate tag to work.  
> > 
> > 
> > 
> > -Original Message-
> > From: John Owen [mailto:[EMAIL PROTECTED]] 
> > Sent: Friday, September 27, 2002 12:03 PM
> > To: Struts Users Mailing List
> > Subject: Re: Iterate tag question
> > 
> > String[] 

RE: Iterate tag question

2002-09-27 Thread Rea, Ron

Thanks Joe!!

I'll give this a shot and let you know...

Ron

-Original Message-
From: Joe Barefoot [mailto:[EMAIL PROTECTED]] 
Sent: Friday, September 27, 2002 1:04 PM
To: Struts Users Mailing List
Subject: RE: Iterate tag question

Okay, now I understand what you meant by "edit".  You might be right about
needing to use an array in this case, as I have never had to do exactly what
you're doing.  So, if you want to proceed in this vein, I *think* you should
do something like this:



   
   



Couple of things to note here:

1.  You are only using the iterate tag to get the index value.  Your two
arrays must be of the same length of course, and it doesn't matter which one
you iterate through.
2.  You are not using the id attribute of the iterage tag at all, but I
*think* it's required, so I left it there.
3.  The index is actually a big Integer, hence the intValue() method call.
4.  The attributes have single quotes around them for a reason.  There are
String literals embedded in the JSP expressions in the attributes...usually
the double quotes confuse the JSP compiler, so I put single quotes around
the attribute value itself.  This is valid, but you can't mix usage within a
tag (i.e. single and double for attributes)
5.  You may want to replace the String literals I have used with
prefix/suffix variables created from bean:define tags.  That was you can
eliminate some of the quotes and it might look cleaner to you.

6. (this is the important one) I've never had to do this, but AFAIK this
should work just fine.

7.  Hey, let me know if this works. ;)

peace,
Joe


> -Original Message-
> From: Rea, Ron [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 27, 2002 12:29 PM
> To: 'Struts Users Mailing List'
> Subject: RE: Iterate tag question
> 
> 
> If you have a working example of how I could actually modify 
> properties
> presented through an ArrayList, I would be forever grateful 
>  to see that.
> I have no problem presenting an ArrayList of properties, but 
> everything I
> have read indicates that you have to nead an edit button on 
> each row in
> order to send changed data back to the Action class.  Our 
> users want a table
> of data presented back to them, where they can make changes 
> to each row,
> then hit submit at the end and have the Action class update 
> the data table
> with the edits.  Unfortunately, I have not been able to do 
> this using an
> ArrayList, and I think the link to Husted's site indicated 
> the same, but
> maybe I'm wrong.   If you have, I'd really like to know how 
> you did it.
> 
> Thanks!
> 
> -Original Message-
> From: Joe Barefoot [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, September 27, 2002 12:15 PM
> To: Struts Users Mailing List
> Subject: RE: Iterate tag question
> 
> 
> 
> > -Original Message-
> > From: Rea, Ron [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, September 27, 2002 12:05 PM
> > To: 'Struts Users Mailing List'
> > Subject: RE: Iterate tag question
> > 
> > 
> > I originally had it as an arraylist of these properties, 
> but using an
> > ArrayList in the Iterate tag prevents me from being able to edit the
> 
> First, how would using an ArrayList prevent you from doing 
> any edits you
> could do with an array?  Edit within the action, right?
> 
> Second, in your snippet, you are using html:text, which 
> expects a single
> Object, but your getter is returning a String[].  Not what 
> you want to do.
> If you really want to use an array here, make it an array of 
> a tuple object
> (even with an ArrayList, this is the way to do it)...one that 
> has getCode()
> and getDesc() methods.  Then you iterate through these 
> objects, outputting
> your code and description.  Don't use two string arrays or 
> two ArrayLists.
> 
> peace,
> Joe
> 
> 
> > individual table row data, then hit one submit button at 
> the end.  Any
> > changes are lost.  
> > 
> > I tried following Husted's instructions on how to do this, 
> > found at this
> > link: http://www.husted.com/struts/tips/006.html, but the 
> > instructions are
> > not complete enough and I cannot get the iterate tag to work.  
> > 
> > 
> > 
> > -Original Message-
> > From: John Owen [mailto:[EMAIL PROTECTED]] 
> > Sent: Friday, September 27, 2002 12:03 PM
> > To: Struts Users Mailing List
> > Subject: Re: Iterate tag question
> > 
> > String[] is just an array of String. It has no iterator. You need a
> > Collection, List or Enumeration.
> > 
> > - Original Message -
> > From: "Re

RE: Iterate tag question

2002-09-27 Thread Rea, Ron

If you have a working example of how I could actually modify properties
presented through an ArrayList, I would be forever grateful  to see that.
I have no problem presenting an ArrayList of properties, but everything I
have read indicates that you have to nead an edit button on each row in
order to send changed data back to the Action class.  Our users want a table
of data presented back to them, where they can make changes to each row,
then hit submit at the end and have the Action class update the data table
with the edits.  Unfortunately, I have not been able to do this using an
ArrayList, and I think the link to Husted's site indicated the same, but
maybe I'm wrong.   If you have, I'd really like to know how you did it.

Thanks!

-Original Message-
From: Joe Barefoot [mailto:[EMAIL PROTECTED]] 
Sent: Friday, September 27, 2002 12:15 PM
To: Struts Users Mailing List
Subject: RE: Iterate tag question



> -Original Message-----
> From: Rea, Ron [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 27, 2002 12:05 PM
> To: 'Struts Users Mailing List'
> Subject: RE: Iterate tag question
> 
> 
> I originally had it as an arraylist of these properties, but using an
> ArrayList in the Iterate tag prevents me from being able to edit the

First, how would using an ArrayList prevent you from doing any edits you
could do with an array?  Edit within the action, right?

Second, in your snippet, you are using html:text, which expects a single
Object, but your getter is returning a String[].  Not what you want to do.
If you really want to use an array here, make it an array of a tuple object
(even with an ArrayList, this is the way to do it)...one that has getCode()
and getDesc() methods.  Then you iterate through these objects, outputting
your code and description.  Don't use two string arrays or two ArrayLists.

peace,
Joe


> individual table row data, then hit one submit button at the end.  Any
> changes are lost.  
> 
> I tried following Husted's instructions on how to do this, 
> found at this
> link: http://www.husted.com/struts/tips/006.html, but the 
> instructions are
> not complete enough and I cannot get the iterate tag to work.  
> 
> 
> 
> -Original Message-
> From: John Owen [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, September 27, 2002 12:03 PM
> To: Struts Users Mailing List
> Subject: Re: Iterate tag question
> 
> String[] is just an array of String. It has no iterator. You need a
> Collection, List or Enumeration.
> 
> - Original Message -
> From: "Rea, Ron" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, September 27, 2002 1:35 PM
> Subject: Iterate tag question
> 
> 
> > I am trying to iterate through several array fields on my 
> Form within the
> > JSP, display the properties as a table on the page.  Using 
> arrays should
> > allow me to update the table data, however I cannot seem to get the
> iterate
> > tag to work.  The following is an example of what I'm 
> doing.  Any ideas on
> > how this iterate tag should look - I'm just trying to go through the
> array,
> > held in the ActionForm,  and display each occurance as a 
> row in the JSP.
> >
> > ResponseProcessForm:
> >
> > public void setMsgCode(String[] msgCode) {
> > this.msgCode = msgCode;
> > }
> >
> > public String[] getMsgCode() {
> > return msgCode;
> > }
> >
> > public void setMsgDesc(String[] msgDesc) {
> > this.msgDesc = msgDesc;
> > }
> >
> > public String[] getMsgDesc() {
> > return msgDesc;
> > }
> >
> > section of JSP:
> >
> >  >  name="responseProcessForm"
> > property="msgCode">
> >   property="msgCode"
> > filter="true"/>  
> >  > maxlength="6" /> 
> > 
> >
> > Using this code gives me this error: 
> javax.servlet.ServletException: No
> > getter method for property msgCode of bean grid
> >
> > Thanks!
> >
> 
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 

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



RE: Iterate tag question

2002-09-27 Thread Rea, Ron

I originally had it as an arraylist of these properties, but using an
ArrayList in the Iterate tag prevents me from being able to edit the
individual table row data, then hit one submit button at the end.  Any
changes are lost.  

I tried following Husted's instructions on how to do this, found at this
link: http://www.husted.com/struts/tips/006.html, but the instructions are
not complete enough and I cannot get the iterate tag to work.  



-Original Message-
From: John Owen [mailto:[EMAIL PROTECTED]] 
Sent: Friday, September 27, 2002 12:03 PM
To: Struts Users Mailing List
Subject: Re: Iterate tag question

String[] is just an array of String. It has no iterator. You need a
Collection, List or Enumeration.

- Original Message -
From: "Rea, Ron" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, September 27, 2002 1:35 PM
Subject: Iterate tag question


> I am trying to iterate through several array fields on my Form within the
> JSP, display the properties as a table on the page.  Using arrays should
> allow me to update the table data, however I cannot seem to get the
iterate
> tag to work.  The following is an example of what I'm doing.  Any ideas on
> how this iterate tag should look - I'm just trying to go through the
array,
> held in the ActionForm,  and display each occurance as a row in the JSP.
>
> ResponseProcessForm:
>
> public void setMsgCode(String[] msgCode) {
> this.msgCode = msgCode;
> }
>
> public String[] getMsgCode() {
> return msgCode;
> }
>
> public void setMsgDesc(String[] msgDesc) {
> this.msgDesc = msgDesc;
> }
>
> public String[] getMsgDesc() {
> return msgDesc;
> }
>
> section of JSP:
>
>   name="responseProcessForm"
> property="msgCode">
>   filter="true"/>  
>  maxlength="6" /> 
> 
>
> Using this code gives me this error: javax.servlet.ServletException: No
> getter method for property msgCode of bean grid
>
> Thanks!
>

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



Iterate tag question

2002-09-27 Thread Rea, Ron

I am trying to iterate through several array fields on my Form within the
JSP, display the properties as a table on the page.  Using arrays should
allow me to update the table data, however I cannot seem to get the iterate
tag to work.  The following is an example of what I'm doing.  Any ideas on
how this iterate tag should look - I'm just trying to go through the array,
held in the ActionForm,  and display each occurance as a row in the JSP.
 
ResponseProcessForm:
 
public void setMsgCode(String[] msgCode) {
this.msgCode = msgCode;
}
 
public String[] getMsgCode() {
return msgCode;
}
 
public void setMsgDesc(String[] msgDesc) {
this.msgDesc = msgDesc;
}
 
public String[] getMsgDesc() {
return msgDesc;
}
 
section of JSP:
 

   
 

 
Using this code gives me this error: javax.servlet.ServletException: No
getter method for property msgCode of bean grid
 
Thanks!



RE: html:select and collection display

2002-08-28 Thread Rea, Ron

Hi Paul,

I apologize if this reply is posted twice, our mailserver had problems while
sending this out originally.  

I think that the client-side javascript approach would work well for our
situation here.  Ideally, I don't want to have to go to the server whenever
the user clicks a selection from the drop-down.  Thanks in advance for your
help and example!

Ron

-Original Message-
From: Galbraith, Paul [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, August 28, 2002 11:59 AM
To: Struts Users Mailing List
Subject: RE: html:select and collection display

Hi Ron, I saw that somebody else had replied and had given you (somewhat)
conflicting, but still good, advice regarding this.  

An important question is this:  do you want to have the page refresh from
the server when a user clicks on the selection in the drop-down box (very
annoying for the user!), or do you want to be able to handle this entirely
on the client-side in the browser?  

A client-side solution is preferable, IMHO, if you can get away with it,
because it will be much more responsive to the user.  There are two
tradeoffs with the client-side approach, however.  One is that you need to
write client-side javascript, and your requirements may dictate that you
cannot do this (i.e. if you have to deal with users who have javascript
disabled, or browsers that don't support javascript).  The second tradeoff
comes if you have a lot of data, because for the client-side solution to
work you need to populate a javascript array(s) with every possible value of
therapyCode and therapyDesc, and write it all to the html page, every time
someone requests the page from the server.  The cost of doing this
processing for every page hit may make this unfeasible (esp. in a
high-volume website)...you can also run into cases where the amount of data
is so big that writing it all to a javascript array on the page makes the
page too large to be practical.

So, before I offer any more advice, first tell me if you think you'd want to
do this with a client-side or server-side approach!

Paul

-Original Message-----
From: Rea, Ron [mailto:[EMAIL PROTECTED]]
Sent: August 28, 2002 2:38 PM
To: 'Struts Users Mailing List'
Subject: RE: html:select and collection display


Paul,

Thanks for the reply!  I tried to get an example of a JSP using "onchange",
but have not been able to come up with a complete example which also uses
the  tag.  It would sure be a great help if you could point me
in the direction of one!  

Thanks,
Ron

-Original Message-
From: Galbraith, Paul [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, August 28, 2002 4:37 AM
To: Struts Users Mailing List
Subject: RE: html:select and collection display

Ron, where exactly are you wanting to display the therapyDesc?  You'll want
to use the onClick or onChange javascript event handlers of the html:select
tag.  You'll need to write some javascript that can identify the therapyCode
and display the matching therapyDesc.  I hope that's a start in the right
direction for you, and I'm not telling you something you already know...if
you're not sure how to do this, just ask.

Paul

-Original Message-
From: Rea, Ron [mailto:[EMAIL PROTECTED]]
Sent: August 27, 2002 1:23 PM
To: '[EMAIL PROTECTED]'
Subject: html:select and collection display


Hello All, 
 
I'm still pretty new to Struts, so maybe this is really simple, but I can't
figure it out for the life of me.  I am displaying a drop-down within a JSP.
The collection contains a therapyCode and a therapyDesc, the drop-down
displaying the therapyCode.  What I need to do is, once the therapyCode is
selected from the drop-down, also display the therapyDesc for that
therapyCode.  Any ideas as to how to do this???
 
Collection: therapyArrayList
===
therapyCode
therapyDesc 
 
Code to display drop-down:
 
 

 

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

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



RE: html:select and collection display

2002-08-28 Thread Rea, Ron

Paul,

Thanks for the reply!  I tried to get an example of a JSP using "onchange",
but have not been able to come up with a complete example which also uses
the  tag.  It would sure be a great help if you could point me
in the direction of one!  

Thanks,
Ron

-Original Message-
From: Galbraith, Paul [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, August 28, 2002 4:37 AM
To: Struts Users Mailing List
Subject: RE: html:select and collection display

Ron, where exactly are you wanting to display the therapyDesc?  You'll want
to use the onClick or onChange javascript event handlers of the html:select
tag.  You'll need to write some javascript that can identify the therapyCode
and display the matching therapyDesc.  I hope that's a start in the right
direction for you, and I'm not telling you something you already know...if
you're not sure how to do this, just ask.

Paul

-----Original Message-
From: Rea, Ron [mailto:[EMAIL PROTECTED]]
Sent: August 27, 2002 1:23 PM
To: '[EMAIL PROTECTED]'
Subject: html:select and collection display


Hello All, 
 
I'm still pretty new to Struts, so maybe this is really simple, but I can't
figure it out for the life of me.  I am displaying a drop-down within a JSP.
The collection contains a therapyCode and a therapyDesc, the drop-down
displaying the therapyCode.  What I need to do is, once the therapyCode is
selected from the drop-down, also display the therapyDesc for that
therapyCode.  Any ideas as to how to do this???
 
Collection: therapyArrayList
===
therapyCode
therapyDesc 
 
Code to display drop-down:
 
 

 

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



RE: Display of label associated to drop-down

2002-08-27 Thread Rea, Ron

Sri,

Thanks for the reply!  Since indexed="true" is valid only inside an
 tag, could I wrap the   code in a
logic:iterate tag and then display the therapyDesc from the collection?  

This collection is loaded from a database when the server is started.  It is
fairly static and used on several JSPs.  It seems that is the collection is
available on the page, I should be able to get at it?  Am I wrong about
that.

-Original Message-
From: Sri Sankaran [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, August 27, 2002 12:11 PM
To: Struts Users Mailing List
Subject: RE: Display of label associated to drop-down

The indexed="true" is valid only inside an  tag.  

If your page is lightweight enough you could load the codes and their
descriptions in one fell swoop into a JavaScript array.  Display only the
codes and when the user selects a code (onChange), fire a JavaScript
function that'll display the appropriate description.  

Alternatively, a server-side call for description without a refresh of the
current page can be achieved using Iframes.

Sri

-Original Message-
From: Rea, Ron [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, August 27, 2002 2:29 PM
To: 'Struts Users Mailing List'
Subject: RE: Display of label associated to drop-down


Thanks for the reply.  One question: if I changed the html:select to also
include an "indexed="true"" option, could I then simply use an  "html:text"
statement to display whatever therapyDesc (also within the collection) for
the associated index?   If so, any idea what the code would look like?

Thanks

-Original Message-
From: Sri Sankaran [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, August 27, 2002 5:44 AM
To: Struts Users Mailing List
Subject: RE: Display of label associated to drop-down

To you therapyCode select tag add an onchange (note:it isn't onChange)
element that submits the page.  The action for the page can then set the
therapyArrayList and re-direct the user to the same page


  <%-- etc --%>

Hope that helps

Sri

-Original Message-
From: Rea, Ron [mailto:[EMAIL PROTECTED]] 
Sent: Monday, August 26, 2002 5:48 PM
To: '[EMAIL PROTECTED]'
Subject: Display of label associated to drop-down


Hello, 
I have created a drop-down using a collection that contains a therapyCode
and a therapyDesc. The following snippet of JSP code will allow the
selection of the therapyCode in the drop-down, but - once the therapyCode is
selected from the drop-down - I want to display its associated therapyDesc
next to it in a Label field.  Has anyone had to do this? 
==
Table
==
therapyCode
therapyDesc 
Collection: therapyArrayList
===
therapyCode
therapyDesc 
Code to display drop-down:
 
 

 

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

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



RE: Display of label associated to drop-down

2002-08-27 Thread Rea, Ron

Thanks for the reply.  One question: if I changed the html:select to also
include an "indexed="true"" option, could I then simply use an  "html:text"
statement to display whatever therapyDesc (also within the collection) for
the associated index?   If so, any idea what the code would look like?

Thanks

-Original Message-
From: Sri Sankaran [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, August 27, 2002 5:44 AM
To: Struts Users Mailing List
Subject: RE: Display of label associated to drop-down

To you therapyCode select tag add an onchange (note:it isn't onChange)
element that submits the page.  The action for the page can then set the
therapyArrayList and re-direct the user to the same page


  <%-- etc --%>

Hope that helps

Sri

-Original Message-
From: Rea, Ron [mailto:[EMAIL PROTECTED]] 
Sent: Monday, August 26, 2002 5:48 PM
To: '[EMAIL PROTECTED]'
Subject: Display of label associated to drop-down


Hello, 
I have created a drop-down using a collection that contains a therapyCode
and a therapyDesc. The following snippet of JSP code will allow the
selection of the therapyCode in the drop-down, but - once the therapyCode is
selected from the drop-down - I want to display its associated therapyDesc
next to it in a Label field.  Has anyone had to do this? 
==
Table
==
therapyCode
therapyDesc 
Collection: therapyArrayList
===
therapyCode
therapyDesc 
Code to display drop-down:
 
 

 

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



html:select and collection display

2002-08-27 Thread Rea, Ron

Hello All, 
 
I'm still pretty new to Struts, so maybe this is really simple, but I can't
figure it out for the life of me.  I am displaying a drop-down within a JSP.
The collection contains a therapyCode and a therapyDesc, the drop-down
displaying the therapyCode.  What I need to do is, once the therapyCode is
selected from the drop-down, also display the therapyDesc for that
therapyCode.  Any ideas as to how to do this???
 
Collection: therapyArrayList
===
therapyCode
therapyDesc 
 
Code to display drop-down:
 
 

 



Display of label associated to drop-down

2002-08-26 Thread Rea, Ron

Hello, 
I have created a drop-down using a collection that contains a therapyCode
and a therapyDesc. The following snippet of JSP code will allow the
selection of the therapyCode in the drop-down, but - once the therapyCode is
selected from the drop-down - I want to display its associated therapyDesc
next to it in a Label field.  Has anyone had to do this? 
==
Table
==
therapyCode
therapyDesc 
Collection: therapyArrayList
===
therapyCode
therapyDesc 
Code to display drop-down: