Re: Bean Tag question

2004-01-14 Thread Ben Anderson
they're in the struts-el.jar which you can find in the /contrib/struts-el 
directoy of a struts binary distro.  Just throw that jar into /WEB-INF/lib 
and put these tag directives in your jsp's and you should be all set:

<%@ taglib prefix="bean-el"  
uri="http://jakarta.apache.org/struts/tags-bean-el"; %>
<%@ taglib prefix="html-el"  
uri="http://jakarta.apache.org/struts/tags-html-el"; %>
<%@ taglib prefix="logic-el" 
uri="http://jakarta.apache.org/struts/tags-logic-el"; %>

-Ben

From: "Henrique VIECILI" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: Re: Bean Tag question
Date: Wed, 14 Jan 2004 17:32:55 -0300
Ok, i will try it!

but, where can i download the struts-el.tld files??

i have not found them in the struts web site!

Thanx

Henrique

- Original Message -
From: "Ben Anderson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 14, 2004 3:25 PM
Subject: RE: Bean Tag question
> you can't have a tag as an attribute for another tag.  How bout this?
>
> 
>
>
> >From: "Henrique VIECILI" <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >Subject: Bean Tag question
> >Date: Wed, 14 Jan 2004 16:14:49 -0300
> >
> >Hi,
> >
> >I am trying to access a bean property inside the arg0 attribute of
> >bean:message
> >tag, is that possible using only the standard taglibs? How?
> >
> >I´ve tried this code bellow and it didn´t work:
> >
> >
> >property="myParam" />" />
> >
> >Henrique
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> _
> There are now three new levels of MSN Hotmail Extra Storage!  Learn 
more.
> http://join.msn.com/?pgmarket=en-us&page=hotmail/es2&ST=1
>
>
> -
> 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]
_
Find out everything you need to know about Las Vegas here for that getaway.  
http://special.msn.com/msnbc/vivalasvegas.armx

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


Re: Bean Tag question

2004-01-14 Thread Henrique VIECILI
Ok, i will try it!

but, where can i download the struts-el.tld files??

i have not found them in the struts web site!

Thanx

Henrique

- Original Message -
From: "Ben Anderson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 14, 2004 3:25 PM
Subject: RE: Bean Tag question


> you can't have a tag as an attribute for another tag.  How bout this?
>
> 
>
>
> >From: "Henrique VIECILI" <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >Subject: Bean Tag question
> >Date: Wed, 14 Jan 2004 16:14:49 -0300
> >
> >Hi,
> >
> >I am trying to access a bean property inside the arg0 attribute of
> >bean:message
> >tag, is that possible using only the standard taglibs? How?
> >
> >I´ve tried this code bellow and it didn´t work:
> >
> > >property="myParam" />" />
> >
> >Henrique
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> _
> There are now three new levels of MSN Hotmail Extra Storage!  Learn more.
> http://join.msn.com/?pgmarket=en-us&page=hotmail/es2&ST=1
>
>
> -
> 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: Bean Tag question

2004-01-14 Thread Ben Anderson
you can't have a tag as an attribute for another tag.  How bout this?




From: "Henrique VIECILI" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: Bean Tag question
Date: Wed, 14 Jan 2004 16:14:49 -0300
Hi,

I am trying to access a bean property inside the arg0 attribute of 
bean:message
tag, is that possible using only the standard taglibs? How?

I´ve tried this code bellow and it didn´t work:

" />
Henrique

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
There are now three new levels of MSN Hotmail Extra Storage!  Learn more. 
http://join.msn.com/?pgmarket=en-us&page=hotmail/es2&ST=1

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


Bean Tag question

2004-01-14 Thread Henrique VIECILI
Hi,

I am trying to access a bean property inside the arg0 attribute of bean:message
tag, is that possible using only the standard taglibs? How?

I´ve tried this code bellow and it didn´t work:

" />

Henrique


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



Re: tag question

2003-10-31 Thread Jim Kennedy
I figured it out.  It's actually set to the name of the form-bean.  And I
can live with that.

Jim Kennedy
IT Consultant
Mobile Phone: 813-503-1484
-


