RE: DynaActionForm and JSTL (was RE: DynaActionForm Advantages)

2002-07-09 Thread Jennings, Christofer J.

My mistake. I was thinking DynaActionForm is a Map.

It'd be a shame to not be able to use JSTL and DynaActionForm together (I
think). As a general question, How much work would it be to have a
MappedDynaActionForm subclassing DynaActionForm as an optional base class
for our forms?

,boz

-Original Message-
From: Joe Germuska [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 09, 2002 8:43 AM
To: Struts Users Mailing List
Subject: Re: DynaActionForm and JSTL (was RE: DynaActionForm Advantages)


This would only work if ${form} implemented the Map interface.

Making the DynaBean interface extend the Map interface seems like a 
lot of overkill considering the number of places people might want to 
use it that have nothing to do with the JSTL...

Maybe you could make a case for having DynaActionForm implement Map, 
with a bunch of unsupported operations and delegating to the values 
hash otherwise.  It's still kind of cluttered, but at least it's off 
in Struts serving a specific need, instead of in beanutils.

Joe


At 8:19 AM -0700 2002/07/09, Jennings, Christofer J. wrote:
>Looking at the JSTL 1.0 specification, section 3.3, leads me to believe
that
>DynaActionForm "properties" can be accessed through the JSTL EL but with a
>different syntax than a regular JavaBean property.
>
>Example:
>   Regular JavaBean (e.g., ActionForm) EL syntax:
>   
>   
>   Map (e.g., DynaActionForm) EL syntax:
>   
>   
>
>If anyone has done this sort of thing I'd sure like to know how it works.
>Especially how/if accessing "aSubProperty".
>
>I'm stuck using a container that can't support JSTL and I'm also not using
>Struts 1.1 yet either so I can't confirm any of this.
>
>,
>boz
>
>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>Sent: Monday, July 08, 2002 6:19 PM
>To: [EMAIL PROTECTED]
>Subject: RE: DynaActionForm Advantages
>
>
>But are DynaActionForm's compatible with JSTL?
>
>A discussion on taglibs-user made me think not:
>http://marc.theaimsgroup.com/?l=taglibs-user&m=102433015725228&w=2
>
>Eddie


-- 
--
* Joe Germuska{ [EMAIL PROTECTED] }
"It's pitiful, sometimes, if they've got it bad. Their eyes get 
glazed, they go white, their hands tremble As I watch them I 
often feel that a dope peddler is a gentleman compared with the man 
who sells records."
--Sam Goody, 1956
tune in posse radio: <http://www.live365.com/stations/289268>

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



DynaActionForm and JSTL (was RE: DynaActionForm Advantages)

2002-07-09 Thread Jennings, Christofer J.

Looking at the JSTL 1.0 specification, section 3.3, leads me to believe that
DynaActionForm "properties" can be accessed through the JSTL EL but with a
different syntax than a regular JavaBean property.

Example:
Regular JavaBean (e.g., ActionForm) EL syntax:


Map (e.g., DynaActionForm) EL syntax:



If anyone has done this sort of thing I'd sure like to know how it works.
Especially how/if accessing "aSubProperty".

I'm stuck using a container that can't support JSTL and I'm also not using
Struts 1.1 yet either so I can't confirm any of this. 

,
boz

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 08, 2002 6:19 PM
To: [EMAIL PROTECTED]
Subject: RE: DynaActionForm Advantages


But are DynaActionForm's compatible with JSTL?

A discussion on taglibs-user made me think not:
http://marc.theaimsgroup.com/?l=taglibs-user&m=102433015725228&w=2

Eddie



Number formatters for form fields?

2002-06-25 Thread Jennings, Christofer J.

Is there a way to assign a number formatter to a field? I have an int field
the should display as 4 digits with leading zeros, like 0020 instead of 20. 

It would be nice to use a formatter instead of String conversions (I think).

???,
boz



RE: with parametric replacement in Struts 1.0.2

2002-06-20 Thread Jennings, Christofer J.

Aahaah! Braces do the trick. Thanks Dave and Chris!

-Original Message-
From: Bartley, Chris P [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 20, 2002 8:50 AM
To: 'Struts Users Mailing List'
Subject: RE:  with parametric replacement in Struts 1.0.2


Change the line in ApplicationResources.properties to instead read:

   note.range=We only go between {0} and {1}.

That is, you should have braces ('{' and '}') around the ints instead of
parens.

chris

> -----Original Message-----
> From: Jennings, Christofer J. [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 20, 2002 9:55 AM
> To: 'Struts Users Mailing List'
> Subject:  with parametric replacement in Struts 1.0.2
> 
> 
> Does parametric replacement work in Struts 1.0.2?
> 
> This code isn't working
> 
> [ApplicationResources.properties]
> note.range=We only go between (0) and (1).
> 
> [MyConstants.java]
> public static final int FIRST = 10;
> public static final int LAST  = 12;
> 
> [myPage.jsp]
> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
> <%@ page import="myApp.Constants" %>
>arg0="<%= String.valueOf(Constants.FIRST) %>" 
>   arg1="<%= String.valueOf(Constants.LAST) %>" />
> 
> ... the result is "We only go between (0) and (1)."
> 
> Any clues?
> 
> Thanks,
> boz
> 

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



RE: could anyone suggest an example to use tabs in a struts application

2002-06-11 Thread Jennings, Christofer J.

The equal and notEqual tags do the parameter check.

-Original Message-
From: Akash Munjal [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 11, 2002 12:01 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: could anyone suggest an example to use tabs in a struts
application


Thanks how do i read the value of the parameter tabhead.focus in the
tabhead.jsp snippet?

>>> [EMAIL PROTECTED] 06/11/02 01:34PM >>>
I've found the following to work well and simply.

== TabHead.jsp start snip 



  
  
 
  
  
 
  
  



== TabHead.jsp end snip ==

== Search.jsp start snip =


  


... rest of page

== Search.jsp end snip ===

Make sense?,
boz

-Original Message-
From: Akash Munjal [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, June 11, 2002 9:16 AM
To: [EMAIL PROTECTED] 
Subject: could anyone suggest an example to use tabs in a struts
application


hi,
 Could anyone suggest any working examples/tips  on how to go about using
tabs in a struts application. What is the best way to carry out the UI
design using tabs.
thanks,
akash.


--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:

For additional commands, e-mail:




RE: could anyone suggest an example to use tabs in a struts application

2002-06-11 Thread Jennings, Christofer J.

I've found the following to work well and simply.

== TabHead.jsp start snip 



  
  
 
  
  
 
  
  



== TabHead.jsp end snip ==

== Search.jsp start snip =


  


... rest of page

== Search.jsp end snip ===

Make sense?,
boz

-Original Message-
From: Akash Munjal [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 11, 2002 9:16 AM
To: [EMAIL PROTECTED]
Subject: could anyone suggest an example to use tabs in a struts
application


hi,
 Could anyone suggest any working examples/tips  on how to go about using
tabs in a struts application. What is the best way to carry out the UI
design using tabs.
thanks,
akash.


--
To unsubscribe, e-mail:

For additional commands, e-mail:




RE: No getter error

2002-06-10 Thread Jennings, Christofer J.

I should've been more specific. I'm using Struts 1.0.2.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 10, 2002 6:24 AM
To: Struts Users Mailing List
Subject: RE: No getter error



I believe these issues are centered around the switch to using the Jakarta
Commons bean utilities that occured (I believe) with the Struts 1.1b.

The code is in the package org.apache.commons.beanutils - the javadoc is
on-line in the Jakarte Commons area.

Craig pulled a bunch of the bean population stuff out, made it more
generic, added a bunch of automatic type-conversions, etc. Then he put it
over in the Commons area so it can be used by a bunch of other Jakarta
subprojects.

The docs on all this are still a bit lean - but the code is solid. It makes
it simpler to have form bean properties of all different types.




"Jennings, Christofer J." <[EMAIL PROTECTED]> on 06/10/2002
09:22:10 AM

Please respond to "Struts Users Mailing List"
  <[EMAIL PROTECTED]>

To:   "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
cc:(bcc: Kevin Bedell/Systems/USHO/SunLife)
Subject:  RE: No getter error



I had this happen with the logic:equal tag. I wanted to compare a boolean
value and the documentation makes no mention of boolean conversion so I
made
my getter return a String, but had two setters: one receiving a boolean and
the other a String. My gut feeling is that the two setters somehow confused
the bean. The fix was to only have one setter receiving a boolean, and one
getter returning a boolean. The bean _does_ handle the conversion perfectly
... but I still can't seem to find it in the docs (sigh).


Hope this is of some use,
boz

-Original Message-
From: Sri Sankaran [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 07, 2002 1:09 PM
To: Struts-User (E-mail)
Subject: No getter error



  What would cause a 'no getter in bean' error when the said form bean
_does_ indeed have a (public) getter for the named property?

Sri

--
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: No getter error

2002-06-10 Thread Jennings, Christofer J.

I had this happen with the logic:equal tag. I wanted to compare a boolean
value and the documentation makes no mention of boolean conversion so I made
my getter return a String, but had two setters: one receiving a boolean and
the other a String. My gut feeling is that the two setters somehow confused
the bean. The fix was to only have one setter receiving a boolean, and one
getter returning a boolean. The bean _does_ handle the conversion perfectly
... but I still can't seem to find it in the docs (sigh).

Hope this is of some use,
boz

-Original Message-
From: Sri Sankaran [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 07, 2002 1:09 PM
To: Struts-User (E-mail)
Subject: No getter error



  What would cause a 'no getter in bean' error when the said form bean
_does_ indeed have a (public) getter for the named property?

Sri

--
To unsubscribe, e-mail:

For additional commands, e-mail:




RE: Assertions

2002-06-06 Thread Jennings, Christofer J.

Very good reasons! I'd sure like to see this feature supported as you
describe. 
It might also be nice to have global asserts for things like user 
authentication/authorization.

-Original Message-
From: Robert Taylor [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 8:07 AM
To: Struts Users Mailing List
Subject: RE: Assertions


Yep, that may be the approach I take although it circumvents the front
controller. Not necessarily a bad thing. It just disperses business logic,
configuratin, and, in event that the assertion fails, navigation logic. It
would be nice to have this all reside within the front controller and
configurable via one source (the struts-config file).

robert



> -Original Message-
> From: Jennings, Christofer J. [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 06, 2002 10:26 AM
> To: 'Struts Users Mailing List'
> Subject: RE: Assertions
>
>
> How about using filters?



RE: Assertions

2002-06-06 Thread Jennings, Christofer J.

How about using filters?

-Original Message-
From: Robert Taylor [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 7:12 AM
To: [EMAIL PROTECTED]
Subject: Assertions

1. Assertions that are common to all events.
2. Assertions that are common to a set of related events.
3. Assertions that are specific to an event.



RE: Form action based on bean presence

2002-05-10 Thread Jennings, Christofer J.

Thanks much.

-Original Message-
From: Bartley, Chris P [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 10, 2002 9:48 AM
To: 'Struts Users Mailing List'
Subject: RE: Form action based on bean presence


Although i prefer Craig's approach of letting a common action decide what to
do, yet another alternative is something like this (which i haven't tested,
but should work assuming i didn't screw up the syntax):


   


   


...



   ...



That way, you don't have to duplicate the entire form.

chris

> -Original Message-
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> Sent: Friday, May 10, 2002 11:34 AM
> To: Struts Users Mailing List
> Subject: Re: Form action based on bean presence
> 
> 
> 
> 
> On Fri, 10 May 2002, Jennings, Christofer J. wrote:
> 
> > Date: Fri, 10 May 2002 09:18:59 -0700
> > From: "Jennings, Christofer J." <[EMAIL PROTECTED]>
> > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
> > Subject: Form action based on bean presence
> >
> > I'd like to set a form's action based on the presence of an 
> bean. The code
> > below fails during compile at the first  
> tag, saying that it
> > is a mismatch.
> >
> >  start snip ---
> > 
> > 
> > 
> > 
> > 
> > 
> >
> > ...
> >
> > 
> >  stop snip 
> >
> > My gut feeling is that I would have to nest the whole form 
> block in each
> > logic block to make this work. ... Right or wrong?
> >
> 
> Yep ... your approach above violates the tag nesting 
> constraints of markup
> language like HTML and XML.
> 
> > I really don't want to nest the form like that because it 
> would make too
> > much code duplication. For the time being I've set the form 
> to default to
> > one option then switch it if needed in a JavaScript 
> function. That works but
> > seems ugly. Is there a better option?
> >
> 
> Two other approaches:
> 
> * Use JavaScript to change the destination on the client side
> 
> * Submit the form to a common Action and let *it* decide what to do.
> 
> > Thanks,
> > boz
> >
> 
> Craig
> 
> 
> 
> --
> 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]>



Form action based on bean presence

2002-05-10 Thread Jennings, Christofer J.

I'd like to set a form's action based on the presence of an bean. The code
below fails during compile at the first  tag, saying that it
is a mismatch.

 start snip ---







...


 stop snip 

My gut feeling is that I would have to nest the whole form block in each
logic block to make this work. ... Right or wrong?

I really don't want to nest the form like that because it would make too
much code duplication. For the time being I've set the form to default to
one option then switch it if needed in a JavaScript function. That works but
seems ugly. Is there a better option?

Thanks,
boz



RE: Action without a form.

2002-04-15 Thread Jennings, Christofer J.

Does this result in null being passed for the ActionForm parameter of
perform?

,boz

-Original Message-
From: Leonardo Maciel [mailto:[EMAIL PROTECTED]]

I don't use form here.


 

 




Action without a form.

2002-04-15 Thread Jennings, Christofer J.

I'd like to have an action without an associated form. Any suggestions?

Many thanks,
boz



RE: How to compare a notNull string with the nullString!

2002-03-22 Thread Jennings, Christofer J.

I came across this yesterday. Here's what I found. If a bean exists with a
null field, doing a logic:present on the field return true and comparing it
(e.g., using logic:equals) gets a NullPointerException.

If there is a custom tag to check for null values I'd love to know it.

I think this may be what Pitbull is after too, yes? Or do you really want to
campare with an empty string ""?

,boz

-Original Message-
From: Dimitar Stavrakov [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 21, 2002 2:52 PM
To: 'Struts Users Mailing List'
Subject: RE: How to compare a notNull string with the nullString!


Try using the present tag ex:



Regards, 
Dimitar

-Original Message-
From: Struts Newsgroup [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, March 21, 2002 9:25 AM
To: [EMAIL PROTECTED]
Subject: How to compare a notNull string with the nullString!

Subject: How to compare a notNull string with the nullString!
From: "PitBull" <[EMAIL PROTECTED]>
 ===
Hi all

i'ld like to compare

and it not work. I tried to use the tag
 but this logic command is for the
struts 1.1 and i did not find the 1.1 version libraries.
Can any one help me?

Thanx

TT





--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:

For additional commands, e-mail:




Best practice for using constants

2002-03-21 Thread Jennings, Christofer J.

Hi,

I want to fill radio button values with values from a constants class. What
is the best practice for this using struts?

For example, this code...
 Curtain Number Four
... could be...
 
property="crtainNum" />Curtain Number Four
... or, at least I figure it could be.

But is there a more strutsy way to do it?

Thanks,
boz