Re: content-language header with Struts2 does not uses the invocation locale

2012-10-10 Thread Chris Pratt
As a work-around, you could implement ServletResponseAware and call setHeader() on the injected HttpServletResponse to set the proper locale value. But I agree that Struts should take the value for the header from it's defined location. (*Chris*) On Wed, Oct 10, 2012 at 9:20 AM, JOSE L

Re: struts2 disable validation on page load

2012-10-06 Thread Chris Pratt
Set the failure result of the processAdd to redirect to the add action. (*Chris*) On Sat, Oct 6, 2012 at 10:30 PM, prashid pirzada.ras...@gmail.com wrote: Thanks, if I do processing as s:form action=processAdd method=POST than the URL will change to /processAdd from /add if input error

Re: Including JSP page from a jar file that placed on /WEB-INF/lib

2012-07-25 Thread Chris Pratt
to your struts.xml: constant name=struts.ui.templateSuffix value=java/ I'm sure there's lots more information in the Struts documentation. (*Chris*) On Wed, Jul 25, 2012 at 12:23 PM, Omar Ngarigari ngarigar...@yahoo.comwrote: Hello, I would like know how to include a JSP page that was bundled

Re: Struts2 : formatting and entering doubles consistently through the whole application not depending on locale

2012-06-19 Thread Chris Pratt
If you want to handle parsing yourself, make your action properties take String parameters and do the parsing in the action. (*Chris*) On Tue, Jun 19, 2012 at 7:55 AM, Pierre TEMPLIER pierre.templ...@gmail.comwrote: Locale.FRENCH and Locale FRANCE should output something like 345 987,246 i

Re: Struts2 : formatting and entering doubles consistently through the whole application not depending on locale

2012-06-18 Thread Chris Pratt
I think the problem is that the French locale specifies that it should be written as 445.000,00 not 445,000.00. The parser expects localized input. (*Chris*) On Mon, Jun 18, 2012 at 7:06 AM, Łukasz Lenart lukasz.len...@googlemail.com wrote: I think the problem is related to primitive

Re: Struts2 (caching, valuestack, etc...) problem

2012-06-04 Thread Chris Pratt
action processing, you must be retrieving something from a cache somewhere. (*Chris*) On Mon, Jun 4, 2012 at 11:09 AM, Omar Ngarigari ngarigar...@yahoo.comwrote: Hi All, I have developed an application using struts2.3.1.2, but I am experiencing a weird situation that I have bumping my head

Re: Struts2 (caching, valuestack, etc...) problem

2012-06-04 Thread Chris Pratt
trigger your action, the problem is in one of the other three layers and you'll have to do some investigation to figure out which (something like TamperData Plug-in for FireFox might help) (*Chris*) On Mon, Jun 4, 2012 at 11:37 AM, Omar Ngarigari ngarigar...@yahoo.comwrote: I am running

Re: Dynamic Attributes can't be boolean? StrutsUtil.translateVariables exception

2012-05-25 Thread Chris Pratt
Try surrounding the attributes in quotes (e.g. true instead of true). (*Chris*) On Fri, May 25, 2012 at 11:58 AM, struts@spamgourmet.com wrote: After installing Struts 2.3.4, it appears that dynamic attributes must be strings now? I've modified text.ftl in my custom theme like

Re: Parameter value set to null when page submitted after 30 minutes.

2012-04-27 Thread Chris Pratt
should look into a persistent session scheme, or an auto-relogin capability. (*Chris*) On Fri, Apr 27, 2012 at 9:11 AM, sharath karnati karna...@yahoo.com wrote: Hi All, We are having session-timeout set to 8 hours. User opened web page and submitted page after 30 minutes. We

Re: StrutsTestCase, jUnit and file upload

2012-04-25 Thread Chris Pratt
be to just mock in values for the parameters your action is expecting. (*Chris*) On Wed, Apr 25, 2012 at 6:36 AM, Gabriel Belingueres belingue...@gmail.comwrote: Coincidentally, yesterday I was struggling with testing a file upload. I was not using S2 as web framework but I was using Commons

Re: Authentication and authorization

2012-04-17 Thread Chris Pratt
Struts itself doesn't provide an Authentication Authorization subsystem, but it will work well with Spring Security, Apache Shiro, or roll-your-own solutions. (*Chris*) On Tue, Apr 17, 2012 at 5:28 AM, Aravind Kumar aravind...@gmail.com wrote: Hello, I have just started to venture

Data Grids Excel Exports

2012-04-12 Thread CRANFORD, CHRIS
I have several queries that I perform against my SQL database to get a list of records and then iterate over them in a paginated way in JSPs. Presently, I have a JSP for each query's output because there are various different columns being shown depending upon the report; however I am wondering if

