Re: [S2] Famoso Double conversion problem in S2 2.0.11.1!

2009-03-11 Thread Bert Van den Brande
I think this may be caused by this bug : https://issues.apache.org/struts/browse/WW-3018 On Sat, Feb 28, 2009 at 9:25 PM, Milan Milanovic wrote: > > No solutions ? > > Could maybe this be a problem, in this code: > > ... > >         > > ... > > > refValue1 is of type Double in my action class

Re: s:url - escapeAmp Problem

2009-01-07 Thread Bert Van den Brande
>From the documentation : http://struts.apache.org/2.1.2/docs/url.html escapeAmp : Specifies whether to escape ampersand (&) to (& or not So I guess in order to have the url showing "&" you need to set "escapeAmp" to "false" ... On Wed, Jan 7, 2009 at 10:14 AM, Himanshu Rathore wrote: > Hi, > >

Re: Pls covert this code to struts 2.1

2009-01-05 Thread Bert Van den Brande
You assign the value 'documentTypes' to the property 'name' of the bean tag. >From the documentation : http://struts.apache.org/2.0.14/docs/bean.html name => The class name of the bean to be instantiated (must respect JavaBean specification) So that is the reason for the ClassNotFoundExce

[ANN] May 20 - Writing JPA Applications by Patrick Linskey at Google in Silicon Valley

2008-05-14 Thread Van Riper
d fetch strategies. --- | Michael "Van" Riper | http://weblogs.java.net/blog/van_riper/ | http://www.linkedin.com/in/vanriper | Silicon Valley Web JUG | mailto:[EMAIL PROTECTED] | https://sv-web-jug.dev.java.net - To unsubscri

(SOLVED) Indexed nested beans