- Original Message -
From: "Ruth, Brice" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, October 31, 2003 11:22 AM
Subject: Re:  tag question


> The "name" attribute on the HTML generated by  is
> automatically set to the name of the action that will be receiving the
> form input, if I'm not mistaken. So, in your case, it would be named
> "doit", if I'm not mistaken. This, I believe, is done to support
> validation through javascript.
>
> Jim Kennedy wrote:
>
> >Here's my standard html form tag:
> >
> >
> >
> >
> >
> >I need to be able to "name" my form in my application.  How do I do that
> >with the "el" form tag.  It is not this:
> >
> >
> >
> >
> >
> >
> >
> >name has another meaning for this tag.  what is the equivalent for name
in a
> >standard HTML form tag?
> >
> >
> >
> >thanks
> >
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
> --
> Brice D. Ruth
> Sr. IT Analyst
> Fiskars Brands, Inc.
>
>
>
> -
> 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: tag question

2003-10-31 Thread Ruth, Brice
The "name" attribute on the HTML generated by  is 
automatically set to the name of the action that will be receiving the 
form input, if I'm not mistaken. So, in your case, it would be named 
"doit", if I'm not mistaken. This, I believe, is done to support 
validation through javascript.

Jim Kennedy wrote:

Here's my standard html form tag:





I need to be able to "name" my form in my application.  How do I do that
with the "el" form tag.  It is not this:






name has another meaning for this tag.  what is the equivalent for name in a
standard HTML form tag?


thanks



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

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.


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


tag question

2003-10-31 Thread Jim Kennedy


Here's my standard html form tag:





I need to be able to "name" my form in my application.  How do I do that
with the "el" form tag.  It is not this:







name has another meaning for this tag.  what is the equivalent for name in a
standard HTML form tag?



thanks



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



RE: Struts Tag Question

2003-08-29 Thread Hue Holleran
Hi David,

Be aware that struts will use " to delimit the href attribute, so try:

test

Hue.

