Re: Upload file content to text box using struts 1.3.8

2010-11-29 Thread Li Ying
Another way is, using AJAX: (1)Send a file upload post, (using AJAX), to your FileUploadAction (2)FileUploadAction just read in the CSV file content, and return it as HTTP Response (3)On client side, AJAX can receive the Server response, then you can put it to the textarea (using JQuery) See: h

Re: Upload file content to text box using struts 1.3.8

2010-11-29 Thread Li Ying
Why do you need two forms? Can't you put the FileUpload and the textarea in one form? And in your Action, you can create 2 method, one handle the file upload, and the other one handle the other request - To unsubscribe, e-mail:

Re: Upload file content to text box using struts 1.3.8

2010-11-29 Thread Anjib
This textarea itself is one of the component of the form. So how to put two forms in a single page? On 11/29/2010 9:30 PM, Li Ying wrote: (1)Select file from a [file input] (2)Upload it to your Action (by a post) (3)In your action, read in the CSV data, and store into some property(let's say

Re: Upload file content to text box using struts 1.3.8

2010-11-29 Thread Li Ying
(1)Select file from a [file input] (2)Upload it to your Action (by a post) (3)In your action, read in the CSV data, and store into some property(let's say CSVDataProperty) (4)Show your page again, and set the default value of the textarea by CSVDataProperty 2010/11/30 Anjib Mulepati : > Can anyo

Re: Link Display Logic

2010-11-29 Thread Zoran Avtarovski
What we have implemented is a set of public authorisation methods in our base action which we call via ognl passing the actionId as the parameter. For example to test if a user should be shown the print report we have a isUserAuthorised(Integer actionId) method which we use as follows: Your stuff i

RE: Link Display Logic

2010-11-29 Thread Biesbrock, Kevin
Dave, Utilizing your suggestion, it sounds like it would be possible to utilize the s:action tag? I guess, what would your custom tag do? It sounds like, either way, you'd need to call the action from your jsp/view to return a jsp fragment with either the authorized links or nothing. Am I under

Re: Link Display Logic

2010-11-29 Thread Dave Newton
I'll generally expose permission info through an action (or whatever model makes it to the page) and use a custom tag to really clarify and narrow the purpose of that particular JSP/etc. logic. Other than that, though, not sure what else I'd really do, if I'm trying to stay within the S2 framework

Link Display Logic

2010-11-29 Thread Biesbrock, Kevin
Hello users. I'm Kevin, first time caller, long time listener (Mr. Obvious reference). I have two reports and need to display a link for each if the following conditions are met: 1. The user is authorized to view the reports (they are secured), and 2. The specific report currently exists

Re: Configuration for "struts.convention.action.suffix"

2010-11-29 Thread Maurizio Cucchiara
According to rest plugin docs (http://struts.apache.org/2.2.1/docs/rest-plugin.html) struts.convention.action.suffix should be a String, so I guess that it doesn't accept multiple value. I'm not sure it works, but why don't you try to use struts.convention.package.locators instead of action.suffix

Configuration for "struts.convention.action.suffix"

2010-11-29 Thread developer researcher
Hello, I need have a web application that expose part of its functionality as RESTfull web services. For this I plan to use the REST Plugin but this implies set in struts.xml the next: In this context i have a doubt: Is possible that 'struts.convention.action.suffix' supports sev

Upload file content to text box using struts 1.3.8

2010-11-29 Thread Anjib Mulepati
Can anyone help me on getting file content (txt/CSV file) to be load in text area of web page? I have textarea in webpage and want to load the content of the file to that textarea. I am using struts 1.3.8. I couldn't fig out how can mimic file input button. Any hint will be appreciated. Tha

Re: labelizing submit buttons

2010-11-29 Thread M. Rakowski
i have exactly the same problem: with event.name set in the package.properties file: works ok. with button.create set in the same .properties-file causes exception. Suggestion: It works only if you use ActionClassName.properties file instead of package.properties?

Re: labelizing submit buttons

2010-11-29 Thread Maurizio Cucchiara
You shouldn't need a setSearch method inside your action: the bEst way to make it work is to verify that your ActionClassName.properties contains a btn.search entry. 2010/11/29 webmeiker : > Hi all, > > Could somebody help me with the next issue? > > > > In a submit button I want to use a customiz

Re: binding paramters in struts2 without the form

2010-11-29 Thread Maurizio Cucchiara
If you don't want dot notation, I should consider using ModelDriven interface. Take a look at http://struts.apache.org/2.2.1/struts2-core/apidocs/com/opensymphony/xwork2/ModelDriven.html 2010/11/29 maven apache : > Maurizio Cucchiara's answer seems like a good idea excepting I have add the > pers

Re: binding paramters in struts2 without the form

2010-11-29 Thread Dave Newton
On Mon, Nov 29, 2010 at 6:55 AM, Jason Ferguson wrote: > Struts will not automatically populate fields based on parameters passed > via > the URL. Your action will need to implement the ParameterAware interface, > and the setParameters(Map parameters) method. Then you > can > use the map to popula

Re: binding paramters in struts2 without the form

2010-11-29 Thread maven apache
2010/11/29 Jason Ferguson > Struts will not automatically populate fields based on parameters passed > via > the URL. Your action will need to implement the ParameterAware interface, > and the setParameters(Map parameters) method. Then you > can > use the map to populate your fields. > Maurizio

Re: binding paramters in struts2 without the form

2010-11-29 Thread Jason Ferguson
Struts will not automatically populate fields based on parameters passed via the URL. Your action will need to implement the ParameterAware interface, and the setParameters(Map parameters) method. Then you can use the map to populate your fields. Jason On Mon, Nov 29, 2010 at 5:25 AM, maven apach

labelizing submit buttons

2010-11-29 Thread webmeiker
Hi all, Could somebody help me with the next issue? In a submit button I want to use a customized label (which is extracted from a .properties file). The problem is that I get the next exception: Error setting expression 'btn.search' with value '[Ljava.lang.String;@1ed56e2' *ognl.OgnlExcep

Re: binding paramters in struts2 without the form

2010-11-29 Thread maven apache
2010/11/29 Maurizio Cucchiara > Frankly, even after I watched your question on stackoverflow, I can't > figure out what you meant. > :( > You don't necessary need struts tag, you can pass parameter via http > request, so, for example, if you enter > http://your_url:your_port > /your_struts.actio

Re: Struts 2 Testing - odd behaviour

2010-11-29 Thread Maurizio Cucchiara
Simply, the former renders a element, the latter renders a . They should be the same thing, according to html 4.01 specification. The point is that ie6 doesn't like button tag. 2010/11/29 RogerV : > > > > Maurizio Cucchiara wrote: >> >> You're right... there is something wrong in the way IE6 hand

Re: binding paramters in struts2 without the form

2010-11-29 Thread Maurizio Cucchiara
Frankly, even after I watched your question on stackoverflow, I can't figure out what you meant. You don't necessary need struts tag, you can pass parameter via http request, so, for example, if you enter http://your_url:your_port/your_struts.action?personBean.firstName=your_name in the address ba

Re: binding paramters in struts2 without the form

2010-11-29 Thread maven apache
BTW,this is a cross post at stackoverflow . 2010/11/29 maven apache > > > > > > > > > > public class Register extends ActionSupport { > > > private static final long serialVersionUID = 1

binding paramters in struts2 without the form

2010-11-29 Thread maven apache
public class Register extends ActionSupport { private static final long serialVersionUID = 1L; private Person personBean; // } Using the s:form tag one can bind the parameter from the client to a java object(the personBean in the Register acti

Re: Struts 2 Testing - odd behaviour

2010-11-29 Thread RogerV
Maurizio Cucchiara wrote: > > You're right... there is something wrong in the way IE6 handles buttons. > > Why don't you simply use: > > > Thanks for the confirmation Maurizio, I thought I was going mad. Your suggestion works, my app is now behaving itself on IE6 as well. Since you

Re: Struts 2 Testing - odd behaviour

2010-11-29 Thread Maurizio Cucchiara
You're right... there is something wrong in the way IE6 handles buttons. Why don't you simply use: 2010/11/29 RogerV : > > > > Maurizio Cucchiara wrote: >> >> Could you post the generated html? >> > > Posted below. Thanks for the typo nudge Dave, I hadn't spotted that because > it actua