RE: Cannot initialize RequestProcessor

2004-03-17 Thread Anderson, James H [IT]
It has to extend TilesRequestProcessor, not RequestProcessor.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 17, 2004 7:20 AM
To: [EMAIL PROTECTED]
Subject: Cannot initialize RequestProcessor 


Hello All,

We have written a class RFFRequestProcessor which will extends
org.apache.struts.action.RequestProcessor. This is being used to validate
the values in request headers before control enters into execute() method of
action classes. When the application initialized struts not able to locate
RFFRequestProcessor class. We are getting the below exception. 

ERROR (2004-03-15 10:30:42,329) [  org.apache.struts.action.ActionServlet] -
javax.servlet.UnavailableException: Cannot initialize RequestProcessor of
class 
com.links.servlet.RFFRequestProcessor: java.lang.ClassNotFoundException:
com.links.servlet.RFFRequestProcessor

"RFFRequestProcessor" located in "WEB-INF/classes/com/links/servlet"
directory. All the struts related jars are in WEB-INF/lib folder. Struts
version 1.1.

Any help or direction to resolve this problem is highly appreciated.

regards
Uma Mahesh


-
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: server side date validation

2004-03-15 Thread Anderson, James H [IT]



  

  
  
datePatternStrict
MM/dd/
  

 ...
 
   

-Original Message-
From: Jignesh Patel [mailto:[EMAIL PROTECTED]
Sent: Monday, March 15, 2004 2:04 PM
To: Struts Users Mailing List
Subject: server side date validation


Can anybody give me example code to validate date towards server side?  

-Jignesh

-
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: [OT] 2 JSF questions

2004-03-12 Thread Anderson, James H [IT]
Hi Matthias,

What do you mean by "pics"?

jim

-Original Message-
From: Matthias Wessendorf [mailto:[EMAIL PROTECTED]
Sent: Friday, March 12, 2004 2:23 PM
To: 'Struts Users Mailing List'
Subject: RE: [OT] 2 JSF questions


hi jim,

searched the web :)

http://www.javaworld.com/javaworld/jw-11-2003/jw-1114-jsfredux-p2.html

the last to pics looks like mac

but it is not a sample for the RI
it is form Early Access4
(old) :-)

Cheers!

-Original Message-----
From: Anderson, James H [IT] [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 12, 2004 7:30 PM
To: [EMAIL PROTECTED]
Subject: [OT] 2 JSF questions


1) Since JSF is written in Java, why does Sun have 3 different download
available, Windows, Solaris, Linux?

2) Would any of those work for Mac OS X?

Thanks,

jim

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



[OT] 2 JSF questions

2004-03-12 Thread Anderson, James H [IT]
1) Since JSF is written in Java, why does Sun have 3 different download available, 
Windows, Solaris, Linux?

2) Would any of those work for Mac OS X?

Thanks,

jim

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



RE: Struts in Action: 12.10.1 Multipage validations

2004-03-11 Thread Anderson, James H [IT]
I'm not guaranteeing that this is the best way to do it, but it works for me ;-)

  
  

private static final String dateTimeFormat = "MM/dd/-HH:mm:ss";

/*
 * This validator must be associated with date2 (the later date),
 * not date1. (This is so that date1 has already been validated.)
 * date1 and date2 must use the same datePattern and
 * they must have already been validated as valid dates,
 */

public static boolean date1LEdate2( Object bean,

ValidatorAction va,
Field 
field,

ActionErrors errors,

HttpServletRequest request )
{

String date2Property = field.getProperty();
String dateStr2 = ValidatorUtil.getValueAsString(bean,date2Property);
String date1Property = field.getVarValue("date1");
String dateStr1 = ValidatorUtil.getValueAsString(bean,date1Property);

String datePattern = null;
try {
datePattern = field.getVarValue("datePatternStrict");
} catch (Exception e1) {
try {
datePattern = field.getVarValue("datePattern");
} catch (Exception e2) {}
}
if (datePattern == null) {
errors.add( field.getKey(), new 
ActionMessage("errors.validator.config") );
return false;
}
boolean returnVal;
try {
SimpleDateFormat formatter = new SimpleDateFormat(datePattern);
Date date1 = formatter.parse(dateStr1, new ParsePosition(0));
Date date2 = formatter.parse(dateStr2, new ParsePosition(0));
returnVal = date1.compareTo(date2) <= 0 ? true : false;
} catch (Exception e) {
System.out.println(e);
e.printStackTrace();
returnVal = false;
}

if ( returnVal == false ) {
errors.add( field.getKey(), new 
ActionMessage("errors.daterange", date1Property, date2Property) );
}

return returnVal;
}