> -Original Message-
> From: David Erickson [mailto:[EMAIL PROTECTED]
> Sent: 28 August 2003 22:57
> To: Struts Mailing List
> Subject: Struts Tag Question
>
>
> Here is the code I'm trying to get to work:
>
>  href="javascript:Start(${indexedBean.id})">test
>  but what I need are double quotes around the ${indexedBean.id}
> part.  I've
> tried using both " and \" both seem to not work because the link ends
> up stopping at wherever I insert that at.. for example if I try:
>
>
>
>  href="javascript:Start(\"${indexedBean.id})">test
>
> the link when moused over shows: javascript:Start(
>
> same thing if I try " instead of \"
>
> any ideas?
>
> Thanks!
>
> -David
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003


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



Re: Struts Tag Question

2003-08-28 Thread Mark Lowe
single quotes may be what you want. But this is less tourtured

')">...

cheers mark



On Thursday, August 28, 2003, at 10:57 PM, David Erickson wrote:

Here is the code I'm trying to get to work:

test
 but what I need are double quotes around the ${indexedBean.id} part.  
I've
tried using both " and \" both seem to not work because the link 
ends
up stopping at wherever I insert that at.. for example if I try:



test
the link when moused over shows: javascript:Start(

same thing if I try " instead of \"

any ideas?

Thanks!

-David

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


Struts Tag Question

2003-08-28 Thread David Erickson
Here is the code I'm trying to get to work:

testtest

the link when moused over shows: javascript:Start(

same thing if I try " instead of \"

any ideas?

Thanks!

-David


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



Re: Newbie Nested Tag Question

2003-08-15 Thread Lynda Brown
Thanks for the suggestion, late last night I finally found my problem.  I needed to 
delete the old nested-tags.jar file from my libs folder. When I downloaded the 
keyboard monkey tutorial it came with that jar file - but since I am using Struts 1.1 
- I don't need it and it actually causes problems. It is such a silly error - but 
really hard to track down. Anyways thanks again.
   Lynda

Adam Hardy <[EMAIL PROTECTED]> wrote:
Hi Lynda,
your code looks fine, I can't see anything wrong with it. From the 
exception message it seems that the nested iterate tag is looking for 
something in the page context but is providing a null name for it - I 
assume it is looking for the form bean. You don't include your form tag 
- perhaps something is wrong there?

Adam

On 08/14/2003 06:37 PM Lynda Brown wrote:
> I am having trouble implementing the nested tags. I have downloaded and completed 
> the Keyboard Monkey tutorial and everything ran smoothly, but when I try and 
> implement the tags in my program I am having problems. The following code using the 
> logic tags works correctly and displays the desired information. The code using the 
> nested tags results in the Null Pointer Exception that follows. The property names 
> are different, but refer to the same variable, one returns the information as an 
> ArrayList and the other as and Object[] as shown below. If anyone has some ideas I 
> would really appreciate them!!
> 
> 
> 
> Thanks, 
> 
> Lynda
> 
> 
> 
> 
> 
> public ArrayList getBundleDetail() {return bundleDetail ;}
> 
> public Object[] getBundleDetailList() {return bundleDetail.toArray() ;}
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> java.lang.NullPointerException: Null attribute name at 
> org.apache.jasper.runtime.PageContextImpl.findAttribute(PageContextImpl.java:417) at 
> org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:813) at 
> org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:873) at 
> org.apache.struts.taglib.logic.IterateTag.doStartTag(IterateTag.java:277) at 
> org.apache.struts.taglib.nested.logic.NestedIterateTag.doStartTag(Unknown Source) at 
> org.apache.jsp.OrderSales2022L_jsp._jspx_meth_nested_iterate_0(OrderSales2022L_jsp.java:670)
>  at 
> org.apache.jsp.OrderSales2022L_jsp._jspx_meth_html_form_0(OrderSales2022L_jsp.java:337)
>  at 
> org.apache.jsp.OrderSales2022L_jsp._jspx_meth_html_html_0(OrderSales2022L_jsp.java:123)
>  at org.apache.jsp.OrderSales2022L_jsp._jspService(OrderSales2022L_jsp.java:91) at 
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136) 
> 
> 
> 
> -
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software

-- 
struts 1.1 + tomcat 4.1.27 + java 1.4.2
Linux 2.4.20 RH9


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



-
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

Re: Newbie Nested Tag Question

2003-08-15 Thread Adam Hardy
Hi Lynda,
your code looks fine, I can't see anything wrong with it. From the 
exception message it seems that the nested iterate tag is looking for 
something in the page context but is providing a null name for it - I 
assume it is looking for the form bean. You don't include your form tag 
- perhaps something is wrong there?

Adam

On 08/14/2003 06:37 PM Lynda Brown wrote:
I am having trouble implementing the nested tags.  I have downloaded and completed the Keyboard Monkey tutorial and everything ran smoothly, but when I try and implement the tags in my program I am having problems.  The following code using the logic tags works correctly and displays the desired information.  The code using the nested tags results in the Null Pointer Exception that follows.  The property names are different, but refer to the same variable, one returns the information as an ArrayList and the other as and Object[] as shown below. If anyone has some ideas I would really appreciate them!!

 

Thanks,  

Lynda

 

 

public ArrayList getBundleDetail()   {return bundleDetail  ;}

public Object[] getBundleDetailList()   {return bundleDetail.toArray()  ;}

 

 





 









 

 

 

 



 







 





java.lang.NullPointerException: Null attribute name at   org.apache.jasper.runtime.PageContextImpl.findAttribute(PageContextImpl.java:417) at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:813) at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:873) at org.apache.struts.taglib.logic.IterateTag.doStartTag(IterateTag.java:277) at org.apache.struts.taglib.nested.logic.NestedIterateTag.doStartTag(Unknown Source) at org.apache.jsp.OrderSales2022L_jsp._jspx_meth_nested_iterate_0(OrderSales2022L_jsp.java:670) at org.apache.jsp.OrderSales2022L_jsp._jspx_meth_html_form_0(OrderSales2022L_jsp.java:337) at org.apache.jsp.OrderSales2022L_jsp._jspx_meth_html_html_0(OrderSales2022L_jsp.java:123) at org.apache.jsp.OrderSales2022L_jsp._jspService(OrderSales2022L_jsp.java:91) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136) 



