Null mapping reference in MappingDispatchAction

2008-12-02 Thread Adam Gordon
Hi- We're using a MappingDispatchAction (Struts 1.2.9) and occasionally when a user makes a request to the URI for this action we get a NullPointerException in the class because the ActionMapping is null. Other than saying "mapping = null," does anyone have any idea how the mapping reference

Re: Text formatting

2008-04-16 Thread Adam Gordon
James- I'm sure this was totally unintentional and you did it to simply get the email address of the mailing list, but thread hijacking is generally frowned upon in support mailing lists. --adam Hartrich, James CTR USTRANSCOM J6 wrote: Struts2.0.9 Has anyone successfully formatted a number

Re: Validation of Struts XML files

2008-04-16 Thread Adam Gordon
Any other ideas? --adam Dave Newton wrote: Does it work if you use the DTD it says to use? http://struts.apache.org/dtds/struts-config_1_3.dtd";> Dave --- Adam Gordon <[EMAIL PROTECTED]> wrote: Last night, our company had a maintenance window whereby Internet access was sh

Validation of Struts XML files

2008-04-16 Thread Adam Gordon
Last night, our company had a maintenance window whereby Internet access was shut off from our office to the outside world. During that time I was doing development and attempted to start up our web app in a development environment. I've not seen this error in almost 2 years but it's apparent

Re: get the Locale from Action[S2]

2008-03-05 Thread Adam Gordon
That's what I figured, so how does it determine the user's locale? aj2r wrote: Return the locale of the user's browser. Adam Gordon wrote: dumb question, but does that return the locale of the user or the locale of the server on which the web app is running? if the forme

Re: Struts App - Tomcat on Windows in India and Poland

2008-03-05 Thread Adam Gordon
Jeremy- Dude, don't waste your time with this guy. He's been given all the answers he needs and he ignores them. Basically, he needs to ensure that his web app uses UTF-8 character encoding and it will work correctly, but instead of following everyone's advice here, he keeps posting new mes

Re: get the Locale from Action[S2]

2008-03-04 Thread Adam Gordon
dumb question, but does that return the locale of the user or the locale of the server on which the web app is running? if the former, how does it determine the user's locale? thanks. --adam aj2r wrote: slideharmony wrote: Hello, anybody knows how can I get the client machine's Locale f

Re: [OT] Re: Dead code parser/finder for Struts

2008-02-29 Thread Adam Gordon
ran with it, even if it meant it wasn't appropriate to use in a given instance. --adam Dave Newton wrote: --- Adam Gordon <[EMAIL PROTECTED]> wrote: Does anyone know if there's a server side library that can parse JSP pages (or the generated Java file) and look for dead Struts code?

Dead code parser/finder for Struts

2008-02-29 Thread Adam Gordon
Does anyone know if there's a server side library that can parse JSP pages (or the generated Java file) and look for dead Struts code? We subbed out a project and recently took back control of the code due to various issues one of which was very poor code quality. Looking through their JSP pa

File upload issues when maxFileSize is exceeded.

2008-02-07 Thread Adam Gordon
We're using Struts 1.2.9 and the problem we're seeing is that if a user tries to upload a file that does not exist or upload a file that exceeds the maxFileSize attribute the FormFile object on the ActionForm is null and so we cannot distinguish between the two. We thought about removing the m

Re: Configuring Struts to use UTF-8 character encoding

2007-12-05 Thread Adam Gordon
he request setting the character encoding afterwards appears to have no effect. As mentioned above, moving the character encoding filter to #1 in the chain fixed it. Adam Gordon wrote: I didn't know that page existed though it's essentially what I wound up doing. My only concern no

Re: Configuring Struts to use UTF-8 character encoding

2007-11-30 Thread Adam Gordon
f our web forms... Thanks for the link. --adam Ted Husted wrote: On Nov 28, 2007 10:53 AM, Adam Gordon <[EMAIL PROTECTED]> wrote: What about the use of a filter to set the character encoding? Is this the only way to go for Struts? I'd say so. It might be possible to add some

Re: Configuring Struts to use UTF-8 character encoding