-Original Message-
From: Dean A. Hoover [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 11, 2004 1:12 PM
To: [EMAIL PROTECTED]
Subject: Struts in Action: 12.10.1 Multipage validations


This section of the book sounds interesting, but
it would be nice if there were an example somewhere.
Can someone point me to one?

Dean Hoover


-
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: Suggestion needed on good Struts book

2004-03-08 Thread Anderson, James H [IT]
IMHO, "Struts in Action" is the best, given the caveat that it's rather
dated. Combine it with "Professional Jakarta Struts" and you should be in
good shape.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Sunday, March 07, 2004 2:38 PM
To: [EMAIL PROTECTED]
Subject: Suggestion needed on good Struts book


Hi,

I am a newbie to Struts.
I have been looking for books on Struts and found these on Amazon

Programming Jakarta Struts  - OReilly
Struts in Action- Manning
Struts Framework- Morgan Kaufmann
Struts Survival Guide   - ObjectSource
Professional Jakarta Struts - Wrox
Struts Kick Start   - Sams

Can anybody suggest which is good?

Thanks.


-
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: Tiles problem

2004-03-02 Thread Anderson, James H [IT]
Maybe I didn't follow you, but I changed 


  
  


to


  
  


and it didn't make any difference. What am I missing?

-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 02, 2004 4:40 PM
To: Struts Users Mailing List
Subject: Re: Tiles problem




On 2 Mar 2004, at 22:15, Anderson, James H [IT] wrote:

> There's something I'm not understanding :-( I've got the following 
> tiles definitions.
>
>  path="/tiles/layouts/mainLayout1.jsp">
>   
>   
>   
<< variable for 
> substitution
> 
>
>  path="/tiles/layouts/portfolioLayout.jsp">
>   
>   
>   
> 
>
>  path="/tiles/layouts/marketdataLayout.jsp">
>   
>   
>   
> 
>
>  path="/tiles/layouts/userinputLayout.jsp">
>   
>   << 
> variable for substitution
> 
>
> and I want to create a new tile, substituting values for both variable:
>
> 
>   
>   
> 
>
> But this doesn't work! The "content" variable is replaced as expected, 
> but the "app-specific" variable
> is ignored and doesn't show up at all. It looks like the only tile for 
> which variable substitution
> is supported is the one that's specified in the "extends" 
> attribute--not in any nested tile. Surely
> there must be a way to get around this...
>
> jim
>
> -
> 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]



Tiles problem

2004-03-02 Thread Anderson, James H [IT]
There's something I'm not understanding :-( I've got the following tiles definitions.


  
  
<< variable 
for substitution



  
  
  



  
  
  



  
<< variable 
for substitution


and I want to create a new tile, substituting values for both variable:


  
  


But this doesn't work! The "content" variable is replaced as expected, but the 
"app-specific" variable
is ignored and doesn't show up at all. It looks like the only tile for which variable 
substitution 
is supported is the one that's specified in the "extends" attribute--not in any nested 
tile. Surely 
there must be a way to get around this...

jim

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



RE: splitting struts-config into multiple files

2004-03-02 Thread Anderson, James H [IT]
Nadeem,

I think I didn't read your reply carefully enough. Are you saying that I
could maintain global-forwards.xml somewhere on the filesystem outside
the app and xdoclet could be setup to merge it with struts-config.xml?

jim

-Original Message-
From: Nadeem Bitar [mailto:[EMAIL PROTECTED]
Sent: Sunday, February 29, 2004 7:03 AM
To: Struts Users Mailing List
Subject: Re: splitting struts-config into multiple files


You can take advantage of xdoclet merging capabilities. 
You would have your action mapping in struts-actions.xml, your global-
forwards in global-forwards.xml, your form beans inside struts-forms.
xml ... and xdoclet would merge the files for you.



On Sat, 2004-02-28 at 13:36 -0700, Manish Singla wrote:

> May be Ant task can help in your environment.
> 
> HTH
> Manish Singla
> 
> Jim Anderson wrote:
> 
> > We have many apps that require the same global forwards. Rather than
> > copy this info into the config file for each app, we'd like to be
able
> > to place it in a struts-config file that lives somewhere on the
> > filesystem outside WEB-INF, and then specify that as one of the
config
> > files to use. I know it's possible to split struts-config, but is
there
> > some way that one of the config files can reside outside the app?
> >
> > Thanks,
> >
> > jim
> >
> >
-
> > 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]
-- 

Nadeem Bitar
Software Engineer
IzuCode, LLC
5230 Fiore Terrace #k208
San Diego, Ca 92122
 


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



custom validator question

2004-02-26 Thread Anderson, James H [IT]
I'm creating a custom validator to enforce a <= relationship between 2 date fields and 
am having a problem.

A validator method gets a Field arg for the field with which it's associated in 
validation.xml, but I need to also get the Field object for the other date field. I 
need this so that I can get its property name for display in an error message. (I'd 
also like to be able to get the field's datePattern.) I can't figure out how to do 
this.

Any help would be much appreciated!

jim

Here's the relevant part of my validation.xml file:

  

  
  
datePatternStrict
MM/dd/
  


  
  
datePatternStrict
MM/dd/
  
  
date1
starting
  

  

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



RE: custom validator question

2004-02-26 Thread Anderson, James H [IT]
I guess I wasn't clear (also, I was a bit confused :)

My validator is already working, and what you suggest below will get me the
property name I need for display in an error msg. But how can I get the
datePattern from mySecondDate? At the moment I'm assuming it'll be the same
as for myFirstDate, but that's just an assumption...

-Original Message-
From: Niall Pemberton [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 26, 2004 10:18 AM
To: Struts Users Mailing List
Subject: Re: custom validator question


Specify the second field as 


 
 datePattern
 dd/MM/
 
 
 compareDate
 mySecondDate
 


Then in your custom validation method:

String datePattern = field.getVarValue("datePattern");
String compareDateProperty = field.getVarValue("compareDate");

String compareDate = ValidatorUtils.getValueAsString(bean,
compareDateProperty);


Niall

- Original Message - 
From: "Anderson, James H [IT]" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 26, 2004 2:54 PM
Subject: custom validator question


I'm creating a custom validator to enforce a <= relationship between 2 date
fields and am having a problem.

A validator method gets a Field arg for the field with which it's associated
in validation.xml, but I need to also get the Field object for the other
date field. I need this so that I can get its property name for display in
an error message. (I'd also like to be able to get the field's datePattern.)
I can't figure out how to do this.

Any help would be much appreciated!

jim

Here's the relevant part of my validation.xml file:

  

  
  
datePatternStrict
MM/dd/
  


  
  
datePatternStrict
MM/dd/
  
  
date1
starting
  

  

-
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: custom validator question

2004-02-26 Thread Anderson, James H [IT]
I wasn't aware of it--I'm using Struts 1.1. I'll check it out.

Thanks.

-Original Message-
From: Niall Pemberton [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 26, 2004 10:20 AM
To: Struts User Jakarta
Subject: Re: custom validator question


Also, what about using the existing ValidWhen validation

   http://jakarta.apache.org/struts/userGuide/dev_validator.html

Niall
- Original Message - 
From: "Niall Pemberton" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, February 26, 2004 3:17 PM
Subject: Re: custom validator question


> Specify the second field as 
>
> 
>  
>  datePattern
>  dd/MM/
>  
>  
>  compareDate
>  mySecondDate
>  
> 
>
> Then in your custom validation method:
>
> String datePattern = field.getVarValue("datePattern");
> String compareDateProperty = field.getVarValue("compareDate");
>
> String compareDate = ValidatorUtils.getValueAsString(bean,
> compareDateProperty);
>
>
> Niall
>
> - Original Message - 
> From: "Anderson, James H [IT]" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, February 26, 2004 2:54 PM
> Subject: custom validator question
>
>
> I'm creating a custom validator to enforce a <= relationship between 2
date
> fields and am having a problem.
>
> A validator method gets a Field arg for the field with which it's
associated
> in validation.xml, but I need to also get the Field object for the other
> date field. I need this so that I can get its property name for display in
> an error message. (I'd also like to be able to get the field's
datePattern.)
> I can't figure out how to do this.
>
> Any help would be much appreciated!
>
> jim
>
> Here's the relevant part of my validation.xml file:
>
>   
> property="starting"
>depends="date">
>   
>   
> datePatternStrict
> MM/dd/
>   
> 
> property="ending"
>depends="date,date1LEdate2">
>   
>   
> datePatternStrict
> MM/dd/
>   
>   
> date1
> starting
>   
> 
>   
>
> -
> 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: Common Services across Different Actions.

2004-02-25 Thread Anderson, James H [IT]
Could you provide a little more detail?

Thanks,

jim

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 25, 2004 10:54 AM
To: Struts Users Mailing List
Subject: Re: Common Services across Different Actions.


I like to use a ServiceLocater (created and initialized at application
start)
exposed through the BaseAction.

Rick DeBay

On Wed, 25 Feb 2004 17:50 , Kommineni, Sateesh \(GE Consumer &
Industrial\)
<[EMAIL PROTECTED]> sent:

>
>Hi All,
>
>   In our Application we have identified few common Services which we
are
planning to develop as reusable components.
>
>   The approaches we identified are
>
>  1) Representing each service as a Plug-in so that we can initialize
all the
Service when the Web App is initialized .
>
>  2) Create a BaseAction and have all the resources available in that
Action
class . Sub Class all your Custom Actions from the BaseAction.
>
>Is there any Other Approach that we are missing here  
>
>Thanks a lot
>Sateesh





-
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: How to create a "No Action" ActionForward for return from an Action's execute() ?

2004-02-19 Thread Anderson, James H [IT]
How would you forward the user to the login page? The processPreprocess() method 
returns true or false.

-Original Message-
From: Brad Balmer [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 19, 2004 1:47 PM
To: Struts Users Mailing List
Subject: Re: How to create a "No Action" ActionForward for return from
an Action's execute() ?


While you can use a filter to do this, why not extend the 
RequestProcessor class? 

By overriding the processPreprocess function you can check for your 
flag.  If found simply return true to continue processing.  Otherwise 
forward the user onto the login page.

*
*James Adams wrote:

>I have created an Action class which does session
>validation by checking to see if a "loggedIn" flag is
>set in the session - if it is absent, or set to false,
>then I want to forward to the login page.  However if
>it is set to true then I don't want to do anything -
>the execute() method should just complete and control
>should return to the calling page.  But the execute()
>method must return an ActionForward, and it is
>impossible to specify a forward name/path for this
>case in the struts-config.xml since the path should be
>the path of the page that the action is being called
>from, and there is no way to know this information
>beforehand.  So I am wondering how can I (within the
>execute() method of the SessionValidatorAction) create
>an ActionForward to return which will indicate the
>path of the calling page ?  Is there a way to create
>and return a "No Action" ActionForward ?  Can I just
>return null ? 
>
>I am including the action at the top of the JSPs via
>
>
>
>
>
>The action mapping I'm currently using looks like this
>
>
>type="mypkg.action.SessionValidatorAction">
>path="Login.jsp"/>
>
>
>
>
>Is this the right approach/design ?  If so how can I
>return an ActionForward from the
>SessionValidatorAction's execute() method which
>forwards control back to the calling page ?  If not
>then how else should I go about this ?
>
>Thanks in advance for your feedback.  Please Cc: any
>rsponses to this email address.
>
>
>-James
>
>__
>Do you Yahoo!?
>Yahoo! Mail SpamGuard - Read only the mail you want.
>http://antispam.yahoo.com/tools
>
>-
>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: client-side validation not working

2004-02-14 Thread Anderson, James H [IT]
Or, I should say that it looks like it would be called. here's the code
fragment:


RE: client-side validation not working

2004-02-14 Thread Anderson, James H [IT]
Yes and yes.

-Original Message-
From: Saul Q Yuan [mailto:[EMAIL PROTECTED]
Sent: Friday, February 13, 2004 4:17 PM
To: 'Struts Users Mailing List'
Subject: RE: client-side validation not working


So, did you find the validateDate function, and was it called?

-Original Message-----
From: Anderson, James H [IT] [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 13, 2004 3:29 PM
To: Struts Users Mailing List
Subject: RE: client-side validation not working


Struts 1.1

-Original Message-
From: Saul Q Yuan [mailto:[EMAIL PROTECTED]
Sent: Friday, February 13, 2004 11:25 AM
To: 'Struts Users Mailing List'
Subject: RE: client-side validation not working


Try to put some alerts in the validateDate javascript function in the
validator-rules.xml file and see if the function is called. BTW, what
version of Struts you are using?

Saul

-Original Message-----
From: Anderson, James H [IT] [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 13, 2004 10:12 AM
To: Struts Users Mailing List
Subject: RE: client-side validation not working


To test the possibility of it being a problem with using html:image
instead of html:submit, I replaced html:image by html:submit but got the
same result, i.e., the client-side validation is not being invoked.

-Original Message-
From: Niall Pemberton [mailto:[EMAIL PROTECTED]
Sent: Friday, February 13, 2004 9:42 AM
To: Struts Users Mailing List
Subject: Re: client-side validation not working


Everything looks OK to me.

Have you checked what javascript is being generated - use "view source"
in your browser when you are looking at the page. is there a
validateActivityViewForm() method and is that method doing the
validations you expect?

A second thought is how are you submitting your page - I had problems
when I was using javascript with a link tag. If your doing that, then
try putting an ordinary submit button on the page and see if that works.

Save

Niall


- Original Message ----- 
From: "Anderson, James H [IT]" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, February 13, 2004 2:23 PM
Subject: client-side validation not working


Server-side validation is working fine, but I can't seem to get
client-side working.

I know I must be doing something wrong, but I can't figure out what it
is :-(

Here's a bit of the tile that uses validation:

<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>



...
   ...
  
...
 

  

  




Here's the piece of validation.xml:



  

  


  

  



Here's the Action entry from struts-config:




ActivityViewForm extends PortfolioForm which is declared thusly:

public class PortfolioForm extends ValidatorForm implements Serializable
{

As I said, server-side validation is working fine, but the javascript on
the client-side isn't getting activated.

I hope someone can help me to resolve this quickly!

Thanks very much,

jim




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




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

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


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

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


-
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: client-side validation not working

2004-02-13 Thread Anderson, James H [IT]
Are you referring to struts-example? If so, I don't currently have it installed, but 
I'll do so shortly.

For browsers, I've tried it on Netscape 7.1 and on Safari (OS/X) with the same results.

Since I'm not sure how much of the view source you need, I'm sending the whole thing.



-Original Message-
From: Niall Pemberton [mailto:[EMAIL PROTECTED]
Sent: Friday, February 13, 2004 11:45 AM
To: Struts Users Mailing List
Subject: Re: client-side validation not working


Ignore that...I think I'm talking rubish.

Its not a browser issues is it? Does the javascript validation work if you
try out the sample webapp?

How about posting the html that has been generated? If strust generates
everything OK, then its another issue (browser?) but seeing the source might
give a pointer, if struts isn't putting out everything it needs to.

Niall

- Original Message - 
From: "Niall Pemberton" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, February 13, 2004 4:38 PM
Subject: Re: client-side validation not working


> You seem to be missing a ';' at the end of your onsubmit(), if this is
> exactly how your code is, that would cause this
>
> 
>
> Niall
>
> - Original Message - 
> From: "Anderson, James H [IT]" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Friday, February 13, 2004 3:11 PM
> Subject: RE: client-side validation not working
>
>
> To test the possibility of it being a problem with using html:image
instead
> of html:submit, I replaced html:image by html:submit but got the same
> result, i.e., the client-side validation is not being invoked.
>
> -Original Message-
> From: Niall Pemberton [mailto:[EMAIL PROTECTED]
> Sent: Friday, February 13, 2004 9:42 AM
> To: Struts Users Mailing List
> Subject: Re: client-side validation not working
>
>
> Everything looks OK to me.
>
> Have you checked what javascript is being generated - use "view source" in
> your browser when you are looking at the page. is there a
> validateActivityViewForm() method and is that method doing the validations
> you expect?
>
> A second thought is how are you submitting your page - I had problems when
I
> was using javascript with a link tag. If your doing that, then try putting
> an ordinary submit button on the page and see if that works.
>
> Save
>
> Niall
>
>
> - Original Message - 
> From: "Anderson, James H [IT]" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Friday, February 13, 2004 2:23 PM
> Subject: client-side validation not working
>
>
> Server-side validation is working fine, but I can't seem to get
client-side
> working.
>
> I know I must be doing something wrong, but I can't figure out what it is
> :-(
>
> Here's a bit of the tile that uses validation:
>
> <%@ taglib uri="/tags/struts-bean" prefix="bean" %>
> <%@ taglib uri="/tags/struts-html" prefix="html" %>
> <%@ taglib uri="/tags/struts-logic" prefix="logic" %>
>
> 
> 
> ...
>   
> ...
>   
> ...
>  
> 
>name="error"/>
> 
>   
> 
> 
> 
>
> Here's the piece of validation.xml:
>
> 
>
>   
> property="starting"
>depends="date">
>   
> 
> property="ending"
>depends="date">
>   
> 
>   
>
> 
>
> Here's the Action entry from struts-config:
>
> path="/SelectActivity"
>name="ActivityViewForm"
>type="portfolio.SelectActivityAction"
>input=".activity.detail"/>
>
>
> ActivityViewForm extends PortfolioForm which is declared thusly:
>
> public class PortfolioForm extends ValidatorForm implements Serializable {
>
> As I said, server-side validation is working fine, but the javascript on
the
> client-side isn't getting activated.
>
> I hope someone can help me to resolve this quickly!
>
> Thanks very much,
>
> jim
>
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



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

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

RE: client-side validation not working

2004-02-13 Thread Anderson, James H [IT]
Struts 1.1

-Original Message-
From: Saul Q Yuan [mailto:[EMAIL PROTECTED]
Sent: Friday, February 13, 2004 11:25 AM
To: 'Struts Users Mailing List'
Subject: RE: client-side validation not working


Try to put some alerts in the validateDate javascript function in the
validator-rules.xml file and see if the function is called. BTW, what
version of Struts you are using?

Saul

-Original Message-----
From: Anderson, James H [IT] [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 13, 2004 10:12 AM
To: Struts Users Mailing List
Subject: RE: client-side validation not working


To test the possibility of it being a problem with using html:image
instead of html:submit, I replaced html:image by html:submit but got the
same result, i.e., the client-side validation is not being invoked.

-Original Message-
From: Niall Pemberton [mailto:[EMAIL PROTECTED]
Sent: Friday, February 13, 2004 9:42 AM
To: Struts Users Mailing List
Subject: Re: client-side validation not working


Everything looks OK to me.

Have you checked what javascript is being generated - use "view source"
in your browser when you are looking at the page. is there a
validateActivityViewForm() method and is that method doing the
validations you expect?

A second thought is how are you submitting your page - I had problems
when I was using javascript with a link tag. If your doing that, then
try putting an ordinary submit button on the page and see if that works.

Save

Niall


- Original Message ----- 
From: "Anderson, James H [IT]" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, February 13, 2004 2:23 PM
Subject: client-side validation not working


Server-side validation is working fine, but I can't seem to get
client-side working.

I know I must be doing something wrong, but I can't figure out what it
is :-(

Here's a bit of the tile that uses validation:

<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>



...
   ...
  
...
 

  

  




Here's the piece of validation.xml:



  

  


  

  



Here's the Action entry from struts-config:




ActivityViewForm extends PortfolioForm which is declared thusly:

public class PortfolioForm extends ValidatorForm implements Serializable
{

As I said, server-side validation is working fine, but the javascript on
the client-side isn't getting activated.

I hope someone can help me to resolve this quickly!

Thanks very much,

jim




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




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

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


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

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



RE: Ben Janes/MaerskDataSverige/MDG is away from the office until 19-02-2004

2004-02-13 Thread Anderson, James H [IT]
Yep, I've been getting them since this morning.

-Original Message-
From: Niall Pemberton [mailto:[EMAIL PROTECTED]
Sent: Friday, February 13, 2004 12:13 PM
To: Struts User Jakarta
Subject: Re: Ben Janes/MaerskDataSverige/MDG is away from the office
until 19-02-2004


I keep getting these messages - I'm thinking its when I send an email to
this list - is anyone else getting them?

Niall
- Original Message - 
From: "Ben Janes" <[EMAIL PROTECTED]>
To: "Niall Pemberton" <[EMAIL PROTECTED]>
Sent: Friday, February 13, 2004 5:08 PM
Subject: Ben Janes/MaerskDataSverige/MDG is away from the office until
19-02-2004


> HI,
>
> I am currently out of the office.
>
> Any queries regarding Obtree go to Niklas Rolf (nkr or
[EMAIL PROTECTED])
>
> I will get to you as soon as I return
>
> Ben Janes
>
>



-
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: client-side validation not working

2004-02-13 Thread Anderson, James H [IT]
To test the possibility of it being a problem with using html:image instead of 
html:submit, I replaced html:image by html:submit but got the same result, i.e., the 
client-side validation is not being invoked.

-Original Message-
From: Niall Pemberton [mailto:[EMAIL PROTECTED]
Sent: Friday, February 13, 2004 9:42 AM
To: Struts Users Mailing List
Subject: Re: client-side validation not working


Everything looks OK to me.

Have you checked what javascript is being generated - use "view source" in
your browser when you are looking at the page. is there a
validateActivityViewForm() method and is that method doing the validations
you expect?

A second thought is how are you submitting your page - I had problems when I
was using javascript with a link tag. If your doing that, then try putting
an ordinary submit button on the page and see if that works.

Save

Niall


- Original Message - 
From: "Anderson, James H [IT]" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, February 13, 2004 2:23 PM
Subject: client-side validation not working


Server-side validation is working fine, but I can't seem to get client-side
working.

I know I must be doing something wrong, but I can't figure out what it is
:-(

Here's a bit of the tile that uses validation:

<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>



...
  
...
  
...
 

  

  




Here's the piece of validation.xml:



  

  


  

  



Here's the Action entry from struts-config:




ActivityViewForm extends PortfolioForm which is declared thusly:

public class PortfolioForm extends ValidatorForm implements Serializable {

As I said, server-side validation is working fine, but the javascript on the
client-side isn't getting activated.

I hope someone can help me to resolve this quickly!

Thanks very much,

jim




-
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: client-side validation not working

2004-02-13 Thread Anderson, James H [IT]
Yes, the javascript is being generated which includes a validateActivityViewForm(). As 
far as I can tell, the javascript looks appropriate.

I'm submitting the page using an html:image tag. Do you think the problem might be 
related to that?

-Original Message-
From: Niall Pemberton [mailto:[EMAIL PROTECTED]
Sent: Friday, February 13, 2004 9:42 AM
To: Struts Users Mailing List
Subject: Re: client-side validation not working


Everything looks OK to me.

Have you checked what javascript is being generated - use "view source" in
your browser when you are looking at the page. is there a
validateActivityViewForm() method and is that method doing the validations
you expect?

A second thought is how are you submitting your page - I had problems when I
was using javascript with a link tag. If your doing that, then try putting
an ordinary submit button on the page and see if that works.

Save

Niall


- Original Message - 
From: "Anderson, James H [IT]" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, February 13, 2004 2:23 PM
Subject: client-side validation not working


Server-side validation is working fine, but I can't seem to get client-side
working.

I know I must be doing something wrong, but I can't figure out what it is
:-(

Here's a bit of the tile that uses validation:

<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>



...
  
...
  
...
 

  

  




Here's the piece of validation.xml:



  

  


  

  



Here's the Action entry from struts-config:




ActivityViewForm extends PortfolioForm which is declared thusly:

public class PortfolioForm extends ValidatorForm implements Serializable {

As I said, server-side validation is working fine, but the javascript on the
client-side isn't getting activated.

I hope someone can help me to resolve this quickly!

Thanks very much,

jim




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



client-side validation not working

2004-02-13 Thread Anderson, James H [IT]
Server-side validation is working fine, but I can't seem to get client-side working.

I know I must be doing something wrong, but I can't figure out what it is :-(

Here's a bit of the tile that uses validation:

<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>


 
...
  
...
  
...
 

  

  




Here's the piece of validation.xml:



  

  


  

  
  


Here's the Action entry from struts-config:




ActivityViewForm extends PortfolioForm which is declared thusly:

public class PortfolioForm extends ValidatorForm implements Serializable {

As I said, server-side validation is working fine, but the javascript on the 
client-side isn't getting activated.

I hope someone can help me to resolve this quickly!

Thanks very much,

jim




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



question regarding dynamic Tile capability

2004-02-11 Thread Anderson, James H [IT]
We want to display different tiles, depending on the characterics of a logged-in user. 
In other words, some users would see one tile, others another. Is this possible? If 
so, could someone please send me a short code sample?

Thanks very much,

jim


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



RE: Is there an INCLUDE feature that works with struts-config?

2004-02-02 Thread Anderson, James H [IT]
Thanks, both of you, I'll go the XML entities route if that's all that's available.

-Original Message-
From: Matt Bathje [mailto:[EMAIL PROTECTED]
Sent: Monday, February 02, 2004 12:35 PM
To: Struts Users Mailing List
Subject: Re: Is there an INCLUDE feature that works with struts-config?


I think XML entities would do what he wants.

What you do is, at the top of your struts-config.xml file, you define the
entities you want to include:


http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd";
[


]>

Then, at each place you want to use the entity in your file, you include it
as an entity using &entityName; (so for the above example: &actionMappings;
and &formBeans;)

So to include action mappings in your struts config that you have defined in
another file, you would do:






&actionMappings;



In struts-config, the entity paths can be relative to your struts-config.xml
file (usually /WEB-INF/), or hard coded paths to somewhere else on the file
system. If you want to use entities in tiles-defs.xml or validation.xml,
they must be hard coded paths (for now...I'm investigating this in my free
time!!).


Matt Bathje



- Original Message - 
From: "Hubert Rabago" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, February 02, 2004 11:23 AM
Subject: Re: Is there an INCLUDE feature that works with struts-config?


> Probably not in the way you're thinking.
> Struts allows you to specify more multiple config files for the same
> app, so you can probably specify the app-specific config and the shared
> config for each app.  However, each of your apps will need to have copies
of
> the same shared XML.
> If you're worried about duplication, you can have the shared config in
> one location and have your build process copy it from there.
> Just an idea.
>
> - Hubert
>
> --- "Anderson, James H [IT]" <[EMAIL PROTECTED]> wrote:
> > We will have many related Struts apps that require identical entries in
> > struts-config, so I'm wondering if there's a way to define common sets
of
> > entries and then include them in the config file for each of the apps.
> >
> > Thanks,
> >
> > jim
> >
> >
>
> __
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free web site building tool. Try it!
> http://webhosting.yahoo.com/ps/sb/
>
> -
> 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]



Is there an INCLUDE feature that works with struts-config?

2004-02-02 Thread Anderson, James H [IT]
We will have many related Struts apps that require identical entries in struts-config, 
so I'm wondering if there's a way to define common sets of entries and then include 
them in the config file for each of the apps.

Thanks,

jim


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



RE: Best Practices question

2004-01-27 Thread Anderson, James H [IT]
Thanks very much, the article is just what I was looking for.

jim

-Original Message-
From: Yee, Richard K,,DMDCWEST [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 27, 2004 12:22 PM
To: 'Struts Users Mailing List'
Subject: RE: Best Practices question


Jim,
Throw custom exceptions in your business beans and then use the struts
declarative exception handling feature so that your custom exception
handler
class(es) handle the exceptions by populating ActionMessages and logging
the
error if neccessary. 
Check out this article by Keld H. Hansen
http://javaboutique.internet.com/tutorials/excep_struts/index-7.html

-Richard


-Original Message-----
From: Anderson, James H [IT] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 27, 2004 5:31 AM
To: Struts Users Mailing List
Subject: Best Practices question


What is considered the best way for a business bean to handle errors so
that
they eventually get to ActionErrors? And what about business logging?

Thanks,

jim


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



Best Practices question

2004-01-27 Thread Anderson, James H [IT]
What is considered the best way for a business bean to handle errors so that
they eventually get to ActionErrors? And what about business logging?

Thanks,

jim


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



RE: Where is struts-scaffold.jar?

2004-01-26 Thread Anderson, James H [IT]
Terrific!

Thanks very much.

jim

-Original Message-
From: Richard Hightower [mailto:[EMAIL PROTECTED]
Sent: Monday, January 26, 2004 12:35 PM
To: Struts Users Mailing List
Subject: RE: Where is struts-scaffold.jar?


Look at the bottom of the page...

http://sourceforge.net/project/showfiles.php?group_id=49385


Rick Hightower
Developer

Struts/J2EE training -- http://www.arc-mind.com/strutsCourse.htm

Struts/J2EE consulting --
http://www.arc-mind.com/consulting.htm#StrutsMentoring

-Original Message-
From: Anderson, James H [IT] [mailto:[EMAIL PROTECTED]
Sent: Monday, January 26, 2004 10:18 AM
To: Struts Users Mailing List
Subject: Where is struts-scaffold.jar?


What am I missing? It's not in the Struts 1.1 distribution, and I haven't
been able to find it anywhere.

jim

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



Where is struts-scaffold.jar?

2004-01-26 Thread Anderson, James H [IT]
What am I missing? It's not in the Struts 1.1 distribution, and I haven't been able to 
find it anywhere.

jim

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



beginner's html:options question

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

"Cannot find bean preparedData in any scope"

Here's html:option related stuff:



> 
Any help greatly appreciated!

jim

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

RE: Is it possible to nest Tiles layouts?

2004-01-09 Thread Anderson, James H [IT]
Thanks!

-Original Message-
From: List Mailbox [mailto:[EMAIL PROTECTED]
Sent: Friday, January 09, 2004 3:43 PM
To: Struts Users Mailing List
Subject: RE: Is it possible to nest Tiles layouts?


You can specify another definition as a put attribute for the content i.e









You may find this link helpful:
http://www.lifl.fr/~dumoulin/tiles/tilesAdvancedFeatures.pdf



Cal
www.calandva.com

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Behalf Of Anderson, James H [IT]
Sent: Friday, January 09, 2004 3:05 PM
To: 'Struts Users Mailing List'
Subject: RE: Is it possible to nest Tiles layouts?

Sure.

Suppose I create a Tiles definition with header, footer, menu, and body
components. As it happens, many (but not all) of the "body component
overlays" are not single tiles but a composition of multiple tiles. So, in
many cases I want to be able to replace the body with multiple tiles (i.e.,
another layout), rather than a single tile; and some of these "subordinate"
tiles are used in more than one composition.

I hope that makes it clear.

jim

-Original Message-
From: List Mailbox [mailto:[EMAIL PROTECTED]
Sent: Friday, January 09, 2004 2:47 PM
To: Struts Users Mailing List
Subject: RE: Is it possible to nest Tiles layouts?


Yes - can you be more specific - give an example of what you are trying to
do?

Cal
www.calandva.com

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Behalf Of Anderson, James H [IT]
Sent: Friday, January 09, 2004 12:09 PM
To: Struts User Mailing List
Subject: Is it possible to nest Tiles layouts?

For example, I'd like to be able to reformat the content tile into a number
of different layouts...

Thanks,

jim


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



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

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



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

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



RE: Is it possible to nest Tiles layouts?

2004-01-09 Thread Anderson, James H [IT]
Sure.

Suppose I create a Tiles definition with header, footer, menu, and body
components. As it happens, many (but not all) of the "body component
overlays" are not single tiles but a composition of multiple tiles. So, in
many cases I want to be able to replace the body with multiple tiles (i.e.,
another layout), rather than a single tile; and some of these "subordinate"
tiles are used in more than one composition.

I hope that makes it clear.

jim

-Original Message-
From: List Mailbox [mailto:[EMAIL PROTECTED]
Sent: Friday, January 09, 2004 2:47 PM
To: Struts Users Mailing List
Subject: RE: Is it possible to nest Tiles layouts?


Yes - can you be more specific - give an example of what you are trying to
do?

Cal
www.calandva.com

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Behalf Of Anderson, James H [IT]
Sent: Friday, January 09, 2004 12:09 PM
To: Struts User Mailing List
Subject: Is it possible to nest Tiles layouts?

For example, I'd like to be able to reformat the content tile into a number
of different layouts...

Thanks,

jim


-
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: Is it possible to nest Tiles layouts?

2004-01-09 Thread Anderson, James H [IT]
Thanks, I'll try that.

-Original Message-
From: Domingo A. Rodriguez S. [mailto:[EMAIL PROTECTED]
Sent: Friday, January 09, 2004 12:49 PM
To: Struts Users Mailing List
Subject: Re: Is it possible to nest Tiles layouts?



Something like this??









Regards

 --- "Anderson, James H [IT]" <[EMAIL PROTECTED]> escribió: >
For example, I'd like to be able to reformat the content tile into a
> number of different layouts...
> 
> Thanks,
> 
> jim
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>  

_
Do You Yahoo!?
Información de Estados Unidos y América Latina, en Yahoo! Noticias.
Visítanos en http://noticias.espanol.yahoo.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]



Is it possible to nest Tiles layouts?

2004-01-09 Thread Anderson, James H [IT]
For example, I'd like to be able to reformat the content tile into a number of 
different layouts...

Thanks,

jim


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



RE: Dynamic Tiles?

2004-01-08 Thread Anderson, James H [IT]
Thanks very much! I'll need to spend a little time digesting this, but it certainly 
looks like what I want.

Thanks again.

jim

-Original Message-
From: Pedro Salgado [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 08, 2004 4:04 PM
To: Struts Users Mailing List
Subject: Re: Dynamic Tiles?



Here goes a response to your question...

Pedro Salgado

- PREVIOUS MESSAGE (on this mailing list)


Hi Robert..

I guess you could achieve the same using the controllerClass attribute and
building your class.. For instance, I have this definition in the
tiles-defs.xml file:
---
   
 
 
 
 
 
 
   
---
  And I have this controllerClass
---
package com.dars;
import org.apache.struts.tiles.actions.TilesAction;
import org.apache.struts.tiles.ComponentContext;
import org.apache.struts.tiles.Controller;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import java.io.IOException;

public class XTileAction extends TilesAction implements Controller{
public void perform(ComponentContext tilesctx,
HttpServletRequest request,
HttpServletResponse response,
ServletContext servctx)
throws ServletException, IOException{
 /* GetAttributes */
 String titulo= (String)tilesctx.getAttribute("title");
 String derecha= (String)tilesctx.getAttribute("rightside");
 /* GetAttributes */
 System.out.println("  Titulo: "+titulo);
 System.out.println(" Derecha: "+derecha);
 /* SetAttributes */
   tilesctx.putAttribute("title", "Titulo nuevo de esta vaina..");
   tilesctx.putAttribute("rightside", "/common/footer.jsp");
 /* SetAttributes */
}
}
---
You can change the values of those attributes at runtime. I prefer to do
it using this method.

Atte.
Domingo A. Rodriguez S.


 --- Robert Taylor <[EMAIL PROTECTED]> escribió: > Greetings, I have a
tiles definition in my tiles-defs.xml similar to
> below:
> 
>  
> 
> 
>   
> 
> which I would like to be able to modify the "heading" value such that
> at runtime I could substitute a value for {0}.
> 
> For example, it would be ideal to use a JSTL type of syntax such as:
> 
> 
> 
> 
>   
> 
> but this does not work.
> 
> 
> 
> robert
> 
> -------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>  


On 08/01/2004 20:22, "Anderson, James H [IT]"
<[EMAIL PROTECTED]> wrote:

> I'm wondering if Tiles provides support for choosing a Tile dynamically,
> i.e., programatically at runtime.
> 
> Our business users have the capability to not only modify include files, but
> to create new include file directories based on client defined data. We're
> looking for a way to support this in Struts.
> 
> Thanks.
> 
> jim
> 
> 
> -
> 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]



Dynamic Tiles?

2004-01-08 Thread Anderson, James H [IT]
I'm wondering if Tiles provides support for choosing a Tile dynamically,
i.e., programatically at runtime.

Our business users have the capability to not only modify include files, but
to create new include file directories based on client defined data. We're
looking for a way to support this in Struts.

Thanks.

jim


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



Does the Struts Validator work with DynaActionForms?

2003-12-16 Thread Anderson, James H [IT]
I see that to setup server-side vaildations one must extend the ValidatorForm or 
ValidatorActionForm class, but for dynamic form support one must extend the 
DynaActionForm class...

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



RE: question on DynaActionForm

2003-12-15 Thread Anderson, James H [IT]
Thanks! That did it. So, unless I read it wrong, the statement regarding transparency 
was in error.

Thanks again.

jim

-Original Message-
From: Fullam, Jonathan [mailto:[EMAIL PROTECTED]
Sent: Monday, December 15, 2003 9:58 AM
To: 'Struts Users Mailing List'
Subject: RE: question on DynaActionForm


Jim,
I'm not exactly sure what the book means when they say that "whether you use
an ActionForm or a DynaActionForm should be transparent," but once you use
DynaActionForm, you form is no longer of type RegisterForm (hence the
ClassCastException).  You must cast it to DynaActionFrom now as in:

DynaActionFrom rf = (DynaActionForm) form;

Also,  you will need to access the data in rf differently now...

rf.get("Name of property");

-Jonathan

-Original Message-
From: Anderson, James H [IT] [mailto:[EMAIL PROTECTED]
Sent: Monday, December 15, 2003 9:52 AM
To: Struts Users Mailing List
Subject: question on DynaActionForm


I'm trying to modify the simple Register application from Chapter 1 of
"Struts in Action" to use a DynaActionForm in place on the ActionForm shown
in the book. I've modified struts-config.xml accordingly. According to the
book, whether you use an ActionForm or a DynaActionForm should be
transparent. However, when I attempt to run the modified app I get a
ClassCastException at the following line in RegisterAction.java:

RegisterForm rf = (RegisterForm) form;

I'm sure it's something dumb, but I'm not seeing it. Any help appreciated.

Thanks,

jim




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



question on DynaActionForm

2003-12-15 Thread Anderson, James H [IT]
I'm trying to modify the simple Register application from Chapter 1 of "Struts in 
Action" to use a DynaActionForm in place on the ActionForm shown in the book. I've 
modified struts-config.xml accordingly. According to the book, whether you use an 
ActionForm or a DynaActionForm should be transparent. However, when I attempt to run 
the modified app I get a ClassCastException at the following line in 
RegisterAction.java:

RegisterForm rf = (RegisterForm) form;

I'm sure it's something dumb, but I'm not seeing it. Any help appreciated.

Thanks,

jim




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