-
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
--
struts 1.1 + tomcat 4.1.27 + java 1.4.2
Linux 2.4.20 RH9
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Iterate Tag Question

2003-08-15 Thread Jones, Marty B.
Matt,

Yes it does.  I was hoping to get rid of scriplets if possible.  I cannot
use JSTL yet because our jsp container does not support the jsp 1.2 spec.
(Jrun 3.1).  We are going to migrate to Jrun 4 soon which supports the jsp
1.2 spec so I will be able to use JSTL then.  Guess I will have to use
scriplets until
then.

Thanks,

Marty

-Original Message-
From: Sgarlata Matt [mailto:[EMAIL PROTECTED]
Sent: Friday, August 15, 2003 11:02 AM
To: Struts Users Mailing List
Subject: Re: Iterate Tag Question


You can implement this just as you would in any other programming 
environment: by saving the previous and the current value in different 
variables.  You can do this using scriptlets, as I see you doing here. 
You can also do this using the JSTL (for more info, see the Jakarta 
Taglibs project), which you may find a little easier to work with once 
you get the hang of it.

Does that answer your question?

Matt

Jones, Marty B. wrote:

> Does anyone have any suggestions on how I can compare the previous
object's
> parameters to determine when my object's category has changed?
> 
> -Original Message-
> From: Jones, Marty B. 
> Sent: Friday, August 15, 2003 7:07 AM
> To: [EMAIL PROTECTED]
> Subject: Iterate Tag Question
> 
> 
> I am using an iterate tag to iterate over a List of items that have a
given
> category.  I need to be able to determine when a given category has
changed
> when iterating and push out a header row in a table that I am generating.
> Is there a way that I can look back a row or save the category from the
> previous row so that I can compare it with the current row to determine
> whether or not a category break has occurred.   Here is a snippet of my
> code:
> 
> 
> <%
> String previousCategory = "";
> %>
> 
>  frame="hsides">
>   
>   Filename
>   Description
>   
>indexId="index">
>value="<%=previousCategory%>">
>   
>class="groupBreak"> property="categoryDesc"/> property="categoryName"/>">  
>   
>   
>   
>src="/images/common/spacer.gif" width="15" height="10">
>href="documentsandfiles?fileId= property="fileId"/>"> property="fileName"/>
>   
>   
>property="description"/>
>   
>   
>   <% previousCategory =
> ((DbFileInfo)currElement).getCategoryName();  %>  
>   
>   
> 
> 
> The way that I am attempting it from above is not working, the notEqual
tag
> is not seeing that the strings are equal.  I would like to be able to get
> all the scriplets out of the jsp if possible.
> 
> Any suggestions would be appreciated.
> 
> Marty B. Jones
> Senior Software Engineer
> DailyAccess.Com
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


-
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: Iterate Tag Question

2003-08-15 Thread Sgarlata Matt
You can implement this just as you would in any other programming 
environment: by saving the previous and the current value in different 
variables.  You can do this using scriptlets, as I see you doing here. 
You can also do this using the JSTL (for more info, see the Jakarta 
Taglibs project), which you may find a little easier to work with once 
you get the hang of it.

Does that answer your question?

Matt

Jones, Marty B. wrote:

Does anyone have any suggestions on how I can compare the previous object's
parameters to determine when my object's category has changed?
-Original Message-
From: Jones, Marty B. 
Sent: Friday, August 15, 2003 7:07 AM
To: [EMAIL PROTECTED]
Subject: Iterate Tag Question

I am using an iterate tag to iterate over a List of items that have a given
category.  I need to be able to determine when a given category has changed
when iterating and push out a header row in a table that I am generating.
Is there a way that I can look back a row or save the category from the
previous row so that I can compare it with the current row to determine
whether or not a category break has occurred.   Here is a snippet of my
code:
<%
String previousCategory = "";
%>


Filename
Description




">   




">





<% previousCategory =
((DbFileInfo)currElement).getCategoryName();%>   

  
The way that I am attempting it from above is not working, the notEqual tag
is not seeing that the strings are equal.  I would like to be able to get
all the scriplets out of the jsp if possible.
Any suggestions would be appreciated.

Marty B. Jones
Senior Software Engineer
DailyAccess.Com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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


RE: Iterate Tag Question

2003-08-15 Thread Jones, Marty B.
Does anyone have any suggestions on how I can compare the previous object's
parameters to determine when my object's category has changed?

-Original Message-
From: Jones, Marty B. 
Sent: Friday, August 15, 2003 7:07 AM
To: [EMAIL PROTECTED]
Subject: Iterate Tag Question


I am using an iterate tag to iterate over a List of items that have a given
category.  I need to be able to determine when a given category has changed
when iterating and push out a header row in a table that I am generating.
Is there a way that I can look back a row or save the category from the
previous row so that I can compare it with the current row to determine
whether or not a category break has occurred.   Here is a snippet of my
code:


<%
String previousCategory = "";
%>



Filename
Description




">




">





<% previousCategory =
((DbFileInfo)currElement).getCategoryName();%>  




The way that I am attempting it from above is not working, the notEqual tag
is not seeing that the strings are equal.  I would like to be able to get
all the scriplets out of the jsp if possible.

Any suggestions would be appreciated.

Marty B. Jones
Senior Software Engineer
DailyAccess.Com


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

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



Iterate Tag Question

2003-08-15 Thread Jones, Marty B.
I am using an iterate tag to iterate over a List of items that have a given
category.  I need to be able to determine when a given category has changed
when iterating and push out a header row in a table that I am generating.
Is there a way that I can look back a row or save the category from the
previous row so that I can compare it with the current row to determine
whether or not a category break has occurred.   Here is a snippet of my
code:


<%
String previousCategory = "";
%>



Filename
Description




">




">





<% previousCategory =
((DbFileInfo)currElement).getCategoryName();%>  




The way that I am attempting it from above is not working, the notEqual tag
is not seeing that the strings are equal.  I would like to be able to get
all the scriplets out of the jsp if possible.

Any suggestions would be appreciated.

Marty B. Jones
Senior Software Engineer
DailyAccess.Com


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



Html tag question

2003-08-14 Thread Jones, Marty B.
I have an array of Project objects that are stored within a ActionForm class
(say ShowFileDiffsForm).

I have a getter and setter on the ShowFileDiffsForm:
Project[] getProjects()
void setProjects(Project[] projects)

The Project object itself has the attributes:
int id;
String name

My question is how can I build a logic:iterate tag to iterate over the array
of project objects.?

Here is what I have so far


   []


The one thing that I don't know how to do is to write the name and the
project id out for each iteration.  ]