Re: Data Grids Excel Exports

2012-04-12 Thread Chris Pratt
You might want to look into something like DisplayTag or JQGrid. (*Chris*) On Thu, Apr 12, 2012 at 7:24 AM, CRANFORD, CHRIS chris.cranf...@setech.comwrote: I have several queries that I perform against my SQL database to get a list of records and then iterate over them in a paginated way

RE: Data Grids Excel Exports

2012-04-12 Thread CRANFORD, CHRIS
I'm actually using DisplayTag in fact; however, the performance to export to Excel 50,000+ records wasn't ideal or fast. -Original Message- From: Chris Pratt [mailto:thechrispr...@gmail.com] Sent: Thursday, April 12, 2012 1:15 PM To: Struts Users Mailing List Subject: Re: Data Grids

Order of filters when using Sitemesh

2012-01-22 Thread Chris Mawata
. Is that no longer the case? Chris Mawata - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org

Re: Order of filters when using Sitemesh

2012-01-22 Thread Chris Mawata
Thanks, Lukasz. That clears up my confusion. On 1/22/2012 6:52 AM, Łukasz Lenart wrote: Checkfilter-mapping section, not declaration offilters itself Regards - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org

Mobile Device Support

2012-01-13 Thread CRANFORD, CHRIS
surfaced to point you along a specific path. Thanks in advance, Chris - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org

Re: Regarding Iterator

2011-11-23 Thread Chris Pratt
Yes, either a dot or the word top should do what you're looking for. Worst case, you might be able to use %{#outerList} to reference the id from the outer iterator. (*Chris*) On Wed, Nov 23, 2011 at 3:51 PM, jlm...@gmail.com wrote: I think a dot should work. --Mensaje original-- De

Re: Dynamic Result Selection

2011-11-20 Thread Chris Pratt
If the default is something that doesn't change, try putting it in application scope instead. You would be able to do that once during program initialization and then forget about it. (*Chris*) On Nov 19, 2011 12:23 AM, rohan jamkhedkar rgjamkhed...@yahoo.co.in wrote: Hi Christian, Thanks

Re: s:textfield / Beginner question

2011-11-11 Thread Chris Pratt
The obvious answer is, because it's disabled. The more complete answer is, because the browser doesn't send values for disabled form elements, Struts has no value to populate for that field. (*Chris*) On Fri, Nov 11, 2011 at 1:43 PM, Marco Schwarz marco.schw...@cioppino.netwrote: Hi, I'm

Dynamically setting the template directory in an Action

2011-11-10 Thread Chris Rijk
Hi all, Referring to this page: http://struts.apache.org/2.2.1/docs/selecting-template-directory.html It says the template directory can be specified in the session, for example to allow the user to change it on a per-session basis. I've been trying to do this for my application, but can't get

Re: Struts 2 Initialization Plugin

2011-11-10 Thread Chris Pratt
Look into the ServletContextListener interface. It's a nice way to initialize/dispose of one-time resources in any web app, Struts or not. (*Chris*) On Thu, Nov 10, 2011 at 12:06 PM, Scott Smith ssm...@mainstreamdata.comwrote: In struts 1, I used org.apache.struts.action.PlugIn as a way

Re: JSON Plugin to Include Parent Action's Properties

2011-11-03 Thread Chris Pratt
Then create an inner class within your Action that contains just the information youbwant to include in the JSON and set it as the base object to marshal. (*Chris*) On Nov 3, 2011 12:59 PM, Daniel Ruan danielr...@gmail.com wrote: Thanks, everybody. I tried ignoreHierarchy, but got a Java

Re: Struts2 Memory Management

2011-10-22 Thread Chris Mawata
If your requirement is to have a gallon of water in a jug, there is no way to manufacture a jug that will make that gallon into half a gallon. On 10/19/2011 9:17 AM, Charles Godfrey wrote: Hello everyone, Not sure if this is the right forum for this question. I made a presentation to my dev

Re: IE open excel file directly but not save as

2011-09-26 Thread Chris Pratt
Try removing the filename from the Content-Disposition header. inline doesn't support this attribute and maybe IE is assuming you mean external because it's there. (*Chris*) On Mon, Sep 26, 2011 at 10:30 AM, Emi Lu em...@encs.concordia.ca wrote: Hello , I know its not really struts

Re: IE open excel file directly but not save as

2011-09-26 Thread Chris Pratt
Gees, I hope not!!! I'd hate to go to a site and have my printer start pumping out paper. The best you can do is call document.print(); which will bring up the print dialog, but that should be as close to auto-shooting printouts as you can get. (*Chris*) On Mon, Sep 26, 2011 at 9:15 PM

