Re: dynamic action in form

2008-10-16 Thread Laurie Harper
styl9090 wrote: Hi, I am using struts 2 in my current project. How can I write the action dynamically in my JSP form tag? Here is the example: This case, I have my form action is in session. I have tried using below, which didn't work: Assuming the action attribute is evaluated, it would be

Re: Error 404: SRVE0190E: File not found:

2008-10-14 Thread Laurie Harper
Trinad wrote: Hi, I have created a struts action which construts a json string in the server side,action class successfully returned json string in the response, but I am getting an Error 404: SRVE0190E: File not found: /Test.action Any Idea about this problem. I am using struts2 and appserver

Re: Cannot call servlet from portlet using img tag

2008-10-09 Thread Laurie Harper
daiyna wrote: im sorry this is wrong: < img src="${imgURL}" alt="img" width="40", height="40"/> its like: < img src="/imageview/somepath" alt="img" width="40", height="40"/> where somepath is the absolute path for the generated image. imageservlet was supposed to retrieve the local ima

Re: Struts2 Data Transfer

2008-10-09 Thread Laurie Harper
fill the second beans in the same getModel() . any other approach so that i can fill thm at the same time once my action get called . On Thu, Oct 9, 2008 at 3:46 AM, Laurie Harper <[EMAIL PROTECTED]> wrote: Just do what Dave outlined in his previous reply. You need getter/setters in your ac

Re: Cannot call servlet from portlet using img tag