Can anyone shed any light on this?



Marty B. Jones
Senior Software Engineer
DailyAccess.Com


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



Re: [OFF TOPIC] JavaScript + tag question

2003-08-14 Thread Brian Lee
The line I wrote doesn't reference the value property of the select, it 
references the value property of the selected option.

I could have also written:
document.formname.selectelementname.options[document.formname.selectelementname.selectedIndex].value
but I saved a couple of bytes since a select has a collection of options you 
can leave off the .options and just use [i].

document.formname.elementname works in both ie (since 3 or 4) and moz so I 
use it. Moz usually keeps pretty good kosher in regards to the w3c 
standards.

BAL
From: Adam Hardy <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: Struts Users Mailing List <[EMAIL PROTECTED]>
Subject: Re: [OFF TOPIC] JavaScript +  tag question
Date: Wed, 06 Aug 2003 17:10:40 +0200
Might be OT, but I still think the selectbox element doesn't have a value 
property - only an options collection, so -

x = document.forms[0].elements[anySelectbox].selectedIndex;
item = document.forms[0].elements[anySelectbox].options[x].value
BTW do you know if using the name directly as in

document.formname.selectelementname

is kosher W3C?

Adam

Brian Lee wrote:
The line you want will look like this:
document.formname.selectelementname[document.formname.selectelementname.selectedIndex].value
BAL


From: "Mark Galbreath" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Subject: RE: [OFF TOPIC] JavaScript +  tag question
You may be right - might have to use the .index property instead.