Re: xwork-core-2.2.3.jar in Maven repository probably corrupt

2011-09-10 Thread Chris Mawata
Thanks, Maurizio. That worked. Cheers Chris Mawata On 9/7/2011 2:12 AM, Maurizio Cucchiara wrote: Have you already tryied to delete xwork jar under your M2 repository, such that maven tryies to download again the artifact on the next iteration? Maurizio Cucchiara Il giorno 07/set/2011 04.36

Re: xwork-core-2.2.3.jar in Maven repository probably corrupt

2011-09-08 Thread Chris Mawata
I'll try that (deleting the jar) tomorrow. Ihave to drive 100 miles to work this morning. Right now I have the manually downloaded one in the local m2 repository. Cheers Chris Mawata On 9/7/2011 2:12 AM, Maurizio Cucchiara wrote: Have you already tryied to delete xwork jar under your M2

Re: [S2] Random java.lang.reflect.InvocationTargetException and java.lang.NullPointerException error??

2011-09-06 Thread Chris Pratt
Expired session maybe? (*Chris*) On Tue, Sep 6, 2011 at 1:39 PM, Burton Rhodes burtonrho...@gmail.comwrote: I was wondering if anyone can help track down this error that I'm getting. Unfortunately, I cannot reproduce the error with any consistency - just sort of appears to happen randomly

xwork-core-2.2.3.jar in Maven repository probably corrupt

2011-09-06 Thread Chris Mawata
/org.apache.struts.xwork/xwork-core/2.2.3 then I get no errors and the application runs. BTW the jar that came down via Maven is 664 KB while the one I manually downloaded is 602 KB Cheers Chris Mawata - To unsubscribe, e-mail

Re: Doubt on Accessing Session from ActionContext

2011-09-05 Thread Chris Pratt
) and only requires the injection of necessary Objects by the unit tests. (*Chris*) On Sep 5, 2011 3:11 AM, mohan rao mohanara...@gmail.com wrote: You can obtain the request by asking the ActionContext or implementing ServletRequestAware. Implementing ServletRequestAwareis preferred. *why it's

Action Tag Dynamic Parameters

2011-08-31 Thread CRANFORD, CHRIS
stores the URL callback in a database and is needing the page rendering to be dynamic in nature. The only other solution would be to rely on ajax/javascript which I'd rather not do if there is a Struts2 solution. Thanks Chris

Re: Struts2 dispatch request to another application

2011-08-26 Thread Chris Pratt
You'll probably have to write an action that retrieves the content and makes it available to a Stream Result ( http://struts.apache.org/2.0.14/docs/stream-result.html). (*Chris*) On Fri, Aug 26, 2011 at 1:57 PM, JOSE L MARTINEZ-AVIAL jlm...@gmail.comwrote: Hello all, I'm using Struts

Dashboard Widgets

2011-08-17 Thread CRANFORD, CHRIS
I have designed a number of KPI and informational charts and have rendered these using my chart library using simple action calls. The next phase is to design a dashboard like screen where the user can select particular KPI or information charts and have them placed on the dashboard, rearranged

Where's ideal for this logic?

2011-08-09 Thread CRANFORD, CHRIS
I have several actions that instantiate a business service to query KPI statistics from our database. The KPI statistics are gathered using projection-based Hibernate queries on several domain entity objects. We are representing the KPIs in the view using a jQuery-based chart library. Does it

OGNL context lookup

2011-08-08 Thread CRANFORD, CHRIS
I have a JSP page where I need to iterate over a list of strings and for each string, I need to query the OGNL stack and get the value that string name represents followed by adding the name/value pair to a URL. I thought something like the following would work but it doesn't. Can anyone help?

Re: Where to put non action associated data

2011-07-31 Thread Chris Pratt
This sounds like one of the very few legitimate uses of the chain result type. Check out http://struts.apache.org/2.0.14/docs/chain-result.html (*Chris*) On Jul 31, 2011 9:50 AM, Marcus Bond mar...@marcusbond.me.uk wrote: Hi, Say I have a form where user can carry out a product search which

Re: Submit image button sends coordinates

2011-07-26 Thread Chris Pratt
That's exactly what's happening, but it's also warning (in devmode only) when it can't set one so that you, the developer, can make the right decision for your program. (*Chris*) On Tue, Jul 26, 2011 at 6:50 AM, Paul Benedict pbened...@apache.org wrote: Just a question, if I may :-) Doesn't

Re: Submit image button sends coordinates