2007-11-28 Thread Adam Gordon
way to go for Struts? --adam Martin Gainty wrote: Adam- remember the URI_Encoding for your mod_jk connector http://confluence.atlassian.com/display/DOC/Configuring+Tomcat's+URI+encodin g M-- - Original Message - From: "Adam Gordon" <[EMAIL PROTECTED]> To: "

Configuring Struts to use UTF-8 character encoding

2007-11-27 Thread Adam Gordon
Anyone know if there's a configuration parameter somewhere in Struts 1.2.9 that configures the requests to use UTF-8 character encoding? Everything I've found on the web says that Tomcat uses ISO-8859-1 as the default character encoding and that the "fix" is to add a filter that simply sets th

RE: opening a new window if validated

2007-11-19 Thread Adam Gordon
It could actually be both. I assume you are using both client and server side JavaScript validation (at the very least you should be doing server side since HTML pages can be manipulated). So, assuming you are doing both, you need the page you submitted the data on to go somewhere because you wan

Re: [struts] JAAS and Struts Re-authentication Question

2007-11-19 Thread Adam Gordon
it's pretty clear that either we're not using JAAS correctly, or it's just not capable of doing what we need it to do. Thanks for all the feedback. --adam Dale Newfield wrote: Adam Gordon wrote: I think the solution is going to be to redirect the user to the default main pa

Re: [struts] JAAS and Struts Re-authentication Question

2007-11-16 Thread Adam Gordon
Yea, but in this case, it may be something we need to live with. The login page scriptlet code looks for the login credentials in the request and sets the appropriate form fields as well as a flag we use to indicate whether the form should be submitted immediately upon loading and in either ca

Re: [struts] JAAS and Struts Re-authentication Question

2007-11-16 Thread Adam Gordon
Let me get this straight: All pages in your webapp are protected (not available to non-logged in users), so when someone who is logged in on the company's main site tries to get to a page in your webapp, JAAS catches it and sends them to your webapp's login page, which might be able to glean e

Re: [struts] JAAS and Struts Re-authentication Question

2007-11-15 Thread Adam Gordon
See my comments in my response to Laurie. We're basically using dual login pages, one on our main website (Apache) and the other in our webapp. I'm currently toying with the idea of a Filter to detect the subsequent logins against an already authenticated session. --adam Dale Newfield wrote

Re: [struts] JAAS and Struts Re-authentication Question

2007-11-15 Thread Adam Gordon
og in...' and how it is failing (i.e. 'user stays logged in as old user'), along with specific details of how you have authentication configured. L. Adam Gordon wrote: If you mean protecting the page w/ a security constraint, I think that would be a problem in that JAAS would

Re: [struts] JAAS and Struts Re-authentication Question

2007-11-14 Thread Adam Gordon
bypass any authentication mechanism. --adam Dale Newfield wrote: Adam Gordon wrote: We're using JAAS for webapp authentication and we've discovered an issue: If user A is logged in and tries to log in as user B, they stay logged in as user A. Couldn't you protect the login for

JAAS and Struts Re-authentication Question

2007-11-13 Thread Adam Gordon
Hi- We're using JAAS for webapp authentication and we've discovered an issue: If user A is logged in and tries to log in as user B, they stay logged in as user A. We know how to detect if a user's already authenticated (we have some static objects stored on the session) but we're not sure w

Re: Struts 1.2.9 and UNICODE issue on form submittal

2007-06-01 Thread Adam Gordon
You know, I had my doubts about whether or not Struts was really actually doing anything with POST request parameters other than just reading them. It did seem to me that it was more of an issue at the Tomcat level since Tomcat is the one serving up the parameters. After some digging, there's

Re: Struts 1.2.9 and UNICODE issue on form submittal

2007-05-31 Thread Adam Gordon
Chris- See answers below... Christopher Schultz wrote: I just ran it through Wireshark and followed the TCP stream verifying that it's being encoded correctly into 3 bytes - it is (E2 80 A2). Is this the UTF-8 code that /should/ represent those bullet characters? I would assume so.

Re: Struts 1.2.9 and UNICODE issue on form submittal