-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 06, 2003 9:19 AM
To: Struts Users Mailing List
Subject: Re: [OFF TOPIC] JavaScript +  tag question
I believe that document.forms[0].elements[anySelectbox].value will be
invalid. .value only works on non-select form-elements. AFAIK without
testing it now.
Mark Galbreath wrote:
> If you read the API you will see that JavaScript functions are built
> into the Struts  tag:
>
> http://jakarta.apache.org/struts/userGuide/struts-html.html#select
>
> so you have several event handlers to use for transferring control.
> E.g., 
>
>  ].value";
> var selected = string;
> location = "/search.do?action=" + docObject + "&selectedItem=" +
string;
>   }
> 
>
> And map an action path for "search.do" in your struts-config.xml file.
>
> Mark
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, August 06, 2003 7:37 AM
>
> I would like to do the following :
>
> I have a form with different fields and drop down boxes
> When A drop down box is selectd I would like to do a submit that looks
> more or less like this :
>
> submit=/search.do?action=dropdownbox1&selectedItem=item
>
>
>
> -
> 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]
_
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail

-
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]
_
Add photos to your e-mail with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail

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


Newbie Nested Tag Question

2003-08-14 Thread Lynda Brown

I am having trouble implementing the nested tags.  I have downloaded and completed the 
Keyboard Monkey tutorial and everything ran smoothly, but when I try and implement the 
tags in my program I am having problems.  The following code using the logic tags 
works correctly and displays the desired information.  The code using the nested tags 
results in the Null Pointer Exception that follows.  The property names are different, 
but refer to the same variable, one returns the information as an ArrayList and the 
other as and Object[] as shown below. If anyone has some ideas I would really 
appreciate them!!

 

Thanks,  

Lynda

 

 

public ArrayList getBundleDetail()   {return bundleDetail  ;}

public Object[] getBundleDetailList()   {return bundleDetail.toArray()  ;}

 

 





 









 

 

 

 



 





  
  

 





java.lang.NullPointerException: Null attribute name at   
org.apache.jasper.runtime.PageContextImpl.findAttribute(PageContextImpl.java:417) at 
org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:813) at 
org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:873) at 
org.apache.struts.taglib.logic.IterateTag.doStartTag(IterateTag.java:277) at 
org.apache.struts.taglib.nested.logic.NestedIterateTag.doStartTag(Unknown Source) at 
org.apache.jsp.OrderSales2022L_jsp._jspx_meth_nested_iterate_0(OrderSales2022L_jsp.java:670)
 at 
org.apache.jsp.OrderSales2022L_jsp._jspx_meth_html_form_0(OrderSales2022L_jsp.java:337)
 at 
org.apache.jsp.OrderSales2022L_jsp._jspx_meth_html_html_0(OrderSales2022L_jsp.java:123)
 at org.apache.jsp.OrderSales2022L_jsp._jspService(OrderSales2022L_jsp.java:91) at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136) 



-
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

Re: [OFF TOPIC] JavaScript + tag question

2003-08-14 Thread Adam Hardy
I'd write some sort of function and call it from the event.

onchange="submitFromDropdown(this)"

and your function should be something like this:

submitFromDropdown(dropdown)
{
//'this' == dropdown field object
var fieldName = dropdown.name;
var len = dropdown.options.length;
var item = '';
for (i = 0; i < len; i++) {
if (dropdown.options[i].selected)
item = dropdown.options[i].value;
}
var url = "/search.do?action=" + fieldName
+ "&selectedItem=" + item;
dropdown.form.action = url;
dropdown.form.submit();
}
I changed the code from my working code - usual disclaimers apply. You 
might need to debug it a little, but that's easy too.

Adam

Todor Sergueev Petkov wrote:
I am not very profficient in JavaScript so any help would be appreciated
:
I would like to do the following :

I have a form with different fields and drop down boxes
When A drop down box is selectd I would like to do a submit that looks
more or less like this :
			submit=/search.do?action=dropdownbox1&selectedItem=item

I would like to do this because I need the action parameter for my
DispatchAction class and the selectedItem obviously to know what the
selection is.
Is there a way to perform this inside a struts select tags event useing
JavaScriptIf so can you give me an example ( short code snippet
maybe ).
Thanks,
Todor
-
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: bean tag question