2008-04-21 Thread Scott Van Wart
I was missing the getPackages() method :( - Scott Scott Van Wart wrote: Hi all, I'm trying to get multiple levels of indexed, nested beans working. I've tried a variety of solutions but I keep getting xwork or ognl exceptions. Here's what I've tried (loosely): p

Indexed nested beans

2008-04-21 Thread Scott Van Wart
Hi all, I'm trying to get multiple levels of indexed, nested beans working. I've tried a variety of solutions but I keep getting xwork or ognl exceptions. Here's what I've tried (loosely): public class MyAction implements Action, StrutsStatics { private List packages; public Li

Vote for Java runtime for Google App Engine

2008-04-16 Thread Van Riper
sue is the top vote getter so far and I would like to keep it that way. The Ruby runtime issue is not that far behind us. :-) Cheers, Van -- | Michael "Van" Riper | http://weblogs.java.net/blog/van_riper/ | http://www.linkedin.com/in/vanriper | Silicon Valley Web Developer JUG | mai

[ANN-OT] February 19 - Stateful Applications that Scale Like Stateless Ones by Orion Letizi at Googleplex in Silicon Valley

2008-02-17 Thread Van Riper
ssional Hibernate from Wrox Press * Professional Java Development with the Spring Framework from Wrox Press * Professional Ajax 2nd Edition from Wrox Press This meeting was organized by the Silicon Valley Web Developer JUG and is being co-hosted by the Silicon Valley JUG. -- | Michael "V

Re: Every action is getting called twice

2008-02-11 Thread Van Riper
ther that changes things at all. Good Luck, Van -- | Mike "Van" Riper | http://weblogs.java.net/blog/van_riper/ - | Silicon Valley Web Developer JUG | mailto:[EMAIL PROTECTED] | https://sv-web-jug.dev.java.net - | Silicon Valley Google Technology User Group | mailto:[EMAIL PROT

Re: Upload exception in Struts2

2007-11-22 Thread Le Van
Thank for your feedback, But that release is used in my active project and I don't want to upgrade it now. So have you ever get that error? is it be because of struts version? Thanks, Van On Nov 22, 2007 6:07 PM, Alexis Pigeon <[EMAIL PROTECTED]> wrote: > Hi Van, > > On 22/11/

Upload exception in Struts2

2007-11-22 Thread Le Van
ng of multipart/form-data request failed. Exception filling buffer with data from underlying input stream: not an EAGAIN status, so perhaps disconnected client? How does this appear? Any idea? How to avoid this ? Thanks in advance

Re: login and session

2007-10-16 Thread Tuyen Dinh Van
Hi, You should use interceptors provided by struts 2 for authenticating the user. The interceptor provide you with easy coding according to AOP. You can take a look at the sample application accompanying with struts2 distribution, that is mailreader. Tuyen Dinh On 10/16/07, Lizzy Borden <[EMAIL

Re: Where to code getting user principal in struts based project

2007-10-15 Thread Tuyen Dinh Van
Hi, I just guess your problem. If you have used struts 2.x, you can easily get credential information via Action POJO. In your case, creating a new Action named LoginAction with 2 properties username, password, then create a new User class. In the LoginAction, get username and password passed in U

OGNLException on passing request parameters in redirect-action type

2007-10-14 Thread Tuyen Dinh Van
Hi, I am configuring the struts.xml for my simple example like this: /WEB-INF/jsp/dashboard.jsp login /accounts http://www.example.com/dashboard.html deploy and run application

Has anyone developed a web app using struts 2 and agegi security framework?

2007-10-07 Thread Tuyen Dinh Van
I am now developing my own management suite using struts 2, and I also intend to use acegi for security, but very few document available for such integration. Has any one successfully integrated the acegi framework into struts 2? Any suggestion is appreciated. Thanks

Re: Struts URLs for perfectionists like Ebay's URLs

2007-10-04 Thread Vo Van Thuong
Hi, Vinny i also try urlrewrite but cannot get it work with struts 2's action, only work with static html files. would you pls give give me some sample app or guides to > have > my urls go from this : /myAction.do?p1=v1&p2=v2 to > /myAction/p1,v1/p2,v2/ best regards, - O

[OT] Silicon Valley Code Camp at Foothill College on Oct. 27-28

2007-10-01 Thread Van Riper
thread or contact me directly off list. If there is enough interest, we can schedule an informal Struts BOF session during the weekend sometime too. Cheers, Van -- Mike "Van" Riper [EMAIL PROTECTED] http://weblogs.java.net/blog/van_riper/ Silicon Valley Web Developer JUG https:/

Re: Struts - open windows without javascript

2007-09-27 Thread Van Riper
eypress event handler for those using a keyboard. However, when JavaScript isn't enabled, the link is processed as normal, providing a possibly adequate fallback mechanism, but failing to produce the designer's desired result. So, it does require a small amount of javascript to make it

Re: Struts - open windows without javascript

2007-09-27 Thread Van Riper
pen a new browser window/tab is: target="_blank" Technically, this will open a new window without javascript. It is just adding an HTML attribute to your form or link tags in your generated HTML response. No javascript required. -Van -- Mike "Van" Riper [EMAIL PROTECTED]

Re: Struts URLs for perfectionists like Ebay's URLs

2007-09-25 Thread Vo Van Thuong
Here is another approach suggested by Peter Hilton. On 20 Sep 2007, at 06:37, Vo Van Thuong wrote: I've just read your article at http://www.lunatech-research.com/archives/2005/07/29/struts-urls, and i find it very useful for me. I'm glad if it helps you. would you pls give me

Re: [s2] Struts head tag KILLS (> 10s) page load time

2007-09-20 Thread Van Riper
support I need in my own webapp development these days. YMMV. -Van -- Mike "Van" Riper [EMAIL PROTECTED] http://weblogs.java.net/blog/van_riper/ Silicon Valley Web Developer JUG https://sv-web-jug.dev.java.net JUGs International MAP http://tinyurl.com/ynktb2 --

Re: Struts URLs for perfectionists like Ebay's URLs

2007-09-19 Thread Vo Van Thuong
Hi Vinny, I'd like users to access to my website by URLs like Ebay's: http://listings.ebay.com/_W0QQcoactionZcompareQQcoentrypageZsearchQQcopagenumZ1QQfromZR2QQftrtZ1QQftrvZ1QQsabfmtsZ1QQsacatZQ2d1QQsaobfmtsZinsifQQsocmdZListingCategoryList In which we can't see which one is get parameters which

Struts URLs for perfectionists like Ebay's URLs

2007-09-19 Thread Vo Van Thuong
Hi, I'm very interested in Ebay's Urls, would someone pls give me some ideas about Ebay's Urls. why they do that and can i also make my Urls like Ebay's? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional command

Re: struts 2.0.9 with the dynamic tree

2007-09-17 Thread Vo Van Thuong
Hi, I also had the same problem, and have found the solution: + create a new folder named under folder ( has same level as and put the attached file in that folder (template\ajax\tree.ftl) + try this new function, in which parameter is replaced with function treeNodeSelecte

iterator tag with only an int as input value

2007-09-16 Thread Vo Van Thuong
Hi, i'm wondering if there is anyway to use like this: should be the same as below, if pagesNum=5: Thanks, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PRO

iterator with only an int as input value

2007-09-16 Thread Vo Van Thuong
Hi, i'm wondering if there is anyway to use like this: should be the same as below, if pagesNum=5: Thanks, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PRO

Re: Ajax using XMLHttpRequest and Struts

2007-09-11 Thread Van Riper
ntelliJ IDEA that will detect obvious compile issues with your scriptlet logic in JSP files. Good Luck, Van -- Mike "Van" Riper [EMAIL PROTECTED] http://weblogs.java.net/blog/van_riper/ Silicon Valley Web Developer JUG https://sv-web-jug.dev.java.net JUGs International MAP http:/

[S2] Successfully migrated my WW-2.2 app to Struts-2.0.9

2007-08-06 Thread Van Riper
iccups during a full regression test run, but, things are basically working now. This was done on a SVN branch, but, I should be able to make the same changes in a matter of hours (thanks to IntelliJ) on our main trunk later this week after completing my regression testing on the branch. Phew!

Re: ActiveMQ Problem migrating from WebWork 2.2.2 to Struts 2.0.9

2007-08-06 Thread Van Riper
ead with a more appropriate topic for my current problem. -Van P.S. I already found the Wiki docs about sitemesh integration, but, that was not enough in my case. :-( On 8/3/07, Don Brown <[EMAIL PROTECTED]> wrote: > Struts 2 behaves quite differently based on what plugins are > installed

ActiveMQ Problem migrating from WebWork 2.2.2 to Struts 2.0.9

2007-08-03 Thread Van Riper
at catches everyone up to my current situation. Here is the full console log output for my latest failed webapp startup: cmd /c C:\java\apache-tomcat-5.5.17\bin\catalina.bat run Using CATALINA_BASE: C:\Documents and Settings\van\.IntelliJIdea60\system\tomcat_Unnamed_7c1b22c1 Using CATALINA_HOME:

Re: s2: Base url in jsp's

2007-06-21 Thread Van Riper
app framework support required. We give the base element an "id" because we have some javascript functions that need to access the base document URL dynamically. This makes it easy to do the element lookup by id via Javascript elsewhere. Cheers, Van Mike Van Riper [EMAIL PROTECTED] Silicon

struts Multipart

2007-04-26 Thread Michel Van Asten
exception: org.apache.struts.upload.CommonsMultipartRequestHandler at org.apache.struts.util.RequestUtils.getMultipartHandler(RequestUtils.jav a:573) at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:433) Michel Van Asten - To unsubscribe, e-ma

Generic Selection Screen

2007-03-19 Thread Michel Van Asten
n d confirm. Very basic code... I just want to avoid copy paste the code for all the numerous list... One of the possibility is to use a general purpose property for the list... Just filled before display... But that's not very clean any other idea ??? Michel Van Asten -

expression evaluation

2007-02-19 Thread Michel Van Asten
back is an expression users[0].uid Is there a standard or clean way to evaluate such expression at server side ? Regards, Michel

Re: [OT][ANN] Hands-On Flex Session in Moutain View, CA on Feb 7th

2007-01-27 Thread Van
o VeriSign Security in advance of the meeting. RSVPs will be accepted after that date, but, early RSVPs will be greatly appreciated. They help us to plan for the room configuration and refreshments. Thanks! Mike "Van" Riper [EMAIL PROTECTED] Silicon Valley Web Developer JUG https://sv-web-jug

[OT][ANN] Hands-On Flex Session in Moutain View, CA on Feb 7th

2007-01-21 Thread Van
arded message below includes a link to the full online announcement with RSVP instructions and directions to the meeting site. This is a JUG meeting that is open to the public and free to attend. FYI, Van Mike "Van" Riper Silicon Valley Web Developer JUG https://sv-web-jug.dev.java.net -

Re: How to reduce redundant form code in JSPs?

2007-01-03 Thread Van
table rows with label in one column and field in adjacent column of same table row. -Van -- - Mike "Van" Riper [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Design

2006-11-29 Thread Michel Van Asten
forward. Regards, Michel Van Asten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

iterate through two collections

2006-11-10 Thread Van Nguyen
Hi,    I have two ArrayList that I need to iterate through:       // write info contained in collection2   // something like this… but not working??     collection1 and collection2 will always have the same number of records…   Any ideas?

HTML:FILE

2006-11-07 Thread Van Nguyen
I’m trying to create a jsp page that can upload a file.  Everything works, but I cannot apply my style to the “Browse” button:     That displays the regular button… I apply the same styleClass to the submit button and that works out fine:     Any ideas on why it my style won’t app

RE: render trademark symbol

2006-10-11 Thread Van Nguyen
e a more elegant way about this? -Original Message- From: Van Nguyen Sent: Tuesday, October 10, 2006 11:59 AM To: Struts Users Mailing List Subject: RE: render trademark symbol Ok... setting the filter to false works. Thanks! -Original Message- From: Ed Griebel [mailto:[EM

RE: render trademark symbol

2006-10-10 Thread Van Nguyen
s what you are looking for. On 10/10/06, Nuwan Chandrasoma <[EMAIL PROTECTED]> wrote: > hi, > > set the filter attribute of bean:write tag to false and try > > > - Original Message - > From: "Van Nguyen" <[EMAIL PROTECTED]> > To: "Struts U

RE: render trademark symbol

2006-10-10 Thread Van Nguyen
escaping the & so maybe you could try adding escapeXml="false" inside the bean:write tag. -ed On 10/10/06, Van Nguyen <[EMAIL PROTECTED]> wrote: > That displays: > (r) > > We need it to display: > (tm) > > > -Original Message- > From: Martin G

RE: render trademark symbol

2006-10-10 Thread Van Nguyen
its contents - Original Message - From: Van Nguyen To: user@struts.apache.org Sent: Tuesday, October 10, 2006 1:13 PM Subject: render trademark symbol Hi, I'm using struts 1.2.9 and am running into a problem rendering the trademark symbol using the bean t

render trademark symbol

2006-10-10 Thread Van Nguyen
Hi,   I’m using struts 1.2.9 and am running into a problem rendering the trademark symbol using the bean taglib.   I have this string stored in my lucene index as:   W.Rose™ Convex Jointer   It stores it in my bean as such… but when I use the tag, it displays it as:  

Re: custom tag and html:rewrite

2006-09-25 Thread Van Stalle
message in error, please > notify > the sender immediately by telephone or email and destroy the original > message without making a copy. Thank you. > > > > - Original Message - > From: "Van Stalle" <[EMAIL PROTECTED]> > To: > Sent

custom tag and html:rewrite

2006-09-25 Thread Van Stalle
Hey, I am writing a custom tag and I need to rewrite a link to an image from with the tag-code (by overiding the doStartTag method); I know that in a jsp-page you can do this with html:rewrite .. but how to do this from within java-code ? Any hints would be welcome. Jan -- View this message

Re: Oracle AS jsp:setProperty problem, Struts alternative?

2006-09-20 Thread Scott Van Wart
Chris Pratt wrote: That's basically what the Struts bean: taglib and JSTL c: (core) taglib's are for. Give them a look. (*Chris*) c:set looks like it will work. I figured bean:... would have all I need, but IIRC some tags were deprecated because of some of the jsp:XXX tags. Thanks, Scott

Oracle AS jsp:setProperty problem, Struts alternative?

2006-09-20 Thread Scott Van Wart
Is there a Struts (1.3.5) alternative to the tag? works fine when it's close to the tag, but when it's farther down the page, Oracle's JSP translator might put the setProperty translation in a separate method than the bean declaration in the output .java file. Kind of like this (simplified

Re: Out of topic, Oracle SEQUENCE

2006-09-15 Thread Scott Van Wart
In PL/SQL: DECLARE new_user_id NUMBER; BEGIN INSERT INTO users ( user_id, user_name ) VALUES ( user_seq.NEXTVAL, 'userName' ) RETURNING user_id INTO new_user_id; END; So, similarly (though a little bit of a hack), in JDBC (since generatedKeys() or whatever they call it isn't supporte

Re: empty fields of an input form get default value after submitting

2006-09-14 Thread Scott Van Wart
Laurie Harper wrote: Sandra Reichert wrote: Hi, I have an input form in jsp. After submitting empty fields (user entered nothing in input field) are set by default with specific values depending on their data typ. So an empty Integer field is set to 0, an String field to "" an so on. But i wan

Re: "name" Attribute in tag

2006-09-06 Thread Scott Van Wart
Ashish Vijaywargiya wrote: Hi, Anybody of you know the specific reason of "Why the "name" attribute is not provided in the tag???". Thanks in advance. Regards Ashish Vijaywargiya Struts uses the "name" attribute to repopulate your form on submit. So if you have an action /someAction m

1.3.5 - Exception handler ignoring 'bundle' attribute?

2006-09-01 Thread Scott Van Wart
I can't get the exception handler in struts-config.xml to use the 'bundle' attribute: It always tries to look in the default (MessageResources.properties). Is this a known issue or am I doing something bad? - Scott --

Extending tag libraries

2006-08-30 Thread Scott Van Wart
This is a little OT, but it, uh, kind of has to do with Struts :). I'm interested in adding a few attributes to some of the struts tags. They're really only useful in the context of a specific web project I'm working on, so I'd really prefer not to edit the Struts TLD and implementation (for

Re: HttpSession facade

2006-08-29 Thread Scott Van Wart
Madhav Bhargava wrote: I was going thru the struts source code and was in particular reading the way they have implemented the synchronizer token pattern for preventing multiple submits on transacional pages. I saw that they have synchronized on session ID attribute. Is it possible that multiple

Re: Creating new Session without invalidating the old one

2006-08-29 Thread Scott Van Wart
[EMAIL PROTECTED] wrote: Hello! Is it possible to create a new session for an already logged in person (which has an actual session) without invalidating the existing session? It's necessary for me to have the old session before creating an additional one, because I have to get few datas from th

Re: [OT] migrate Struts app from jdk 1.4 to jdk1.5

2006-08-26 Thread Scott Van Wart
Thibaut wrote: I migrate a Struts app from jdk 1.4 to jdk1.5 I have warnings I would like to solve : 1) the clone() function I have a "Type Safety" exeption with this kind of code : current.setUserRights((TreeSet) this.userRights.clone()); 2) Cast make a warning : TreeSet mySet = (TreeSet) req

Re: SELECT ... FOR UPDATE

2006-08-25 Thread Scott Van Wart
Konrad Billewicz wrote: I know that my problem hasn't do much with JBoss but I decided to post it here. If you know more suitable place, show me it please. I have a Session EJB deployed on JBoss. I'm using JDBCTemplate (from Spring framework) to connect with Oracle 9i database (defined as dat

Re: [JAVA]How to get datatbase connection from lookup to datatsource name in a standalone java application

2006-08-25 Thread Scott Van Wart
Jimmy Emmanual wrote: 1. Bind datasource to a file system context try { Hashtable env = new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.fscontext.RefFSContextFactory"); env.put(Context.PROVIDER_URL, "file:/C:/temp/jndi"); Problem with that is, if

Re: [1.3] Session ActionMessages won't go away

2006-08-25 Thread Scott Van Wart
Niall Pemberton wrote: Dam, looks like I missed updating the tiles version of the chain-config.xml - the version in struts-core-1.3.5.jar has that command. Could you file a JIRA issue for this please: https://issues.apache.org/struts/browse/STR Okie, https://issues.apache.org/struts/browse/STR

Re: Tiles & JSP question

2006-08-25 Thread Scott Van Wart
Adam Gordon wrote: Duh I was thinking to myself how rude a reply this was... then I noticed the sender was the same. Nicely done :). - Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

Re: [1.3] Session ActionMessages won't go away

2006-08-25 Thread Scott Van Wart
Niall Pemberton wrote: The functionality to automtaically remove messages cached in the session was missing from Struts 1.3.x and only added recently in the Struts 1.3.5 version: http://issues.apache.org/struts/browse/STR-2883 http://svn.apache.org/viewvc?view=rev&revision=412834 Are you

Re: [OT] request.getServletPath() val not same in Filter & Servlet

2006-08-24 Thread Scott Van Wart
pantichd wrote: Hello, Sorry for posting this in Struts mailing list but I can't seem to get an answer on any other discussion groups. I've always had great results getting good answers here so here goes... I have a Filter in my app that uses the request.getServletPath() method to get the name

[1.3] Session ActionMessages won't go away

2006-08-24 Thread Scott Van Wart
Hi, I have something very close to the following in each of my pages (actually, just in the layout page for tiles, but whatever). Worked fine in Struts 1.2.9 (even though I'm not so sure it's the best way to print messages and errors, but oh well...)

Re: [JAVA]How to get datatbase connection from lookup to datatsource name in a standalone java application

2006-08-24 Thread Scott Van Wart
Caroline Jen wrote: Context ctx = new InitialContect(); DataSource ds = (DataSource)ctx.lookup("java:com/env/jdbc/DBName"); Connection con = ds.getConnection(); Right, but that's assuming it's already bound, which is the hard part, and unless he's running it under OC4J, no such luck... - Sc

Re: [JAVA]How to get datatbase connection from lookup to datatsource name in a standalone java application

2006-08-24 Thread Scott Van Wart
temp temp wrote: My java standalone application wants connection to database with lookup to datasource name which is configured in the oc4j app server. Please guide me with some ideas to achieve this. You need to bind it yourself, to some provider. I use the DBCP provided with Tomcat (nam

[SOLVED] Re: Auto render form bean as hidden fields

2006-08-23 Thread Scott Van Wart
In case anyone's curious, here's the synopsis of my solution: - Manually annotate (Java 1.5) the private fields I want to "track". - Have a base class that stores the original state (when a record is first loaded from the database, for editing, for example). - Write a class that walks through th

Re: Can we specify variables in html form tags action attribute

2006-08-23 Thread Scott Van Wart
Chetan Pandey wrote: pageContext.setAttribute(propertyaction,"propertyaction");%> pageContext.setAttribute() is a standard map-based pattern. All of these use (key, value) and not (value, key) as you have above. Swap the two arguments. Remember your scope (third parameter). - Scott ---

Re: TagExtraInfo ,getVariableInfo

2006-08-23 Thread Scott Van Wart
Raghuveer wrote: WHy exactly TagExtraInfo to be implemented. What makes difference it this is used and not used in in TLD file Example: MessagesTei extends TagExtraInfo { TagExtraInfo { public IterationTEI() { super(); } public VariableInfo[] getVariableInfo(TagData data) {

Re: Form Validation

2006-08-23 Thread Scott Van Wart
Chetan Pandey wrote: Is their a way to specify multiple inputs. Nope. A wise man once told me that validate="true" is there only for convenience. So the workaround is to do something like 'validate="false"', omit the input= tag, and add forwards like, public void create( ActionM

Re: When my JSP calls the action class SErvlet Exception is thrown.

2006-08-23 Thread Scott Van Wart
sheetal wrote: _Does anybody has any idea why is it so...(Why is the servlet exceotion thrown) Couple of things to check: - In struts-config.xml, make sure your package names and class names of your and tags are all spelled correctly, including case. - Do the same for your ActionForm and

Re: about overriding the excute method

2006-08-23 Thread Scott Van Wart
Gomathi wrote: hai, what will happen when the execute () of action class is overrided by the subclass called dispatch action?. Regards gomes If you mean extending DispatchAction, your execute() method will get called. Unless you have a call to super.execute() (which then calls DispatchA

Creating a DynaBean from an ActionForm on the fly

2006-08-23 Thread Scott Van Wart
Is it possible to get a DynaBean object from an ActionForm programmatically? I need to create a copy of a form, but cloneBean isn't working. I have a map-based nested bean (which lets me do stuff like 'myform.child(ABC).name), but cloneBean does a SHALLOW (argh!) copy of the map so the origin

Re: Question about Lookup dispatch action

2006-08-23 Thread Scott Van Wart
mosho wrote: Hi Scott, I added a unspecified() method in my action class and it works now. I am not able to understand though how it is working, unspecified() is called when parameter name doesn;t exist, right? I have a parameter name= navigation and its value is shown as {submitText}. But it c

Re: Question about Lookup dispatch action

2006-08-23 Thread Scott Van Wart
mosho wrote: Yes, that's exactly the way it works. My navigation with lookupDispatchAction works perfectly. The problem arises when I have another to link instead of button to submit the form, how do I pass navigation parameter value then? The javascript with hidden field doesn't solve the proble

Re: Question about Lookup dispatch action

2006-08-22 Thread Scott Van Wart
mosho wrote: Request[/planName] does not contain handler parameter named navigation In your struts-config.xml, are you including 'parameter="navigation"' in your action mapping? A la: name="planNameForm" parameter="navigation"> ... The parameter gives you a place to pass additio

Re: Question about Lookup dispatch action

2006-08-19 Thread Scott Van Wart
Puneet Lakhina wrote: OK One more thing, if you need to call this javascript method even from ur submit button, to set the property value then you can do /> Notice the return false there. In case of a link simply do I hope this was what you wanted. The "return false;" would have to g

Re: Question about Lookup dispatch action

2006-08-18 Thread Scott Van Wart
mosho wrote: Hi Scott, It doesn't seem to work. My submit buttons look like this:     Now, if I have a link, how can I set the property navigation for it. " onClickSubmit() pic.gif " Well first you should probably get rid of 'value="Previous"', since you should be (an

Re: Ready-made function somewhere to escape HTML?

2006-08-17 Thread Scott Van Wart
Frank W. Zammetti wrote: Hi Scott... have a look at the ResponseHelpers class in Java Web Parts: http://javawebparts.sourceforge.net More precisely: http://javawebparts.sourceforge.net/javadocs/index.html The encodeEntities() method should do the trick. Ahh... that class name you mentioned

Re: Question about Lookup dispatch action

2006-08-17 Thread Scott Van Wart
Christopher Goldman wrote: On Thu, 2006-08-17 at 14:26 -0700, mosho wrote: Hi All, I have multiple buttons on my form and I am using LookUpDistpatchAction to submit the form depending on which button is clicked. I have another requirement now, I have multiple images that are going to be lin

Re: Auto render form bean as hidden fields

2006-08-17 Thread Scott Van Wart
Laurie Harper wrote: Scott Van Wart wrote: We have a requirement that the user be prompted if any changes have been made on a form, and they try to navigate away. I've divided this up Firstly, is the requirement to detect changes to the form compared to how it was last rendered, or com

Ready-made function somewhere to escape HTML?

2006-08-17 Thread Scott Van Wart
Hello, I have user-entered input managed by a few custom tags (Java classes, not tag files), and I need to encode this stuff to escape any special HTML characters the user might type. Is there a special one in Struts I can/should use, or should I write my own? (Struts 1.2.9, Tomcat 5.5.17)

Re: What's the difference between struts-base and struts-el?

2006-08-16 Thread Scott Van Wart
Michael Cheung wrote: Hi, all; What's the difference between struts-base to struts-el. My general understanding is: - struts-el is so you can use EL expressions in your Struts tags without having to use servlet 2.4. The JSP compiler won't compile the EL, so it's up to Struts to do it. Us

Re: Forwards between webapps

2006-08-16 Thread Scott Van Wart
Saeed, Rada wrote: Forwards between webapps are not supported, cuz both have different contexts, this's what I got from running this : Is there any other way to achieve this forward between different web applications ? I think the class 'org.apache.struts.actions.SwitchAction' might do the t

Re: Validator Client-Side and Custom Classes

2006-08-16 Thread Scott Van Wart
Mississippi John Hurt wrote: Hi, I want to do client-side validation using a custom class I can specify in the validator.xml section. But my question is if I use a custom class, then how the heck can Struts generate the custom javascript for it in the jsp if I'm using a custom java class I wr

Auto render form bean as hidden fields

2006-08-16 Thread Scott Van Wart
We have a requirement that the user be prompted if any changes have been made on a form, and they try to navigate away. I've divided this up into sub tasks: - Iterating through properties of a bean. - Render properties as hidden fields. - Render some JavaScript to check for modifications. The

Re: LookupDispatchAction using wrong resource bundle!

2006-08-16 Thread Scott Van Wart
LookupDispatchAction checks ALL the resource bundles (and doesn't even stop when it finds the key). Does anyone see any reason why it can't use the same mechanism as everything else, or has this been fixed in a later version? - Scott --

Re: I can't put 'maxlength' validator values in my .properties file?

2006-08-16 Thread Scott Van Wart
David Friedman wrote: Right, but the invoked Resources.getActionMessage() has calls inside it for the bundle in the current trunk: http://svn.apache.org/viewvc/struts/struts1/trunk/core/src/main/java/org/apa che/struts/validator/Resources.java?view=markup It looks like it hasn't changed from the

Re: I can't put 'maxlength' validator values in my .properties file?

2006-08-16 Thread Scott Van Wart
David Friedman wrote: Right, but the invoked Resources.getActionMessage() has calls inside it for the bundle in the current trunk: http://svn.apache.org/viewvc/struts/struts1/trunk/core/src/main/java/org/apa che/struts/validator/Resources.java?view=markup It looks like it hasn't changed from the

Re: I can't put 'maxlength' validator values in my .properties file?

2006-08-16 Thread Scott Van Wart
David Friedman wrote: I think you need to have at least Struts v1.2.8 unless you manually upgraded the Commons Validator jar up to version 1.2.0. If I understand correctly, validator versions before 1.2.0 (Struts < 1.2.8) don't actually make use of the "bundle" attribute in your validator xml fi

Re: I can't put 'maxlength' validator values in my .properties file?

2006-08-16 Thread Scott Van Wart
David Friedman wrote: I think you need to have at least Struts v1.2.8 unless you manually upgraded the Commons Validator jar up to version 1.2.0. If I understand correctly, validator versions before 1.2.0 (Struts < 1.2.8) don't actually make use of the "bundle" attribute in your validator xml fi

Re: [OT]Scriptlets

2006-08-16 Thread Scott Van Wart
Rahul Akolkar wrote: Yes, for reasons such as avoiding a heterogeneous programming model, improving readability etc. It also lets you trick your web design team into doing some coding through tag libraries without actually forcing them to write classic code :). j/k -

I can't put 'maxlength' validator values in my .properties file?

2006-08-16 Thread Scott Van Wart
I tried the following: Now I figured that this would cause the maxlength validator to get the value for maxlength from message resources, rather than hardcoding it with var, var-name and var-value tags. But it doesn't! It only uses this to pass to the {0} in the error message (i

LookupDispatchAction using wrong resource bundle!

2006-08-16 Thread Scott Van Wart
I have multiple resource bundles in addition to the default one in struts-config.xml: key="constraints" factory="ca.indosoft.common.resource.ConstraintResourcesFactory" null="true" /> In my Action: protected void create( ... ) { ... } // and so on... protected Map getKeyMetho

[SOLVED?] Re: Map-based nested bean--No bean specified?

2006-08-14 Thread Scott Van Wart
oticed the typo (was creating a new child, putting it into the map, but then STILL returning null. Note that setChild( String id, ChildPerson child ) never gets called by the framework. So my final question: Is all this a good idea? :) - Scott Scott Van Wart wrote: I posted on this before, so

Map-based nested bean--No bean specified?

2006-08-14 Thread Scott Van Wart
I posted on this before, so I thought I'd post a more concrete example this time. I'm using a map-based nested bean, and I'm getting the following error: java.lang.IllegalArgumentException: No bean specified org.apache.commons.beanutils.PropertyUtilsBean.getPropertyDescriptor(PropertyU

Map-based nested bean

2006-08-09 Thread Scott Van Wart
(Struts 1.2.9, Tomcat 5.5.17) I have something similar to the following in my ActionForm: public class MyForm extends ActionForm { public static class NestedBean { private String name; private String value; // String getName(), String getValue(), void

Determine whether or not a string is a Tiles definition

2006-08-03 Thread Scott Van Wart
Is there a method anywhere I can use to quickly determine whether or not a given String is a tiles definition? - Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Accepting multiple date masks with the "date" validator

2006-08-03 Thread Scott Van Wart
Adam Gordon wrote: Heh. Regular Expressions aren't for everyone - I happen to work w/ two engineers who live and die by them. In your bean setter for the date, I'd make sure no exceptions could be thrown, or handle them - the code I took over from an engineer we had that left had this issue

Thread-safe MessageResources[Factory]

2006-08-03 Thread Scott Van Wart
I'm implementing my own MessageResources and MessageResourcesFactory-derived classes. Do these need to be thread-safe, specifically, the 'String MessageResources.getMessage( Locale locale, String key )'? Thanks, Scott - To

  1   2   3   >