2007-05-30 Thread Adam Gordon
5/29/07, Adam Gordon <[EMAIL PROTECTED]> wrote: We're using the html:form element and we have the acceptCharset attribute set to "UTF-8" and when we enter a unicode character in a textarea in this form element, the UTF-8 character (in this case \u2022, the bullet symbol: •) di

Re: Struts 1.2.9 and UNICODE issue on form submittal

2007-05-30 Thread Adam Gordon
he issue. After you test in 1.3.8, if it still happens, please open up a JIRA ticket and attach a sample web page. I will use that to fix the problem, if it still exists. Paul On 5/29/07, Adam Gordon <[EMAIL PROTECTED]> wrote: We're using the html:form element and we have the acce

Re: Struts 1.2.9 and UNICODE issue on form submittal

2007-05-30 Thread Adam Gordon
n 1.3.8 and see if I can reproduce. Basically, the behavior we're seeing is that the 3 bytes are being treated as separate characters and not as one UNICODE character. -adam Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Adam, Adam Gordon wrote: We'r

Struts 1.2.9 and UNICODE issue on form submittal

2007-05-29 Thread Adam Gordon
We're using the html:form element and we have the acceptCharset attribute set to "UTF-8" and when we enter a unicode character in a textarea in this form element, the UTF-8 character (in this case \u2022, the bullet symbol: •) displays correctly. However, when the form is submitted, I'm print

Re: ForwardAction question/issue

2007-04-25 Thread Adam Gordon
adam Paul Benedict wrote: Adam, It sounds like you have your "protected" logic in the JSP. If so, then the JSP will always be rendered. You should instead put such security logic in the application, such as in the Struts Controller. It's no good putting it on the JSP. Paul

ForwardAction question/issue

2007-04-24 Thread Adam Gordon
Hi- So we're using ForwardAction for URIs that can just link to a JSP page and don't need a customized Struts Action to perform tasks ahead of time. When a user connects to our website, we essentially direct the user to the default main page, which is protected, so they have to log in first

Re: Thread.sleep(...) in Struts Action

2007-03-09 Thread Adam Gordon
Paul- Thanks for the response. I agree the implementation isn't great, but it's all we could come up with so far. Disabling the username isn't really feasible because we then affect the legitimate owner of that login - we work in a pretty competitive market and our clients rely on our servi

Re: Thread.sleep(...) in Struts Action

2007-03-09 Thread Adam Gordon
wrote: On 3/9/07, Adam Gordon <[EMAIL PROTECTED]> wrote: Our login page performs a POST to authenticate and I'd like to put in a delay when a login failure occurs so that it hinders/frustrates any malicious users and any scripts they might be running. I realize this isn'

Thread.sleep(...) in Struts Action

2007-03-09 Thread Adam Gordon
I'm trying to determine the ramifications of putting a Thread.sleep(...) call in a Struts action - i.e. since only one instance of the action is created by the server, even though Tomcat is multi-threaded, would/could an invalid login by one user hinder a valid login by another user? Basically

Re: Struts Tiles question re menus

2006-12-12 Thread Adam Gordon
Views" in http://www2.lifl.fr/~dumoulin/tiles/tilesAdvancedFeatures.pdf This allows you to choose layouts on the fly. This can also be done by using just an org.apache.struts.tiles.Controller. -----Original Message- From: Adam Gordon [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 12, 2006 3:

Struts Tiles question re menus

2006-12-12 Thread Adam Gordon
Hi- We're using Tiles to define submenu items (in a putList) for menu we have in our web app. We're using a custom menu object that has a visibility flag that we can toggle depending on whether or not the user has permission to see a given menu functionality. My problem is that I can't seem

Re: SimpleMenuItem and tiles/putList