2003-08-14 Thread Jones, Marty B.
Good Idea Paul.  That sounds like the best and simpliest solution.

-Original Message-
From: Paul McCulloch [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 05, 2003 10:28 AM
To: 'Struts Users Mailing List'
Subject: RE: bean tag question


Can't you define a new class which wraps the project and provides getters
for the properties you are interested in?

Paul

-Original Message-
From: Jones, Marty B. [mailto:[EMAIL PROTECTED]
Sent: 05 August 2003 14:41
To: [EMAIL PROTECTED]
Subject: bean tag question


Does anyone know if the bean tag will allow you to pull a value from a class
that does not have getter or setter methods on the instance attributes?
Here is the scenerio that I have.

I have a ActionForm that has an array of Project objects.  The actionForm
has a getter and setter for the array of Project Objects.  The project
object itself is nothing more than a structure that has id and name
attributes. There are no methods within the Project object itself.  What I
need to do is iterate through the array of Project objects and pull the id
and name from each project.  I can iterate through the array of Projects
fine but when I attempt to get the id and name attribute from the Project it
fails stating that there is no get method for them.  

Does anyone know of a work around for this?  I can't modify the Project
object because it is automatically generated Stub class that is generated
from an application server and it would be overwritten the next time I
generate stubs for this component.

Any help would be greatly appreciated.


Marty B. Jones
Senior Software Engineer
DailyAccess.Com


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

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



RE: Html tag question

2003-08-14 Thread Jones, Marty B.
nagi,
 
thanks for the input.  I tried what you suggested and I get the following
error:
 
 
No getter method for property name of bean element' 
 

-Original Message-
From: Nagendra Kumar O V S [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 05, 2003 7:21 AM
To: [EMAIL PROTECTED]
Subject: Re: Html tag question





 []


-- nagi
 
---Original Message---
 
From: Struts Users Mailing  <mailto:[EMAIL PROTECTED]> List
Date: Tuesday, August 05, 2003 05:34:45 PM
To: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
Subject: Html tag question
 
I have an array of Project objects that are stored within a ActionForm class
(say ShowFileDiffsForm).

I have a getter and setter on the ShowFileDiffsForm:
Project[] getProjects()
void setProjects(Project[] projects)

The Project object itself has the attributes:
int id;
String name

My question is how can I build a logic:iterate tag to iterate over the array
of project objects.?

Here is what I have so far


 []


The one thing that I don't know how to do is to write the name and the
project id out for each iteration. ]

Can anyone shed any light on this?



Marty B. Jones
Senior Software Engineer
DailyAccess.Com


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


.



 <http://www.incredimail.com/redir.asp?ad_id=309&lang=9>   IncrediMail -
Email has finally evolved -
<http://www.incredimail.com/redir.asp?ad_id=309&lang=9> Click Here 



RE: bean tag question

2003-08-14 Thread Paul McCulloch
Can't you define a new class which wraps the project and provides getters
for the properties you are interested in?

Paul

-Original Message-
From: Jones, Marty B. [mailto:[EMAIL PROTECTED]
Sent: 05 August 2003 14:41
To: [EMAIL PROTECTED]
Subject: bean tag question


Does anyone know if the bean tag will allow you to pull a value from a class
that does not have getter or setter methods on the instance attributes?
Here is the scenerio that I have.

I have a ActionForm that has an array of Project objects.  The actionForm
has a getter and setter for the array of Project Objects.  The project
object itself is nothing more than a structure that has id and name
attributes. There are no methods within the Project object itself.  What I
need to do is iterate through the array of Project objects and pull the id
and name from each project.  I can iterate through the array of Projects
fine but when I attempt to get the id and name attribute from the Project it
fails stating that there is no get method for them.  

Does anyone know of a work around for this?  I can't modify the Project
object because it is automatically generated Stub class that is generated
from an application server and it would be overwritten the next time I
generate stubs for this component.

Any help would be greatly appreciated.


Marty B. Jones
Senior Software Engineer
DailyAccess.Com


-
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: [OFF TOPIC] JavaScript + tag question

2003-08-10 Thread Mark Lowe