2008-10-08 Thread Laurie Harper
daiyna wrote: I have an imageservlet used to server dynamic images with the following mapping in the web.xml file: ImageViewer /imageview/* From within my JSP I can call the servlet using the include tag: What does that do? It makes no sense to

Re: validwhen calculation is true

2008-10-08 Thread Laurie Harper
I don't think the validWhen validator supports either type cooercion or arithmetic. You'll probably need to handle this validation programatically in your validate() method. L. Jefferson Wilson wrote: I have a form where the user will peform a simple calculation in order to prevent spam (1 +

Re: Struts2 Data Transfer

2008-10-08 Thread Laurie Harper
Just do what Dave outlined in his previous reply. You need getter/setters in your action for each bean ([gs]etBean1(), [gs]etBean2() to correspond with Dave's JSP sample code) and everything should work. Have you tried it? L. aum strut wrote: the issue is i have a registration from in the UI

Re: SV: SV: SV: Ognl versions

2008-10-08 Thread Laurie Harper
The JavaBean Specification defines explicit naming rules for properties and their getter/setter methods as well as conventions for their method signatures. If you deviate from those rules and conventions in any way, your bean is no longer compliant with the spec. What you had was 'a proper bea

Re: Returning text/html InputStream using Zero Configuration annotations

2008-10-07 Thread Laurie Harper
Lukasz Lenart wrote: 2008/10/7 928572663 <[EMAIL PROTECTED]>: Sorry I forgot to add this: If I change the value="" to value="John", the error message changes to this: try value="inputName" Based on the code in the original post, that should be value="inputStream". L. ---

Re: Using POSIX Regular Expressions for Internationalized Validation

2008-10-07 Thread Laurie Harper
The validation strategy you cite is well and good when the you *have* 'a set of tightly constrained known good values.' It's not useful in the general case. Your concerns with respect to XSS should only present a problem if you need to render untrusted HTML (such as is often the case with web-

Re: security quest

2008-10-03 Thread Laurie Harper
ED] <[EMAIL PROTECTED]>: Ok, i will write a custom interceptor and/or action ho do this, to allow browser and server to safely share credential without https, like in standard jaas authentication. I've no idea or how to do. Can someone give me an hint? Inviato da iPhone Il giorno 02/ott

Re: security quest

2008-10-02 Thread Laurie Harper
Gianluca Musella wrote: I've implemented an AuthenticationInterceptor. If the user isn't logged then is redirected to a login page to enter credential. The problem is that from this page user and password are sent in clear text, as a normal http post. Is this true? And if yes there is a way to

Re: Invoking Action Class from JSP

2008-09-30 Thread Laurie Harper
I don't know what ForwardResolution is, but if you need the functionality of jsp:forward, why not use that? L. Eric Nelson wrote: Thanks Zak. However, the s:action tag calls an action inline, and renders the results on the same page. I'm looking to forward the request on, similar to . Doe

Re: Question regarding struts.multipart.maxSize

2008-09-30 Thread Laurie Harper
Siemback, Chris wrote: Hello all - sorry if this is a newbie question, but I haven't seen this addressed before. I'm currently using the fileupload interceptor in my application. I have 2 distinct portions of the web site where I'd like to have users upload files. The problem is the struts..mu

Re: Struts2, dojo, cascading select fields

2008-09-30 Thread Laurie Harper
ReadOnly wrote: ReadOnly wrote: Hi.. May be someone can help me:)..I start use struts 2.0.11, spring, hibernate. I need create cascading select fields.. For example: first select: city second select: streets .. When you are choosing city in the first one select second one need show streets

Re: Struts2 + jqGrid possible?

2008-09-29 Thread Laurie Harper
Francisco Exposito wrote: Hi, Is it possible to use jqGrid with struts2? I am trying to use it but I don't know how to do it. In the script we have: jQuery("#list2").jqGrid({ url:'server.php?q=2', datatype: "json", colNames:['Inv No','Date', 'Client', 'Amount','Tax','Total','Notes'],

Re: How to validation/workflow with fileUpload?

2008-09-26 Thread Laurie Harper
field, 'Invalid field value for field "upload".' The message seems to be coming from the FileUploadInterceptor. Earle - Original Message From: Laurie Harper <[EMAIL PROTECTED]> To: user@struts.apache.org Sent: Friday, September 26, 2008 3:53:42 PM Subject:

Re: Action and ActionForm newbie questions

2008-09-26 Thread Laurie Harper
UseTheFork wrote: Hi, I am learning about Struts and I am trying to understand the proper usage of Actions and ActionForms. Can you tell me if the following is correct? i) Actions are implemented as glue between the View (JSP for example) and the Model part (Hibernate for example) in MVC. Typi

Re: [S2] Testing, getting jsp output.

2008-09-26 Thread Laurie Harper
GF wrote: Hello I'm writing tests on application that uses Struts2. To test the actions, I use about a technique similar to the one described here http://itefforts.blogspot.com/2007/08/struts2-spring-junit.html I wish to do more and test the Jsp (and Tiles) output too. That code does this: resp

Re: How to validation/workflow with fileUpload?

2008-09-26 Thread Laurie Harper
Glancing through your action code, you have setters but no getters. Without getters, there is no way for Struts' validation code to access the values to validate them, or for the form tags in the JSP to access them. That might be the problem... L. Earle Flynn wrote: How is it possible to use

Re: Problem with input attribute - the action doesn't progress

2008-09-26 Thread Laurie Harper
Daniele Development-ML wrote: Hello everybody, I have a problem with configuring an action mapping. The related Struts-config.xml chunk is: The input form beans are all declared: The problem is that when from the URL /insertAuthor I access to the url /showInsertedAuthor, Tomcat i

Re: ApplicationListener issue

2008-09-25 Thread Laurie Harper
transfer this object from the Application Listener to my Action class? I'll appreciate your help, Thank you. Martin - Original Message - From: "Laurie Harper" <[EMAIL PROTECTED]> To: Sent: Thursday, September 25, 2008 4:45 AM Subject: Re: ApplicationListener issu

Re: Unexpected Action processing

2008-09-25 Thread Laurie Harper
The framework did tell you what the problem was, it just wasn't telling you about the problem you wanted to know about ;-) When a form is submitted, Struts will perform type conversion and, if configured, validation on the input data. If there is an error in either process, Struts will automat

Re: Question abt jsp and struts 1.3

2008-09-25 Thread Laurie Harper
Pankaj Gupta wrote: Hi, I am using struts 1.3. I have kept jsp folder parallel to WEB-INF folder. Inside jsp pages I have images folder, where I am keeping the images referred by jsp. In jsp I giving src of images as as : "images/image-1". So when I access the jsp directly, then I can see th

Re: ApplicationListener issue

2008-09-25 Thread Laurie Harper
Martín Mauri wrote: Hi all, I'm having an issue while implementing an App Listener for my App. Thing is that the ApplicationListener appears to be working fine, as from the logs I can see that the contextInitialized method is being invoked. Inside the method I do this call, same way as the Mail

Re: Best Practice for Transfer Data from Action to Viewer JSP?

2008-09-24 Thread Laurie Harper
Guojun Zhu wrote: Hi, I am new to struts. I am using Struts 1.2.9. I have two String arrays generated in an action should go to the JSP pages . I can set it as an attribute in request/session and pull them in jsp pages. But it seems a bit against the idea of separation between model and view

Re: Getting acknowledgment for an AJAX request

2008-09-24 Thread Laurie Harper
ManiKanta G wrote: Thanks Laurie, If all you need to return is a number or true/false, simply write that to the response in your action method and return null what do you mean writing to response? You mean using response.xxx methods? or some thing else? More or less, yes: write your respons

Re: Problem in using logic:iterate in struts

2008-09-24 Thread Laurie Harper
"view_threads_Action". I hope I am able to explain my problem.Please help.Thanx. Laurie Harper wrote: Unfortunately your struts-config.xml and JSP code didn't make it through to the list properly. Make sure you're sending your message as plain text. A couple of questions: *) H

Re: Custom tag and map-backed action

2008-09-24 Thread Laurie Harper
amp;ct=res&cd=4&rd=1&u=http%3A%2F%2Ftutorials.jenkov.com%2Fjava-reflection%2Fgenerics.html On 9/23/08, Laurie Harper <[EMAIL PROTECTED]> wrote: Sounds reasonable until you remember two words: type erasure. There is no way to 'glean the generic type' of a collection at runt

Re: Getting acknowledgment for an AJAX request

2008-09-23 Thread Laurie Harper
ManiKanta G wrote: Hi, I m practicing AJAX in S2. And in response to my previous mail, Dave replied That's what Ajax does (loosely speaking): returns HTML fragments (or data as JSON, XML, etc.). That's the point of it--so you don't have to return entire pages and refresh the entire window.

Re: Problem in using logic:iterate in struts

2008-09-23 Thread Laurie Harper
Unfortunately your struts-config.xml and JSP code didn't make it through to the list properly. Make sure you're sending your message as plain text. A couple of questions: *) How are you accessing the page? (i.e. what URL are you typing?) *) Are you sure you are calling the action before the JS

Re: Custom tag and map-backed action

2008-09-23 Thread Laurie Harper
Sounds reasonable until you remember two words: type erasure. There is no way to 'glean the generic type' of a collection at runtime. L. Gabriel Belingueres wrote: I agree too. 2008/9/23 stanlick <[EMAIL PROTECTED]>: I agree totally! If the TypeDeterminer had called getEmployees() *and* ha

Re: double action's method invocation

2008-09-19 Thread Laurie Harper
Looking for markup issues like that is my standard advise in these circumstances, so the surprising thing to me is that only FF3 exhibited the 'errant' behaviour. Glad you found the problem, though, anyway. L. Gianluca Musella wrote: It's works fine! I can't believe. It's functionally usual

Re: Define specific .properties file for

2008-09-19 Thread Laurie Harper
Dimitris Mouchritsas wrote: Hi all, we have a disclaimer page in our application (using struts 1.3.8) and we want to display a possibly rather large legal text. So the thought is to create a disclaimer.properties file with only one key in it and for that specific jsp have a to load this discla

Re: tags nested

2008-09-19 Thread Laurie Harper
Alejandro77 wrote: Good morning. I want to make the following order: " /> With this order pretend that the value of attribute value of the first tag is dynamic but gives an error. Does anyone know how I get that? That's not legal JSP syntax, which is why you get an error. For this specific

Re: VisitorFieldValidator - different validation scenarios

2008-09-19 Thread Laurie Harper
Gundersen, Richard wrote: Hi I'm using the VisitorFieldValidator (annotations) to push validation over to my model object in my Action. However, I want the validation rules in my model object to work differently depending on which Action method is being called. What's the best way of doing t

Re: Configure result to go back to page I came from....

2008-09-19 Thread Laurie Harper
The simplest thing would be to have your 'switchlanguage' action method return a 'well known' result name, and map that result in each action. Since this is for input forms, you probably already have an 'input' result mapped for each action, so you could just have 'switchlanguage' return 'input

Re: S2 - Need advice with Localization

2008-09-18 Thread Laurie Harper
bob fuller wrote: I am trying to Localize a dynamic message and would like some advice as to how I should go about it. My main goal is to keep the message itself as 'intact' as possible in my package.properties, doing this will (hopefully) speed up translation by an interpreter. Goals after t

Re: [S2] not including null-params in URL of GET-submitted form

2008-09-18 Thread Laurie Harper
Pierre Thibaudeau wrote: Is there a way to avoid null-valued (or empty-valued) parameters to be explicitely mentioned in the URL generated by a form submitted through the GET method? For instance, here's a form: If the user types "FOO" in the first textfield and nothing in the

Re: struts2-dojo-plugin problem

2008-09-18 Thread Laurie Harper
daveck wrote: Any idea how to get the struts2-dojo-plugin-2.1.2 with struts 2.0.11? I've tried to put the before the in the struts-dojo-tags.tld with no luck. I'm running resin 3.0. I feel like an idiot. Thanks for any help you can give. ERROR: jar:file:/usr/lib/resin/webapps/hol/WEB-INF/l

Re: [S2] URL management

2008-09-16 Thread Laurie Harper
If the URLs you are substituting in are external to the web app, they don't need to be 's2-friendly'; an external site doesn't care about your Struts app's session ID, etc. If the URLs are (or may be) internal to the application, however, you do need to take care of that. In that case, use s:ur

Re: Attribute action form tag is not valid Struts 2

2008-09-11 Thread Laurie Harper
artemisia wrote: Hi guy, i'm new in struts 2. I'm following the apache struts 2 tutorial, using eclipse IDE. When I use the tag s:form I have the following error on the action attribute: "The value of action attribute in form tag is not valid". But the project run ok. Bad configuration eclipse? t

Re: Sorting with displaytag issue due to theme="ajax"

2008-09-09 Thread Laurie Harper
Francisco Exposito wrote: Also I've tried to use displayTagAjax. In order to use it, I define in the main page: But when I reload this page, I receive the error "jQuery is not defined" and the error seems to be in the line of displayTagAjax.js: jQuery(function($) { changeLinks(); });

Re: Ampersand sign problem

2008-09-04 Thread Laurie Harper
deal with) or handle these cases yourself in you input processing. L. Thanks for your help. Regards, -Original Message- From: Laurie Harper [mailto:[EMAIL PROTECTED] Sent: Thursday, August 28, 2008 7:35 PM To: user@struts.apache.org Subject: Re: Ampersand sign problem Can you post a c

Re: Problem with radiobuttons

2008-09-04 Thread Laurie Harper
Mitxel Mitxelisimo wrote: Hi, I´m trying to make a form to fill in a questionform that is composed by some questions and one radiobutton for each, and this is the problem, what can i do to this in my action? how i can fill in each radiobutton? the questionformbean has an questionbean`s array and

Re: Loading message resources properties from a database

2008-09-04 Thread Laurie Harper
laredotornado wrote: Hi, I'm using Struts 1. We want to load our message resources properties, currently defined in our struts-config.xml file: from a database. Now of course, they are in a file called "MessageResources.properties". What is the proper way to do this? You need to add a fa

Re: how to import something with html:xxx tage into a form?

2008-09-04 Thread Laurie Harper
Guojun Zhu wrote: Hi, I am using struts 1.2.9 with tomcat 5.5. I had a few pages with big "html:form". There are some common part (with some tags) in the form. So I tried to put them aside as an import. I tried jstl and , all of them import everything literally into the form, instead of

Re: Does Struts 1.3.x supports PUT and DELETE methods of HTTP

2008-09-04 Thread Laurie Harper
Kamlesh123 wrote: Hi, I want to know that whether Struts 1.3.x or any lower version of Struts support HTTP PUT, DELETE and HEAD methods. I need to use them to develop a REST based application. I haven't checked the source code, but as far as I recall, Struts 1's action servlet only handles G

Re: How to Initialize additional components when the Struts 2 Engine starts

2008-09-04 Thread Laurie Harper
Why? Spring provides facilities for using managed beans as context listeners. Instead of trying to make your listener aware of Spring by hand, just use Springs facilities to register/manage your listener. L. Carlos Luis Zúñiga Sibaja wrote: This sounds a bit like what I need, my only issue wo

Re: OT: Thread pool samples

2008-09-04 Thread Laurie Harper
Zoran Avtarovski wrote: I¹m trying to implement a simple thread pool model (Java 1.4) for a telemetry application. I¹m getting up to speed with threads but I haven¹t been able to find any examples of setting a thread pool in a server/servlet environment. I have a number of remote units which up

Re: [OT] Re: [S2] Problem with list of submit buttons

2008-08-29 Thread Laurie Harper
Dave Newton wrote: x.NameOfForm.NameOfHiddenField.value = INPUTVAL The part that I called "x" is the part that I don't understand. Should it be the name of the JSP or what? Keep searching; this is DOM/JavaScript 101. Personally I'd use a JavaScript library, but it's not really necess

Re: I need generic html table structure with theme ajax in struts 2

2008-08-29 Thread Laurie Harper
use for the solution, With Hope, Ashok. Laurie Harper wrote: MyAshok wrote: Hi all, Again thanks for ur past replies. Now, I am in a new issue. I need to use the ajax theme for two buttons (s:button id=A and s:button id =B). But, as default, each s: tag will create a tr and td tags. I do

Re: Struts 2.1 release?

2008-08-28 Thread Laurie Harper
Oleg Mikheev wrote: Hi guys! What are the plans for v2.1 release? Is there any roadmap available? Like this one but with dates: http://cwiki.apache.org/S2WIKI/21-to-25-roadmap.html Thanks With dates; no. Work happens as the project's volunteers find time to do it. Anyone interested in forthc

Re: OGNL and Java Methods String Arguments

2008-08-28 Thread Laurie Harper
Wouldn't do what you need? L. Richard Sayre wrote: I'm trying to call the String replace method from OGNL. I can't find any specific examples on how to do this. I tried the following as a test: [EMAIL PROTECTED]@toString() This worked ok. My problem is I don't know how to pass string lite

Re: input Map

2008-08-28 Thread Laurie Harper
Miguel wrote: Hi, I'm currently writing a form based on a set, and each object of the set has it's own textfield and it's own id/name. The question is the way i read the returned value in the action. I've tried using a map, but puting the varname[key] doesn't work; How can I acomplish this using

Re: I need generic html table structure with theme ajax in struts 2

2008-08-28 Thread Laurie Harper
MyAshok wrote: Hi all, Again thanks for ur past replies. Now, I am in a new issue. I need to use the ajax theme for two buttons (s:button id=A and s:button id =B). But, as default, each s: tag will create a tr and td tags. I dont want this type of table structure(row by row). I want to customi

Re: Ampersand sign problem

2008-08-28 Thread Laurie Harper
Can you post a code sample of what you are doing? html:text will only escape its output once, so perhaps you are passing it a string that has already been converted into the character entity form (£)? You could try escape="false", but I'd suggest understanding what's going on first so you're c

Re: Reading directory in JSP file (Struts 1.3)

2008-08-28 Thread Laurie Harper
nabbler12999 wrote: Hello, I want to read a directory. But canRead() gives false. How can I do it? Firstly, you show this code as a scriptlet; while you certainly can do this sort of thing from a JSP, such logic really belongs in your action. That asside: My code: [code] <% String filenam

Re: [OT] realm use in s2

2008-08-28 Thread Laurie Harper
This really isn't a Struts issue. You can convince yourself of that by removing the Struts tags from your login JSP; you should see the same behaviour. I would start by looking for any additional information in your container log files and/or searching the mailing list for you container to se

Re: ClassCastException:MultipartRequestWrapper

2008-08-28 Thread Laurie Harper
It's generally a good idea, if you don't get a response to a question, to try providing addition information. For example, where the exception is being thrown, the full stack trace, exactly what you did to get it, etc. The information you've provided so far really isn't enough to diagnose the p

Re: Struts date tag?

2008-08-27 Thread Laurie Harper
laredotornado wrote: Hi, Using pre-Struts 2, is there a tag that will create a date (month, day, and year)? What would I need to do in the ActionForm? In other words, it seems I'm not sure I understand; are you asking if there is a tag which will create separate HTML form inputs for month,

Re: [S2] Reason for having Prepare interceptor before Param interceptor?

2008-08-25 Thread Laurie Harper
Struts Two wrote: Is there any reason that "Prepare" interceptor" is called before "Param" interceptor in the default stack, I see numerous occasions, at least in my case, that you want to have prepare() method run based on user selection. I understand that I can build my stack the suits my nee

Re: S2 tag: mod_rewrite

2008-08-25 Thread Laurie Harper
TLDs don't provide for specifying a default value for an attribute. You'll probably need to define a pair of sub-classes that default the attribute appropriately, and map those in the TLD. L. Pascal Forget wrote: Hi, I modified the PropertyTag to add a "formatterClass" parameter. I would li

Re: [S2] Option for mandatory choice

2008-08-14 Thread Laurie Harper
Milan Milanovic wrote: Hi, I have class structure as follows: class Store { List fruits; Fruit choosenFruit; } So, I need in my jsp to represent fruits, but one of those fruits must be choosen any time (in choosenFruit object, which select one Fruit object from fruits list) during user i

Re: how to disable the back button in Struts 1.2.3 ?

2008-08-14 Thread Laurie Harper
Fernandes Celinio SGCF wrote: Hi, I want to forbid the user to go back. Javascript does not work in actions: Well, obviously; Javascript runs on the client, actions run on the server. window.history.forward(1); Is there a way to disable the back button in Struts ? Thanks That code sh

Re: Multiple Images / InputStream

2008-08-14 Thread Laurie Harper
Pascal_ wrote: I'm using Struts 2.0.11 release. Within my JSP page, I'm displaying a list of elements which all have an image. Those images are displayed using an action with stream result. In Firefox, everything works fine, in IE 7.0, all images shown are the same, I didn't have a chance to tak

Re: Prepare method being invoked twice

2008-08-14 Thread Laurie Harper
Kibo wrote: Hi When you see struts-default.xml, you find out that the paramsPrepareParamsStack call the interceptor params twice. You can set up your struts-default.xml or in struts.xml define your own modified interceptor stack:

Re: [S2] Proper way to clear error messages in session scope

2008-08-12 Thread Laurie Harper
Diego Manilla Suárez wrote: Hi. I have an action in session scope. The problem is that action errors are never cleared and thus are shown repeatedly whenever the user sends the form with validation errors. At first I put a call to clearErrors() at the beginning of mi validate() method, but no

Re: My Action was three times executed

2008-08-01 Thread Laurie Harper
Johannes Geppert wrote: since using struts 2.1.2 my actions was three times executed when i submit a form with dojo and Is this a bug, or a configuration error? How would we know without seeing any of your code or configuration? L. -

Re: Struts 2 And JFreeChart

2008-07-30 Thread Laurie Harper
I don't see what Ajax has to do with this... It sounds more like an HTTP caching issue. Cree, if you do a page refresh, is the image updated correctly? I haven't used the JFreeChart result, but maybe it's not setting the right cache control headers. L. Randy Burgess wrote: Ajax is text only

Re: Wierd Validation

2008-07-30 Thread Laurie Harper
Gundersen, Richard wrote: Hi When validation succeeds on my form, I still get returned to the input page. My execute() method does not seem to be getting called even when validation is OK. This is my Action (no @Validation annotation after I read that was deprecated) ===

Re: Is it a bug in Struts 1.2 that you can't iterate through a java.util.Set?

2008-07-30 Thread Laurie Harper
Ylva Degerfeldt wrote: Hi everyone, I'm using Struts 1.2 (bundled with NetBeans 5.5.1) and I've noticed that I can't iterate through a java.util.Set using the logic:iterate tag. The code that I've tried: I get this exception: javax.servlet.ServletException: javax.servlet.jsp.JspException: Can

Re: Redirect after stream result

2008-07-30 Thread Laurie Harper
ManiKanta G wrote: Hi, How can I redirect to another page after stream result. For example redirecting to another page saying successfully downloaded the file or adding some action message and redirecting to the same page. You can't; there can only be one response to an HTTP request. The sam

Re: struts record output and entry

2008-07-30 Thread Laurie Harper
cpanon wrote: Hello I am having a difficult time designing and implementing an interaction of displaying and accepting user input of multiple records at once. I can create a collection of records, but records are complex, composed of other objects that are themselves composed of text strings

Re: actionMessages

2008-07-29 Thread Laurie Harper
[EMAIL PROTECTED] wrote: I am sending an message for the successful submission of the form by using actionMessage .In the struts xml file i have used the redirect action and passed action message as parameter. In the display i am getting the message .But the problem is the message is getting f

Re: Implementing ParameterAware but still getting Unexpected Exception caught setting 'name' on 'class....

2008-07-29 Thread Laurie Harper
Jan Froehlich wrote: Hi there... I have a page with a dynamic number of input fields that is submited to an action that implements ParameterAware. Cause the names of the parameters passed to that action change every now and then I can't write getters and setters for them. Thats what I thought Pa

Re: Struts Taglib + JSP: Best Practices For Complex HTML Attribute Construction

2008-07-29 Thread Laurie Harper
Brian Ferris wrote: I'm not sure what that Struts Taglib "way" to do the following task would look like: I've got a bean on the ValueStack with a "boolean isActive()" getter. When active, I'd like to construct html like: And when in-active, I'd like to construct: The only real differen

Re: [s2] How to force validation to combobox field

2008-07-29 Thread Laurie Harper
No, it isn't. A 'combobox' results in a request parameter just like any other input. It can be validated in the same way as any other input. L. Milan Milanovic wrote: So, comboxbox in Struts 2 cannot be validated, is it true ? Milan Milanovic wrote: Hi, does anyone know how I can force us

Re: about iterating values

2008-07-15 Thread Laurie Harper
hns wrote: HI Thanks for reply but session is appropriate for large size map stored in it? it can works fine? It certainly *can* work. Whether the session is the best place to keep this data depends on the size of the list, how much it varies (if at all) between users, how often it changes,

Re: fileUpload vs custom servlet

2008-07-11 Thread Laurie Harper
webdev2 wrote: I upgraded my app to Struts2, which provides file uploading. Now my custom servlet for uploading an attachment no longer receives the request. Is there a configurable option for restoring the old functionality of having the custom servlet upload the attachment? Thanks. What

Re: Struts1 and Struts2 mailing lists separation ?

2008-07-10 Thread Laurie Harper
You can always use Nabble: http://www.nabble.com/Struts---User-f206.html L. Gabriel Belingueres wrote: I personally would like to interact using a web based forum where you can post with formatted java and xml code and even with emoticons instead of this email based mailing list, but this woul

Re: Problem from defining JavaBean as an attribute inside ActionForm

2008-07-03 Thread Laurie Harper
Lukasz Lenart wrote: For the record, Struts 1 definitely supports dot-notation access to sub-fields. That's not the problem here. Upsss... ;-) Could you clarify my doubts, from which version? From day one, as far as I know. L. ---

Re: Character Encoding and s:textarea

2008-07-03 Thread Laurie Harper
Richard Sayre wrote: I have a form containing text areas. When I copy a bunch of character data such as: 2öÂnJ1ÈÏúÄp8éÎdìåmðh4uæEÍÉieÔWán2ÅìbØÉÅÀ1JÎZÏôsC5LòÚAPúÜaÃÙPC5üÆCJWCOzùÙtÒQqùét into the text are, it displays normally. When I save the data, the database stores the characters properly,

Re: Struts2 iterator tag

2008-07-03 Thread Laurie Harper
BGE Ger wrote: Hello, I'm struts(2) newbie and I need some help for the iterator tag. How can I access to an updated list in the action class? My JSP looks like: value="%{category}" /> value="%{source}" /> value="%{text}"/>

Re: Struts2 iterator tag

2008-07-03 Thread Laurie Harper
I'm not sure what you mean by a 'submit in each row' but if you want to push data back into the list then yes, you need the index in the input's name as you have. L. BGE Ger wrote: thank you for the answer! But I've read, if I want to change the complete list with the submit action. I

Re: Problem from defining JavaBean as an attribute inside ActionForm

2008-07-03 Thread Laurie Harper
Oh, and another thought: are you initializing ActionForm's empAddress field somewhere? It may cause problems if it is null when Struts tries to set its properties. Struts 2 can automatically create instances of beans in that situation, but Struts 1 doesn't. L. Laurie Harper wrote

Re: Problem from defining JavaBean as an attribute inside ActionForm

2008-07-03 Thread Laurie Harper
Lukasz Lenart wrote: We are using Struts 1.2.9 and writing the JSP page as below: As I remember, Struts 1 don't support such evaluation, you can use For the record, Struts 1 definitely supports dot-notation access to sub-fields. That's not the problem here. L.

Re: Problem from defining JavaBean as an attribute inside ActionForm

2008-07-03 Thread Laurie Harper
What you have below all looks fine; it should work as you expected. What does your form bean definition look like? Is the form bean correctly referenced by the action mapping the form is submitted to? Post the relevant bits of configuration and the full stack trace; maybe that will allow someon

Re: Serialization DynaActionForm

2008-07-02 Thread Laurie Harper
STRUTS SL. Mailing List wrote: The Struts-config.xml is as follows: . . . and the catalina.out I get this error. WARN No puedo serializar atributo de sesi?n FormCircuitos para sesi?n 772D050829571AEA6C6E7135C8BE60DA That's not an error, it's a w

Re: XSLTResult problem

2008-07-02 Thread Laurie Harper
You don't have a stylesheet? What are you expecting the XSLTResult to do, if you don't have any XSLT to process? L. Eric Hamacher wrote: I took your last attachment, altered it (we don't use JDOM only the org.w3c.dom stuff . . . but it looks like it should work for org.w3c.dom.Document). Now

Re: [s] Validity of user session

2008-07-02 Thread Laurie Harper
Milan Milanovic wrote: I have an SessionAware-based action class, where I put some variables into session when user came to the page which is backed up with that action class. I'm wondering what is validity of that session object, because I'm not sure if I have possibility to clear user session ?

Re: [S2] adding serialVersionUID to actions

2008-07-02 Thread Laurie Harper
Gabriel Belingueres wrote: Hi, Is there any value in adding the serialVersionUID to all our actions? My idea is just to add a @SupressWarning("serial") to each action. AFAIK, the actions are newly created in each request and are never put into session or application scope (by Struts itself at l

Re: validation problem

2008-06-26 Thread Laurie Harper
Why not just validate all fields with type="requiredstring" and set short-circuit="true" on them? Wouldn't that do what you want? See the Short-Circuiting Validator section of the validation docs [1] for more details. [1] http://struts.apache.org/2.1.2/docs/validation.html L. ManiKanta G wro

Re: Newbie: Call a servlet in another application and set attribute

2008-06-26 Thread Laurie Harper
Nils-Helge Garli Hegvik wrote: I believe most servlet containers prevent sharing of session objects between applications by default. But it probably can be configured to be allowed (consult the documentation for your server to find out I know some containers support this, but it is container-sp

Re: Struts list

2008-06-26 Thread Laurie Harper
Sonu S wrote: HI, I have to show list in my jsp page. I am using i am getting two lists from data base and it is in employee form bean: first list is for employee no and second list is for name. i want to display employee name in and want to use employee no as VALUE in so list would have em

Re: [S2] autocompleter action extension

2008-06-26 Thread Laurie Harper
My guess is that using an action extension of .html creates a conflict with the Dojo template resources, which are .html files. If you look at your access logs (or use Firebug to see what XHR requests are being made during page rendering), you'll see what I mean. The easiest thing to do is pic

Re: Struts Themes Problem - help

2008-06-26 Thread Laurie Harper
d generate a label with the values given for app.cname, but when simple theme is given ( like ) the label is not rendered!! can you help me on solving this >? On Mon, Jun 23, 2008 at 11:18 PM, Laurie Harper <[EMAIL PROTECTED]> wrote: Narayana S wrote: Hi Dave, thanks for your r

Re: Struts Validator Framework: client-side validation problem with submitting buttons

2008-06-23 Thread Laurie Harper
works! Thanks a lot. However i can't understand why the onsubmit handler is not triggered by the submit() function! Laurie Harper wrote: Did you confirm whether calling the form's submit() method triggers its onsubmit handler? It may be that calling submit() bypasses it, in which case a

Re: Struts Themes Problem - help

2008-06-23 Thread Laurie Harper
Narayana S wrote: Hi Dave, thanks for your reply, but when i use simple theme, my application is not getting any values from resource bundle.. How is it failing? Note that the 'simple' theme generates a lot less markup, and doesn't generate everything the other themes do. Are I18N resou

Re: Struts Validator Framework: client-side validation problem with submitting buttons

2008-06-23 Thread Laurie Harper
Did you confirm whether calling the form's submit() method triggers its onsubmit handler? It may be that calling submit() bypasses it, in which case an explicit guard in your submit function might do the trick: function submitRegistrazioneUtenteForm(nomeForm){ var form = ...; if (validateRe

  1   2   3   4   5   6   7   8   9   10   >