2006-12-04 Thread Adam Gordon
Oh sweet! Thanks. That saves us a TON of potential work. --adam Strachan, Paul wrote: HTH -Original Message- From: Adam Gordon [mailto:[EMAIL PROTECTED] Sent: Tuesday, 5 December 2006 10:20 AM To: user@struts.apache.org Subject

SimpleMenuItem and tiles/putList

2006-12-04 Thread Adam Gordon
We have a home grown menu system we're using to display our web app's menu system and it includes, amongst other things, a method that tells whether or not the menu is visible. SimpleMenuItem does not have this, however, our menu item does and we've extended this class. We have some submenu i

Re: Struts, AJAX, JSP, and JavaScript question

2006-12-04 Thread Adam Gordon
nd that any review, disclosure, dissemination, distribution or copying of it or its contents - Original Message - From: "Adam Gordon" <[EMAIL PROTECTED]> To: Sent: Tuesday, November 28, 2006 3:43 PM Subject: Struts, AJAX, JSP, and JavaScript question I have a JSP and

Re: Struts, AJAX, JSP, and JavaScript question

2006-12-04 Thread Adam Gordon
Frank- Yikes, I had no idea this thread would take on a life of its own...regardless, the execScripts function was exactly what I was looking forhad to tweak it to accomodate for the "type='text/javascript'" attribute on an opening

Struts, AJAX, JSP, and JavaScript question

2006-11-28 Thread Adam Gordon
I have a JSP and there's a link in the rendered page that makes an AJAX call (to a Struts action) when clicked. The results of that action, and the contents of the response are set as the innerHTML on a hidden defined inside the afore mentioned rendered page. The is then un-hid. Everything is

Struts and JAAS - login page timeout

2006-09-29 Thread Adam Gordon
Not strictly a Struts question but we're using JAAS and Struts to handle login (form) authentication. Anyone know where/how the login page timeout is set? It's not the same as the session timeout. Thanks, -Adam - To unsubsc

Re: html:form problem

2006-09-21 Thread Adam Gordon
It looks like you might be using modules...are you? -adam Roberto C. Lima Jr. wrote: Hi, everyone. I have an app that will be published at internet with apache + JBoss Server. So, it will be published on the address above: http://sis.enovar.com.br/ B

Re: Redirect from tile controller

2006-09-15 Thread Adam Gordon
If you are using TilesRequestProcessor as your controller (and it's probably not limited to this class) you can extend it to add any methods you need to call from an Action's execute(...) method. The trick is getting an instance of the controller from within the action - and I don't know how t

Refresh HTTP Header and Struts

2006-09-14 Thread Adam Gordon
So the controller element in the struts config XML file has an attribute called "nocache" which, if set to true, sets some caching headers on the response. I don't see it in the documentation, but is there a way to set the Refresh header without using my own controller and setting it on all th

Re: fmt:formatDate question...

2006-09-07 Thread Adam Gordon
n time zones is that Sun is an American company? (In the words of Mel Brooks, "It's good to be the king...") -adam Adam Gordon wrote: Ok, so not specifically a Struts question, but anway... I'm using the fmt:formatDate element in a JSP and it appears that when the value

fmt:formatDate question...

2006-09-06 Thread Adam Gordon
Ok, so not specifically a Struts question, but anway... I'm using the fmt:formatDate element in a JSP and it appears that when the value of my "pattern" attribute includes "zz" (the time zone, my full format is "hh:mm a zz") then for US time zones (e.g. PST, PDT, MST, MDT, etc...) then the sam

Re: Can I Bypass using actionform? Cannot retrieve definition for form bean null on action...

2006-09-06 Thread Adam Gordon
If your "type" attribute equals "org.apache.struts.actions.ForwardAction" (and there may be others) then you don't need the name attribute. You are getting that error because you are specifying a custom action and there's no associated form bean. You can use ForwardAction if you just want a U

Re: validateValidWhen and javascript

2006-08-31 Thread Adam Gordon
J- IIRC, the J/S that is inserted is ALL the validation J/S whether you use it or not. I.e., even if you aren't using, say 'maxlength,' I belive that method is included. That said, we don't use client-side validation because you really should do server-side anyway and we didn't like the way

Re: Tiles & JSP question

2006-08-25 Thread Adam Gordon
Duh Adam Gordon wrote: Is there a way to retrieve a non-interpreted attribute value from a Tiles file? Specifically, if my Tiles def looks like this: Is there a tag I can use that will just return the String value of the above "body" attribute rather t

Tiles & JSP question

2006-08-25 Thread Adam Gordon
Is there a way to retrieve a non-interpreted attribute value from a Tiles file? Specifically, if my Tiles def looks like this: Is there a tag I can use that will just return the String value of the above "body" attribute rather than trying to interpret it? Both the and

Re: Using bean:message from non-struts servlet

2006-08-16 Thread Adam Gordon
For posterity, and hopefully to help others, here's what James did: 1. Placed basename="package.name.to.messages.file.ClassName" /> near the top of the JSP, though I suspect the location might be irrelevant...not sure... 2. Used to retrieve the specific resource message. -adam James San

Re: Getting maxFileSize from Controller in a JSP

2006-08-16 Thread Adam Gordon
if ((maxLengthExceeded != null) && (maxLengthExceeded.booleanValue())){ .. -Original Message- From: Adam Gordon [mailto:[EMAIL PROTECTED] Sent: Friday, August 11, 2006 9:16 PM To: Struts Users Mailing List Subject: Getting maxFileSize from Controller in a JSP

Re: JavaScript validation errors

2006-08-11 Thread Adam Gordon
Sean- You need to add an "onsubmit" attribute to your html:form" element that calls the validation function. Specifically, IIRC, it needs to say: onsubmit="return validateForm(this); happy coding, -adam O'Shea, Sean wrote: Hi all, I'm using struts 1.2.7 with commons-validator-1.1.4 and I'

Getting maxFileSize from Controller in a JSP

2006-08-11 Thread Adam Gordon
Is there a way to reference the controller for a module from within a JSP? Specifically, I'd like to ask the controller what the max file size is set to. There's a method on the ControllerConfig class to get the max file size and the Javadocs say it's a JavaBean so I suspect it might availabl

Re: clear vs. reset

2006-08-10 Thread Adam Gordon
Caroline- I can't speak for clear vs. reset, but if you look at the default implementation of reset(...), it doesn't do anything - you have to override it in your form bean to have it do anything. However, if you want to persist the data, you can set an attribute on the session and it will b

Re: html:checkbox issue

2006-08-10 Thread Adam Gordon
unchecked checkboxes. It's amazing how RTFM results in user education... Incidentally, I believe this is basically the same as what Kalpesh suggests in the follow up email... -Adam David Durham wrote: Adam Gordon wrote: I've got an html:checkbox in a form and the property is mapped/

html:checkbox issue

2006-08-10 Thread Adam Gordon
I'm sure this is a coding problem (they usually are...) on the server-side: I've got an html:checkbox in a form and the property is mapped/spelled correctly to the field/method in the bean. The behavior I am seeing is that the bean property (a boolean) is not being set based on the state of t

RE: Retrieving the from web.xml

2006-08-09 Thread Adam Gordon
If I understand what you are doing correctly you can use the security-constraint element in web.xml to define what URL patters require authorization and which ones do not. If you use JAAS, then you don't need to handle the redirecting as it will forward it to the login page you specify (using the

Re: How to retrieve parameters off URL in JSP via Struts

2006-08-09 Thread Adam Gordon
A, if only the taglib docs were documented in a more thorough manner Since I wanted to render some Struts tags based on the presence of a parameter, I discovered the "logic:present" element and used the "parameter" attribute. Hooray for me! -adam Adam Gordon w

How to retrieve parameters off URL in JSP via Struts

2006-08-09 Thread Adam Gordon
Quick question: Is there a way to retrieve a parameter off a URL via struts in a JSP? I.e. if I have http://server.name/path/foo?mood=happy, is there a struts tag that I can use to get the value of "mood"? Thanks, -Adam - T

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

2006-08-03 Thread Adam Gordon
it took me almost a week to track down what was going on between the validator and his code. -adam Scott Van Wart wrote: Adam Gordon wrote: IIOC, the only way you can do this with the stock validator is to use "mask" rather than "date" as the validator. Then, you can use a rege

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

2006-08-03 Thread Adam Gordon
IIOC, the only way you can do this with the stock validator is to use "mask" rather than "date" as the validator. Then, you can use a regex to dictate your mask. I'll warn you though, if you use a regular expression it's going to be VERY long because it will also need to validate that the date en

Re: Struts form design question

2006-08-01 Thread Adam Gordon
it means struts will read input fields into your form automatically. Im sure you could go the ajax way and add / delete from your ActionForm without re-loading the page. -Original Message- From: Adam Gordon [mailto:[EMAIL PROTECTED] Sent: 31 July 2006 21:02 To: Struts Users Mailing List Su

RE: Struts form design question

2006-08-01 Thread Adam Gordon
d/modified/removed. It would be awesome if Struts did this automatically on form submittal but I'm not sure it can. Hope that was clear. Thanks, -Adam -Original Message- From: Antonio Petrelli [mailto:[EMAIL PROTECTED] Sent: Tuesday, 01 August 2006 04:04 To: Struts Users Mailing List

Re: problem w.r.t javascript

2006-08-01 Thread Adam Gordon
Rauf- Are you doing client or server-side validation? Or both? W.R.T your multiple errors, there is an attribute you can set in your struts XML file, namely: | | Note that you must be using Struts >= 1.2.0 for this feature, though I believe prior to 1.2.0, the behavior was to al

RE: Question regarding getRequestURI()

2006-07-31 Thread Adam Gordon
uly 2006 12:13 To: Struts Users Mailing List Subject: Re: Question regarding getRequestURI() One could say that operating on File objects, directly, infringes on the concept of a "container", depending on how draconian you are. On 7/31/06, Adam Gordon <[EMAIL PROTECTED]> wrote:

Struts form design question

2006-07-31 Thread Adam Gordon
Hi folks. The more I think of this problem, the more I think that we will be unable to use only Struts for this particular situation. We have a table which we populate with a user's choice of custom registration fields (name, email, phone, company, etc...). Each row in this table is essentially

RE: Question regarding getRequestURI()

2006-07-31 Thread Adam Gordon
The File object also gives it to you and you don't have to mess with substrings and the "/" character. I believe it's File.getName() - it returns everything after the last "/" character. Of course, you do have to construct a new File object so I've no idea if it's more or less efficient than what

RE: [FRIDAY][OT] Slogan for Open Source

2006-07-28 Thread Adam Gordon
Of which "Parenting for Dummies" is my favorite It begs the statement "Um, perhaps you should not have waited on having children if you need this book..." -Adam -Original Message- From: Monkeyden [mailto:[EMAIL PROTECTED] Sent: Friday, 28 July 2006 09:51 To: Struts Users Mailing Li

Re: pb using validator with struts1.2.9

2006-07-26 Thread Adam Gordon
is not "hello".. but it does not. I think now it's time to explain you clearly what I'm trying to do. I've got a select tag wich determine if some fieds appear or not. "if select value > 1, some input:text tags appears, and there aren't present is select value

Re: pb using validator with struts1.2.9

2006-07-25 Thread Adam Gordon
test (subscriptionType>=1) but, it still does not work.. On 7/25/06, Adam Gordon <[EMAIL PROTECTED]> wrote: Jeremy- At first glance, I think you need to modify your parenthesis. Per the Validation docs at http://str

Re: pb using validator with struts1.2.9

2006-07-25 Thread Adam Gordon
Jeremy- At first glance, I think you need to modify your parenthesis. Per the Validation docs at http://struts.apache.org/1.2.9/userGuide/dev_validator.html, only two items may be joined with "and" or "or." I don't know if that means you can only have a max of two items or a max of two item

RE: Struts forward and redirect

2006-07-20 Thread Adam Gordon
Felix- IIOC, a forward forwards the original request, hence, why you are able to see the attributes you set whereas a redirect sends a new request which means you lose the attributes. I think this question was posted previously in the last week or so, so check the list archives for then. -Adam

RE: pb using validator it does not work !

2006-07-20 Thread Adam Gordon
Ok, now that you've fixed the first problem, let's try some more debugging. Make sure that your form name in your JSP matches the form name specified in your validation XML - i.e. check spelling AND cAsE. I say to override validate(...) and as long as you call super.validate(...) in that method a

RE: pb using validator it does not work !

2006-07-20 Thread Adam Gordon
Jeremy- A couple of things: 1. Not sure what version of Struts you're using, but at least according to http://struts.apache.org/1.2.9/userGuide/building_view.html#validator, the "property" attribute for the validator should have the value of "pathnames" and not the path of your action. 2.

Re: pb using validator it does not work !

2006-07-20 Thread Adam Gordon
Jeremy- A couple of things: 1. Not sure what version of Struts you're using, but at least according to http://struts.apache.org/1.2.9/userGuide/building_view.html#validator, the "property" attribute for the validator should have the value of "pathnames" and not the path of your action. 2.

RE: Valdator - RequiredIf doesn't work for IE

2006-07-19 Thread Adam Gordon
The problem isn't technically due to the requiredIf tag but rather the client-side Javascript that is generated by Struts to do the requiredIf validation. My guess is that you are experiencing one of the many problems that arise when there are standards related issues with what MS supports vs. wha

Re: Accessing messages. from action, dao classes.

2006-07-19 Thread Adam Gordon
Anil- In your action, you already have access to the resource properties file. In any member method, as long as you have an instance of the request object, you can say: // get the resources for this action servlet MessageResources resources = this.getResources(request); to retrieve the MR f

Re: Problem with Validator it does not reload request attributes

2006-07-19 Thread Adam Gordon
Kim- I had the same problem with some static form elements (e.g. contents of list boxes that were not part of any model data I cared to keep, yet it needed to be in the JSP page.) One solution I found was to set the properties on the session, but I decided that that was unnecessarily clutter

RE: Problem with validation rule

2006-07-17 Thread Adam Gordon
Heh, it happens to the best of us. Happy coding. -Adam -Original Message- From: Sebastian Stein [mailto:[EMAIL PROTECTED] Sent: Sunday, 16 July 2006 10:20 To: Struts Users Mailing List Subject: Re: Problem with validation rule Sebastian Stein <[EMAIL PROTECTED]> [060716 11:50]:

Re: Problem with validation rule

2006-07-14 Thread Adam Gordon
Sebastian- What happens if you remove the "requireList" dependency and just use "mask?" -Adam Sebastian Stein wrote: Hi, I have a form, which should also use validation based on a mask. I already enabled this kind of validation in another form and there it works. So I guess I just have a type

Re: Compare two strings in Validator frame work]

2006-07-14 Thread Adam Gordon
For basic string validation you can do the following: Use the "validwhen" attribute value for the "depends" attribute on the element. I.e.: test (propertyName == "someValue") Where "propertyName" is the value of the "proper

Re: how to dynamically generate select fields

2006-07-13 Thread Adam Gordon
If you have a collection of, say, JavaBeans, that you've set on the request, you can use to iterate over each of the beans in the collection and generate your checkbox, select list, and text field dynamically for each of the entries in the collection. I.e., let's say in my action, I've set a

RE: missing resource in key method map

2006-07-13 Thread Adam Gordon
Did you add the element to your struts config file where this action is defined? -Adam -Original Message- From: Pillay, Kiren KN [mailto:[EMAIL PROTECTED] Sent: Thursday, 13 July 2006 11:22 To: Struts Users Mailing List Subject: missing resource in key method map Hi people, I'm sure

RE: Calling a struts action from Javascript

2006-07-13 Thread Adam Gordon
en the save button is > pressed it automatically calls an onSave JS handler ... I believe you have > to do the submit in JS in this case? > > -Akshay > > On 7/13/06, Adam Gordon <[EMAIL PROTECTED]> wrote: > > > > That really depends on what you are actually tryi

Question on field/arg element in validator XML file

2006-07-13 Thread Adam Gordon
I'm reading the validator 1.1.3 DTD file and I'm trying to understand the purpose of the "position" attribute in the element and the element itself. According to the DTD: 'The "arg" element defines a replacement value to use with the message template for this validator or this field.' Can someo

RE: Calling a struts action from Javascript

2006-07-13 Thread Adam Gordon
nline Edit widget - and when the save button is pressed it automatically calls an onSave JS handler ... I believe you have to do the submit in JS in this case? -Akshay On 7/13/06, Adam Gordon <[EMAIL PROTECTED]> wrote: > > That really depends on what you are actually trying to do. We use

RE: Calling a struts action from Javascript

2006-07-13 Thread Adam Gordon
That really depends on what you are actually trying to do. We use J/S to make XML HTTP requests (using AJAX) to make requests without having to reload the page. We do this to display "dialogs" in the same browser window, e.g., to show report details. If you want other examples, Google's Gmail us

Re: Tags in struts

2006-07-12 Thread Adam Gordon
Maya- Just had a thought...you can set the "style" attribute on the element to say 'style="display: none;"' to hide a row in the list. Additionally, it collapses the list so that there's not an empty space. Very cool, IMHO. -Adam Adam Gordon wrote:

Re: Tags in struts

2006-07-12 Thread Adam Gordon
Maya- If you use validation, you really don't want to use the value attribute at all because when the JSP reloads after a failed validation, the struts widget will take it's value from the value attribute you specified and NOT not take it from the bean. This is why I suggested just setting t

RE: Tags in struts

2006-07-12 Thread Adam Gordon
Maya- A. I understand now. You want a list box, not a drop-down list. Drop-down lists require that one, and only one, item be selected. List boxes allow for zero, one, or more options to be selected. Check out the "Dropdown box" section of the Struts Wiki: http://wiki.apache.org/struts/Str

Re: Indexed Bean Copy

2006-07-11 Thread Adam Gordon
Kiren- I assume you mean BeanUtils.copyProperties(...) right? If so, I believe the reason you cannot use it is because BeanUtils.copyProperties(...) performs a shallow copy and per the javadocs (HTML tags removed): "...and so complex properties (for example, nested ones) will not be copied."

Re: Tags in struts

2006-07-11 Thread Adam Gordon
Maya- Excellent! For a list box, I believe that you must have at least one option selected at any given time. If you don't want to provide a default and force the user to actually select one (and then you can validate the user's input to ensure he/she has actually selected a real value) the

Re: Tags in struts

2006-07-10 Thread Adam Gordon
Maya- Let's say your TestBean class has getFoo() and getBar() methods both which return Collection objects. If these objects are instances of LabelValueBean objects it's really easy, if they are not, I'd recommend converting them to these bean objects either in your bean class or in the acti

Re: Tags in struts

2006-07-10 Thread Adam Gordon
In my JSP I have a textbox and two list boxes[which can display multiple values]. From my database, I have an object [a data object], ListData with following information returning string result; Vector itemList; //list of object 1 ArrayList itemList1; //list of object 2 In

Re: Struts and commons logging

2006-07-10 Thread Adam Gordon
I believe, though I could be wrong, that you get logging for free, you just have to configure it. Check out the struts logging section of the struts wiki at http://wiki.apache.org/struts/StrutsLogging, you also may want to bookmark the URL http://wiki.apache.org/struts for future reference as

Struts HTML tag library clarification

2006-07-07 Thread Adam Gordon
According to the radio button section of the wiki page (http://wiki.apache.org/struts/StrutsWidgets), this is by design but I find it a little annoying... It appears that with the tag at the top of a JSP, an HTML input element gets closed correctly per bug 5518 (back in 2002). What I don't

Re: Rendering an array as a list box

2006-07-06 Thread Adam Gordon
the variables window so I couldn't see that the collection was messed up...it took a few beats to the head to find. Thanks for the link. -adam Michael Jouravlev wrote: On 7/5/06, Adam Gordon <[EMAIL PROTECTED]> wrote: Can anyone point me to a working example of how to render an arr

Rendering an array as a list box

2006-07-05 Thread Adam Gordon
Can anyone point me to a working example of how to render an array of String objects as a list box in a JSP such that the contents of the list box can come from a property set on the request and not the bean mapped to the struts Action? It seems like this should be straight forward based on the ex

Re: Struts config question (w/ tiles, validation)

2006-06-30 Thread Adam Gordon
lp someone else... -Adam Adam Gordon wrote: I've been racking my brains for several hours now and can't seem to find the exact way to configure struts for validation when using tiles and a form bean. My problem is when the URI hits Index.do, so for the first action mapping. Here ar

  1   2   >