RE: Ajax Basics

2009-07-08 Thread Richard Gundersen
most all set: > Include the following javascript: > > $(document).ready(function(){ > $(".datefield").datepicker(); > }); > > I usually do this in a .js file that included on all pages. > > Now create a struts text field and include the cssStyl

RE: Ajax Basics

2009-07-08 Thread Richard Gundersen
onverter. You can find lots of posts and discussions about Type Conversion and date converters. Richard Gundersen-2 wrote: > > Hi > > > > I'm trying to get the datetimepicker working in my app. It's Struts 2 > but it's totally non-AJAX at the moment. I also

RE: Ajax Basics

2009-07-07 Thread Richard Gundersen
/wiki/DatePickerTag Just drop the the jar into WEB-INF/lib and you are ready to go. Martin Richard Gundersen wrote: > Hi > > > > I'm trying to get the datetimepicker working in my app. It's Struts 2 > but it's totally non-AJAX at the moment. I also don't

Ajax Basics

2009-07-07 Thread Richard Gundersen
Hi I'm trying to get the datetimepicker working in my app. It's Struts 2 but it's totally non-AJAX at the moment. I also don't know anything about AJAX to make matters worse. Please could someone tell me a) what extra jars (dojo/json etc) do I need to pop into WEB-INF? I don't m

RE: String manipulation

2009-02-27 Thread Richard Gundersen
addActionError("File type not allowed"); return; } Remove |(xls) if you dont want to allow xls files --- On Fri, 2/27/09, Richard Gundersen wrote: > From: Richard Gundersen > Subject: RE: String manipulation > To: "Struts Users Mailin

RE: String manipulation

2009-02-27 Thread Richard Gundersen
Hmmm, no that also prevents genuine csv files from being selected too. Also investigating the accept attribute on the s:file tag to see if that will help... Any help appreciated. -Original Message- From: Richard Gundersen [mailto:r.gunder...@salford.ac.uk] Sent: 27 February 2009 10:27

RE: String manipulation

2009-02-27 Thread Richard Gundersen
Oh, got it @FieldExpressionValidator(expression="(accountFileFileName.endsWith('.cs v')", message="", key="validate.invalidFilename", fieldName="accountFileFileName") Forgot you could just call methods in OGNL :) -Richard -Original Mes

String manipulation

2009-02-27 Thread Richard Gundersen
Hi I'm trying to validate that a filename has a .csv extension. I would like to use @FieldExpressionValidator on the field but I can't get the syntax right, and searching the docs I can't find much on String manipulation in OGNL. Could anyone help me out please? Thanks

RE: What's the correct expression syntax?

2009-02-06 Thread Richard Gundersen
I think it's because you're comparing a single character string, which OGNL treats as a bit of a special case for some reason. I dont have my code with me now but I'm pretty sure I had the same problem. Google 'comparing single character string in ognl' for some pointers (sorry, I cant verify

RE: Collections and type conversion

2009-02-05 Thread Richard Gundersen
oming from (it looks like this): [0] null [1] Field[blah] [2] null [3] Field[blahblah] Nearly there - Thanks! -Original Message- From: Richard Gundersen [mailto:r.gunder...@salford.ac.uk] Sent: 05 February 2009 12:00 To: user@struts.apache.org Subject: Collections and type conversion H

Collections and type conversion

2009-02-05 Thread Richard Gundersen
Hi Could anyone point out what I'm doing wrong here please? My model (FileType) has a collection of Field objects and a getter called getFileFields(). I want to automatically display and set these when my form is rendered/posted. Rendering is easy using an iterator, but to allow the collectio

Setting a List in a ModelDriven action

2009-02-04 Thread Richard Gundersen
ding the list myself but I was wondering if there were some cool Tags that I could make use of? Regards Richard Gundersen Information & Learning Services Ashworth Building ext 56681 - To unsubscribe, e-mail: user-unsubscr...@struts.