2011-07-26 Thread Chris Pratt
or for other reasons (I tend to avoid these situations, but they're out there). (*Chris*) On Tue, Jul 26, 2011 at 8:42 AM, Paul Benedict pbened...@apache.org wrote: I don't understand that. Perhaps I haven't programmed Struts 2 enough, but I thought Struts (1 or 2) only captured what's defined

Re: Doubt on Struts 2 Architechture

2011-07-25 Thread Chris Pratt
to execute the action. When the action is done, the call returns control back to each interceptor in (as you said) reverse order where it can finish it's work. It's the simplest and most effective way of assuring the interceptors can do both pre-processing and post-processing. (*Chris*) On Sun

Re: excludeMethods parameter question

2011-07-25 Thread Chris Pratt
Not exactly. It would not execute for actions whose method name is input, back or cancel. It's on the action side, not the result side. (*Chris*) On Mon, Jul 25, 2011 at 2:59 PM, Mano Pájaro mano0...@gmail.com wrote: Thanks Maurizio, let me see if i got it straight. You mean

Re: excludeMethods parameter question

2011-07-25 Thread Chris Pratt
Exactly, so the default (execute) would run the validation, but not the ones that are listed. (*Chris*) On Mon, Jul 25, 2011 at 4:53 PM, Mano Pájaro mano0...@gmail.com wrote: I see mm so, it only acts on the action which method attribute is diferent from in the list, that's it? :D 2011/7

Re: Access to Resource Bundle when there is no action

2011-07-21 Thread Chris Pratt
/package/store.properties on the classpath, and a com/package/documents.properties as well. They're both technically global, but as long as you treat them as package specific, they will behave fine. (*Chris*) On Thu, Jul 21, 2011 at 6:50 PM, JOSE L MARTINEZ-AVIAL jlm...@gmail.comwrote: Hi Jeff

Re: Unable to load configuration. - bean - jar:file:/WEB-INF/lib/struts2-jquery-plugin-3.1.0.jar!/struts-plugin.xml:27:125 Exception

2011-07-19 Thread Chris Pratt
Depends whether the source jar contains just the source, or the source and binaries. Why do you feel the need to put the source files in the run-time directory? It just takes up more time and memory for the JVM to parse the indexes of useless jar files. (*Chris*) On Tue, Jul 19, 2011 at 10:57

Re: setting resource bundles with s:i18n dynamically

2011-07-15 Thread Chris Pratt
It should support OGNL %{} expressions, have you tried that? (*Chris*) On Fri, Jul 15, 2011 at 2:27 AM, Alexander Muss sascha_...@gmx.net wrote: Hello everyone, in my current project, there is a need to set resource bundle name for s:text dynamically. With s:i18n I can set resource bundle

Re: addActionMessage does not show message after redirect (struts2.2.3)

2011-07-12 Thread Chris Pratt
. (*Chris*) On Tue, Jul 12, 2011 at 9:05 AM, Emi Lu em...@encs.concordia.ca wrote: Hi Dave, Because it's a redirect, and things in the request go away when there's a new request. Not true for previous version. Previous version keeps the ActionMessage. Only ActionErrorMessage does

Struts2 with Chart drill downs

2011-07-12 Thread CRANFORD, CHRIS
that users can drill down into what makes up the data behind a particular bar or slice of the pie. Anyone tried doing this with JFreeChart? Does anyone use any other platform/frameworks to do this that can share some insight/examples? Chris

Re: dinamic name for textfield

2011-06-21 Thread Chris Pratt
According to what you showed, the type attribute is taken from the page parameters at run time, which is what I showed, if you don't want to evaluate the myField portion yet, try: s:textfield name=%{#parameters.type + '.myField'} maxlength=250 size=20 / (*Chris*) On Mon, Jun 20, 2011 at 1:25

File Upload Issue when Max Size Reached

2011-06-21 Thread CRANFORD, CHRIS
I am testing the Struts 2.2.3 built in file upload support and noticing that if I upload a file that exceeds my configured size of 20MB that the additional form parameters that are submitted with the upload are lost. Can anyone else confirm they you're experiencing this problem? Ultimately I need

Re: dinamic name for textfield

2011-06-20 Thread Chris Pratt
While you can't nest tags like that, you can use OGNL to get the data you want. It would look something like: s:textfield name=%{#parameters.type.myField} maxlength=250 size=20 / (*Chris*) On Mon, Jun 20, 2011 at 6:58 AM, k3v1n mitn...@email.it wrote: Hi all, I need pass dinamic name

Re: getText on XSLT transformation on an Action

2011-06-17 Thread Chris Pratt
using the setParameter mechanism. (*Chris*) On Jun 17, 2011 12:27 AM, jlm...@gmail.com wrote: Well, the XML comes from an external provider through a webservice, so I would prefer otheer solution...if possible. Sent via BlackBerry from T-Mobile -Original Message- From: Chris Pratt

Re: getText on XSLT transformation on an Action

2011-06-16 Thread Chris Pratt
There's no reason the XSL should be dynamic. The XML is typically the dynamic part with the XSL being static (so that it can be parsed and cached for efficiency). Why not include a section in the XML with the replacement text, then reference the strings using XPath? (*Chris*) On Thu, Jun 16

Re: Struts2 and FTP (php) editors integration

2011-06-14 Thread Chris Pratt
haven't heard of anyone that has done that. You might talk to the people that produce those tools, maybe they would be interested in collaborating with you to enter a new market. (*Chris*) On Tue, Jun 14, 2011 at 12:27 PM, webmeiker i...@webmeiker.com wrote: I mean use of CKEditor, CKFinder

Re: Struts2 and FTP (php) editors integration

2011-06-14 Thread Chris Pratt
platforms and manage the integration yourself, but that's a bunch of work. Seems like you should either write your app in PHP, find a Java based library, or rewrite the PHP as Java. (*Chris*) On Tue, Jun 14, 2011 at 12:44 PM, webmeiker i...@webmeiker.com wrote: Thank you Chris, thats the point

Re: Validate method not working in Action after using Interceptor

2011-06-08 Thread Chris Pratt
you are looking for. (*Chris*) On Tue, Jun 7, 2011 at 9:32 PM, Nikul Suthar nikulsut...@gmail.com wrote: Hi There, I'm pretty new to using Struts 2 for developing a web application. So I would be very thankful if someone can clear out this roadblock for me. I'm trying to write some custom

RE: JSON ModelDriven

2011-06-03 Thread CRANFORD, CHRIS
instead of the model without changing the interface that the action implements? Chris - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org

JSON Result Behavior with Struts 2.2.3

2011-06-01 Thread CRANFORD, CHRIS
that the JSON response only contains the following: [org.apache.struts2.json.JSONUtil]: [JSON]{com.opensymphony.xwork2.util.OgnlValueStack.MAP_IDENTIFIER_KEY: } Was there some fundamental change that I have overlooked? Chris

RE: JSON Result Behavior with Struts 2.2.3

2011-06-01 Thread CRANFORD, CHRIS
Please disregard. I found a discussion between Dave, Chris, and Jerry on this very issue and it appears my problem was due to an interceptor placing data on the stack incorrectly thus causing the action not to be on top of the stack which was a code change during the 2.2.3 JSON plugin. After

JSON ModelDriven

2011-06-01 Thread CRANFORD, CHRIS
of the model without changing the interface that the action implements? Chris - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org

Re: How to allow s:submit to accept dynamic src image file?

2011-05-30 Thread Chris Pratt
No, EL is disabled in the struts for security reasons. But src=%{#} On May 30, 2011 9:37 AM, Dave Newton davelnew...@gmail.com wrote: On Mon, May 30, 2011 at 11:30 AM, Emi Lu em...@encs.concordia.ca wrote: But s:submit does not support src = %% Does normal EL work? Dave

Re: How to allow s:submit to accept dynamic src image file?

2011-05-30 Thread Chris Pratt
Argh, hit send too early. No, EL is disabled in the struts for security reasons. But OGNL should work fine. Something like src=%{#imageName} should do the trick. (*Chris*) On May 30, 2011 12:01 PM, Chris Pratt thechrispr...@gmail.com wrote: No, EL is disabled in the struts for security

Re: When start tomcat6 always got java.lang.NoClassDefFoundError: com/opensymphony/xwork2/util/finder/ClassFinder$InfoBuildingVisitor Error!

2011-05-26 Thread Chris Pratt
The NoCassFoundError is not the same as the ClassNotFoundException. It indicates that a dependency of the listed class couldn't be found, not the named class. I would suggest reviewing the dependency requirements and determining whether you've met them. (*Chris*) On May 26, 2011 4:06 PM, Emi

Re: Iterating over a tree structure

2011-05-23 Thread Chris Pratt
You might want to look at the JSP .tag file support. I've used it for similar requirements before. (*Chris*) On Mon, May 23, 2011 at 2:12 PM, Jason Pyeron jpye...@pdinc.us wrote: -Original Message- From: Jason Pyeron Sent: Monday, May 23, 2011 16:52 To: 'Struts Users Mailing

Re: Iterating over a tree structure

2011-05-23 Thread Chris Pratt
Not exactly, a .tag file is a callable JSP snippet that can be invoked recursively, which makes it useful in this instance. You didn't find that when you researched it? (*Chris*) On Mon, May 23, 2011 at 2:56 PM, Jason Pyeron jpye...@pdinc.us wrote: -Original Message- From: Chris

Re: Iterating over a tree structure

2011-05-23 Thread Chris Pratt
Give http://lmgtfy.com/?q=JSP+tag+file+support a shot. (*Chris*) On Mon, May 23, 2011 at 3:41 PM, Jason Pyeron jpye...@pdinc.us wrote: -Original Message- From: Chris Pratt Sent: Monday, May 23, 2011 18:18 To: Struts Users Mailing List Subject: Re: Iterating over a tree

Re: Unable to add value in html:file

2011-05-21 Thread Chris Pratt
I'm pretty sure javascript can't get the file path in modern browsers, only the name. (*Chris*) On Sat, May 21, 2011 at 11:22 AM, Jason Pyeron jpye...@pdinc.us wrote: Why don't you try to do your validation as AJAX, so you never submit the page until it does have the correct filename/path

Re: Unable to add value in html:file

2011-05-20 Thread Chris Pratt
It seems to me that the problem is that you can't nest JSP tags (the bean:write) within JSP tags (the html:file), if the container supports EL then my solution should work around that problem. (*Chris*) On Fri, May 20, 2011 at 4:34 AM, Dave Newton davelnew...@gmail.com wrote: Why would

Re: Unable to add value in html:file

2011-05-20 Thread Chris Pratt
I must have missed the automated upload requirement somewhere, so no you would definitely not want people to be able to randomly grab files of anyone's machine without user interaction. The closest you're likely to get is Flash or an Applet (like Dave suggested). (*Chris*) On Fri, May 20, 2011

Re: Unable to add value in html:file

2011-05-20 Thread Chris Pratt
Good call, I focused on the wrong part of the question, i.e. why the value that was presented to the browser was wrong, not why the value wasn't being used by the browser. (*Chris*) On Fri, May 20, 2011 at 9:30 AM, Jason Pyeron jpye...@pdinc.us wrote: -Original Message- From

RE: Separate Java Bean Class for Getter/Setter method.

2011-05-19 Thread Chris Pratt
Yes, the map is MapString,String[]. Because the HTTP protocol allows sending multiple parameters with the same name. (*Chris*) On May 19, 2011 2:06 AM, arin_12 arin...@lycos.com wrote: I also tried Map String String. But the same result. .toString also does not help any thing. It looks like

Re: Login Page

2011-05-19 Thread Chris Pratt
You appear to be askin about astruts 1.x, since 2.x doesn't make use of ActionForm's any longer. So, in Struts 1.x, there would be one instance of ActionServlet ans ten instances of ActionForm. (*Chris*) On May 19, 2011 2:07 AM, vasslee rengasa...@zsl.com wrote: Hi All, I have struts login

Struts2 Validation w/ModelDriven

2011-05-19 Thread CRANFORD, CHRIS
When I implement the ModelDriven interface in my Struts2 actions; I follow your typical prepare() method as follows: public void prepare() throws Exception { if(id != null) { model = service.create(/* some parameters */); } else { model = service.lookupById(id); } } When a user

RE: Struts2 Validation w/ModelDriven

2011-05-19 Thread CRANFORD, CHRIS
Not that I am aware. The paramsPrepareParamsStack to my knowledge handles validation at the very end; so by the time validation has happened; the model has already been prepared by the prepare() method. -Original Message- From: Eric Lentz [mailto:eric.le...@sherwin.com] Sent:

RE: Struts2 Validation w/ModelDriven

2011-05-19 Thread CRANFORD, CHRIS
that has been initialized in either prepare() or the execute() or entry point method calls themselves. -Chris -Original Message- From: Eric Lentz [mailto:eric.le...@sherwin.com] Sent: Thursday, May 19, 2011 1:22 PM To: Struts Users Mailing List Subject: RE: Struts2 Validation w

RE: Struts2 Validation w/ModelDriven

2011-05-19 Thread Chris Pratt
That should work fine until someonw switches you to the PrepareParamsPrepare stack and prepere() gets called twice anyway. ;) (*Chris*) On May 19, 2011 12:55 PM, CRANFORD, CHRIS chris.cranf...@setech.com wrote: Eric - The framework will call getModel() multiple times before your validate

Re: Unable to add value in html:file

2011-05-19 Thread Chris Pratt
Depending on what container you're using, you might try: html:file name=Form tabindex=11 property=attachment styleId=frmTxtAttachment style=width:300px value=${parecRequestForm.attachPath} / (*Chris*) On Thu, May 19, 2011 at 9:04 AM, vivek mishra mishravive...@gmail.comwrote: Hi list, I

Re: Displaying images from database (BLOB) using the img tag

2011-05-16 Thread Chris Pratt
Stream it to the ServletOutputStream and return null from the action. (*Chris*) On May 16, 2011 8:48 AM, Saeed Najahi najah...@gmail.com wrote: hello guys, can anyone kindly tell me how can i display an image fetched from a database using the img tag? thanks in advance

Re: Tag iterator and my object container

2011-05-12 Thread Chris Pratt
You could possibly get away with just implementing Iterable instead of Iterator. It's a much simpler interface to implement. (*Chris*) On Thu, May 12, 2011 at 12:17 AM, matthieu.m...@ensam.eu wrote: Hi, Thank you. I implements the iterator interface, and now it is working. public class

Re: Retrieving values for which there is no specific getter

2011-05-11 Thread Chris Pratt
Not as such, but you can implement the ParameterAware[1] interface and retrieve the from the supplied map. (*Chris*) 1 - http://struts.apache.org/2.0.6/struts2-core/apidocs/org/apache/struts2/interceptor/ParameterAware.html On Wed, May 11, 2011 at 12:03 PM, Mitch Claborn mitch

Re: Retrieving values for which there is no specific getter

2011-05-11 Thread CRANFORD, CHRIS
Look at the ModelDriven approach - Original Message - From: Mitch Claborn mitch...@claborn.net To: user@struts.apache.org user@struts.apache.org Sent: Wed May 11 14:03:33 2011 Subject: Retrieving values for which there is no specific getter In Struts 2, if my Action class has a variable

Re: Retrieving values for which there is no specific getter

2011-05-11 Thread Chris Pratt
You implement the ParameterAware interface on your Action. Struts calls your action's setParameters(Map) method passing you the map of all the parameters that were submitted by the form. You use the map in your action's execute() method to fulfill it's reason for being. (*Chris*) On Wed, May

Re: struts2 and tiles

2011-05-09 Thread Chris Pratt
I don't personally use a portlet environment, so I have no idea whether it would work or not. (*Chris*) On Sun, May 8, 2011 at 10:44 PM, Bertrand bertran...@gmail.com wrote: Hi Chris, I am very interested if you are referring to a portlet environment. Thanks On Mon, May 9, 2011 at 3:13

Re: Strange behaviour with Spring

2011-05-09 Thread Chris Pratt
You can't create beans that implement java.lang.String, it's immutable and doesn't follow the bean spec. (*Chris*) On Sun, May 8, 2011 at 2:11 PM, Marcus Bond mar...@marcusbond.co.uk wrote: Hi, I'm using Struts 2.2.3 and have observed some bizarre behavior when using Spring to provide my

Re: Strange behaviour with Spring

2011-05-09 Thread Chris Pratt
Even if Spring considers it valid, that doesn't mean that other packages will be able to treat immutable, non-JavaBeans as JavaBeans. (*Chris*) On Mon, May 9, 2011 at 3:39 AM, Marcus mar...@marcusbond.co.uk wrote: You can if you want to use a String as a Spring bean, it's a different issue

Re: struts2 and tiles

2011-05-08 Thread Chris Pratt
I wrote some simple configuration classes that allow using Tiles 2.2+ in Struts 2+ configured in Spring. It's worked out quite well for me. I've offered them here before, but if anyone is interested I can again make them available. (*Chris*) On Sun, May 8, 2011 at 1:05 AM, arin_12 arin

Re: Struts 2: Does the Indexed List Example Work?

2011-04-29 Thread Chris Pratt
Shouldn't that be: s:textfield theme=simple name=beanList[%{bean.id}].name/ Is that what you meant Dave? (*Chris*) On Fri, Apr 29, 2011 at 9:07 AM, Dave Newton davelnew...@gmail.com wrote: Try with square brackets first; see what happens. Dave On Fri, Apr 29, 2011 at 12:04 PM, Joe

Re: Struts 2: Does the Indexed List Example Work?

2011-04-29 Thread Chris Pratt
Oh, duh, I'm not sure why I didn't see it before. You can either just use %{id} and then you don't need the id=bean on the s:iterate tag. Or, you can use %{#bean.id}. (*Chris*) On Apr 29, 2011 10:18 AM, Joe fullmit...@lycos.com wrote: Chris Pratt wrote: Shouldn't that be: s:textfield theme

Re: Struts 2: Does the Indexed List Example Work?

2011-04-29 Thread Chris Pratt
Try: value=%{name} (*Chris*) On Apr 29, 2011 12:14 PM, Dave Newton davelnew...@gmail.com wrote: Try the square brackets again. On Fri, Apr 29, 2011 at 2:52 PM, Joe fullmit...@lycos.com wrote: Chris Pratt wrote: Oh, duh, I'm not sure why I didn't see it before. You can either just use

Re: Action validation is being performed when it shouldn't

2011-04-29 Thread Chris Pratt
of at the moment). Or you can add your own methods to the list in the workflow interceptor. (*Chris*) On Apr 29, 2011 12:08 PM, Alex Barnes a...@barnes-home.com wrote: Hi all, I am having a few issues with some code which worked a few days ago but has stopped working for some reason. I have

Re: Re: Struts 2: Does the Indexed List Example Work?

2011-04-29 Thread Chris Pratt
list make your Action implement Preparable and retrieve the existing list so you can return it when Struts calls getBeanList. (*Chris*) On Apr 29, 2011 1:08 PM, Joe fullmit...@lycos.com wrote: Dave Newton-6 wrote: Try the square brackets again. Chris Pratt wrote: Try: value=%{name} That gets

Re: How to make s:action run when validation fails?

2011-04-27 Thread Chris Pratt
one (whatever is appropriate for your circumstances) and pass it in the setPerson() method for the action to use. (*Chris*) On Wed, Apr 27, 2011 at 6:29 AM, Miguel mig...@almeida.at wrote: Thanks for the prompt reply Dave. I have a couple of follow-up questions regarding this. On Wed, 2011

Re: Field Name Collision?

2011-04-26 Thread Chris Pratt
in the Model Object (on the top of the Value Stack), which fails so it goes a step down the stack to the Action, where it finds a user attribute to use. So, it appears Struts is functioning exactly as designed. (*Chris*) On Tue, Apr 26, 2011 at 12:55 PM, Dave Newton davelnew...@gmail.com wrote: Doubt

Re: Field Name Collision?

2011-04-26 Thread Chris Mawata
That is how OGNL works -- the Model object is higher and has a property of the name userId so it is the first match. Chris On 4/26/2011 3:52 PM, Eric Lentz wrote: - Struts 2.2.1 - Tomcat 6.0 - JDK 1.5.0_22 - Code example of the problem: http://pastebin.com/eyyJaBg4 - Description: I have two

ModelDriven Entity Update

2011-04-25 Thread CRANFORD, CHRIS
the object instance or set to null if ID was null. Any other alternatives? Chris - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org

Re: Struts 2 problem in In url tag variable

2011-04-20 Thread Chris Pratt
For most containers, that will have to be in a file that ends in .jsp to work. What servlet container (and version) are you using? (*Chris*) On Wed, Apr 20, 2011 at 2:07 PM, kiala davy davy_ki...@yahoo.fr wrote: Hi, I am a newbie in Struts 2.2.1.1. So i am learning to use Struts. I am

Re: Re : Struts 2 problem in In url tag variable

2011-04-20 Thread Chris Pratt
Did you include the JSP taglib directive at the top of the page? (*Chris*) On Wed, Apr 20, 2011 at 2:26 PM, kiala davy davy_ki...@yahoo.fr wrote: My file is register.jsp and i use Tomcat 5.5.30 De : Chris Pratt thechrispr...@gmail.com À : Struts Users

Re: Re : Struts 2 problem in In url tag variable

2011-04-20 Thread Chris Pratt
You have to define the registerInputLink action in your struts.xml file. Take a look at the complete examples that are shipped with struts. (*Chris*) On Apr 20, 2011 2:39 PM, kiala davy davy_ki...@yahoo.fr wrote: Thanks for your answer. registerInputLink does not contain the registerInput

Re: Conversion problem

2011-04-18 Thread Chris Pratt
It appears to be trying to set an Array of Strings to your setDeadlineTime method, is it typed to take an Array of Strings? (*Chris*) On Mon, Apr 18, 2011 at 7:59 AM, Christian Grobmeier grobme...@gmail.comwrote: Hi all, i have a form with only 6 values. 4 Dates, 1 int, one string. I

Re: Conversion problem

2011-04-18 Thread Chris Pratt
Did you put it in the same location as the .class file, or the same location as the .java file? As far as I know if it's in the same location as the .class files (i.e. /WEB-INF/classes/com.package...) it should work, but normally the .java files don't get included in the .war file. (*Chris

s:push problem

2011-04-15 Thread CRANFORD, CHRIS
I am noticing a strange behavior on my development machine where a POJO when pushed onto the top of the stack using s:push is causing tags such as s:include not to work. In the action being executed, there is a property in the action called request which represents a POJO of type

<    1   2   3   4   5   6   7   8   9   10   >