Re: Struts 2 - problem updating page

2011-01-06 Thread Alex Rodriguez Lopez
Not completely sure, but doesn't this one: http://struts.apache.org/2.x/docs/token-session-interceptor.html handle this situation? developer researcher, 06-01-2011 01:55: Hello, I have the following problem: after submit a form, if it refresh (F5) the page the form is submitted ag

Re: unicode breaks s:select?

2010-12-16 Thread Alex Rodriguez Lopez
Have you got this on top of JSPs? <%@ page contentType="text/html; charset=UTF-8" %> Patrick Cosmo, 15-12-2010 17:40: Hi! When using "s:select", if the list of data returned by my java class contains strings that have unicode characters in them, "s:select" fails to generate the entire tag, it

Re: AJAX file upload

2010-12-02 Thread Alex Rodriguez Lopez
Still off-topic, but recently I've been using this neat feature in GMail where one simply grabs an actual file from, say, your desktop, and drop it into a designated zone in the page when composing mail. The file starts uploading when droped, so I guess you could call this "ajax upload". I wond

Re: Struts 2 s:action tag doesn't render action errors if any are present

2010-10-29 Thread Alex Rodriguez Lopez
I don't know if this aplies to the issue here, but I once used this interceptor: AUTOMATIC So the errors / messages will be passed through actions and redirections if not retrieved / showed. As far as I recall it worked to me pretty well. Alfredo Manuel Osorio Martinez, 28-10-2010 23:35:

Re: export to excel - displaytag

2010-10-26 Thread Alex Rodriguez Lopez
Hi, I had the same problem, but it was time ago. I asume from your code that you followed this: http://displaytag.sourceforge.net/1.2/export_filter.html and using Struts 1. If using this with Struts2 you should have to change the url-pattern to *.action or whatever extension you are using.

Re: After upgrading from Struts 2.0.x to 2.2.x, static content no longer served...

2010-10-19 Thread Alex Rodriguez Lopez
I'm using a combination of empty extension and exclusions for static content which works well now. Got pretty confused too at beginnning when I changed to an empty extension though: http://struts.apache.org/2.2.1/docs/static-content.html in web.xml: struts2 org.apache.struts2.

Re: referencing javascript files from (action) jsp file

2010-10-14 Thread Alex Rodriguez Lopez
try it without the first / like
changed javascript paths as follows:



Domain Security Administrator: Pas gebruiker aan
Re: Master-details JSP with Validation xml

Why is the params-prepare-params not in the default stack / behavior already? I think one of the first things S2 gets really useful at is the params / prepare stuff and a LOT of people keeps asking the same question, and getting the same answer "use the params-prepare-params stack". Any reasons

Re: Javascript proble in sx:civ in struts2

I don't have a definite answer, but just keep in mind that: - The Dojo plugin is deprecated, you might want to consider other ways of achieving the same thing. - For the ajax tags to work you have to include the head tag ( ). Please read: http://struts.apache.org/2.x/docs/ajax-tags.html htt

Re: How do we repopulate controls when validation fails?

Don't know if this solves your problem, but maybe it helps to use the params-prepare-params trick, calling params interceptor twice, so you have your params ready before prepare(). You have an already configured stack, the paramsPrepareParamsStack From struts-default.xml:

Re: File Upload

I think this is a browser/OS specific behaviour, not related to Struts or even to HTML at all. Em 26-07-2010 13:20, RogerV escreveu: Is there a way of specifying the start directory to be used when the user hits the "browse" button? As far as I can see, the system "remembers" where it was look

Re: set a list from getmodel()

As far as I remember, for Struts to populate a list you just give the same name for a setter in the action that takes a List<> as a parameter as the element(s) in the Jsp. So you can have 1 textboxes *with same name*, and if this name happens to map to a list, the list will get populated wi

Re: Passing parameters to getter methods?

You can do this without parameters. Write a setter for this index property (to save it), and then in the getter you grab the saved value. Hi, I want to call s:iterator and fetch a list by passing it an index. This list will be dynamically generated. where I want getProducts(Integer index)

Re: Page composition strategy

BTW, any of those two are easily integrated into S2 as plugins (in fact already bundled with S2 distribution, just add the jars): http://struts.apache.org/2.1.8.1/docs/tiles-plugin.html http://struts.apache.org/2.1.8.1/docs/sitemesh-plugin.html I've been using Tiles and always found it confus

Re: Page composition strategy

I've been using Tiles and always found it confusing a little bit, now that I'm starting to test Sitemesh my vote would be for this last one. They accomplish the same thing, only Tiles is like saying each time "my page is made up of this, this and this". Sitemesh is more about taking a piece of

Re: Struts2 form token not matching session token

If you are not using it already, I suggest using FireBug to inspect the data sent along with each request, so maybe you can find where these values come from. Hi all, I am having a strange problem with the struts2 token tag and the token-session interceptor. It seems like the token added to th

Re: Iterating over a Collection and creating a for each entry of it

http://struts.apache.org/2.x/docs/checkboxlist.html Hi! Is something like the following snippet possible to do? ${entry.name} ${entry.forced} Of course this code won't do it, but I hope you're getting my idea. I'd like to iterate over a collection an

Re: PRG pattern question

Em 26-05-2010 16:57, Chris Pratt escreveu: If you search the forum, someone posted an Interceptor (quite a while ago) that saves the Action/Field Errors/Messages in the Session so that they will survive a redirect. It could easily be extended to do what you require. (*Chris*) I think this i

Re: Cookie Manipulation attack

Em 27-05-2010 11:27, Vishnu Vyasan Nelliparmbil escreveu: Hi Guys, I am handling a application in which we have application in two languages. There is a Locale action for setting locale to English or Arabic based on the parameter being passed from the respective index pages. I.e. index_en.jsp an

Re: Need Help For Struts2 Debugging

I use to find it impossible to do this... Then I started to use Maven, which can be used to download source code and attach it easily. If you use Eclipse I suggest using M2Eclipse plugin. After you get a Struts2 based project with Maven2 up and running it should be easy to do what you want, do

ActionContext.getContext().getSession() vs. SessionAware injection (about servlet maps)

Hi Struts users! I was wondering, after reading about the ServletConfigInterceptor, if there are differences in obtaining the session map via the method ActionContext.getContext().getSession() or have it injected through SessionAware. The map that I end up with is the same so... why have to

Re: Interator values not showed

Hi, i'm trying the append tag and the list values of the appended lists are not showed. This is the main part of the jsp code: Total Bands: Band: This is my Action class: package struts2.action; import java.util.ArrayList; import com.opensymphony.xwork2.ActionSuppo

Re: how to set default focus field in ?

Hi, I use to do this "manually" with javascript, didn't know it was part of s:form tag. So today I decided to give it a try but it is not working for me... how does this works? Does it need some plugin or additional config to make it work? Is it compatible with jquery, which I include in ever

Re: Struts 2 : redirect to action method on type conversion fail ?

Hi Thomas, use the paramsPrepareParams interceptor stack (or change yours), from struts-default.xml: ... I think this accomplishes what you are looking for (of course you need setters for the parameters that you want params interceptor to have ready for you by the time the pre

Re: ExecAndWait interceptor parameters lost

Hi, you can store data in session and retrieve it later on. Data stored in session is persisted through requests. ActionContext.getContext().getSession(); http://struts.apache.org/2.1.8.1/struts2-core/apidocs/com/opensymphony/xwork2/ActionContext.html Hi, I have an issue in my code that I

Re: Where is the documentation for Struts tags ....

Em 05-05-2010 07:57, RogerV escreveu: So if it's looking for a string, let's make sure you're giving it one, and not the .toString of an empty map that it got from your prepare method: I must admit I don't understand what you expect this to submit, or how that should become a map -- there a

Re: s:select help

Maybe using OGNL along with #this or #attr . Haven't checked that out but it should work some of these ways: http://struts.apache.org/2.0.14/docs/ognl-basics.html http://www.opensymphony.com/ognl/html/LanguageGuide/varref.html Em 04-05-2010 14:03, RogerV escreveu: Upasana Sharma wrote: li

Re: Struts 2 and dynamics web page

This example proved helpful to me: http://struts2inaction.com/SimpleAjax.html In the end I ended up doing the same with jQuery: You can get the selected option and pass as params to the called action. The action has a result that is a jsp with just the content that will get loaded into the

Re: Struts 2 validation

If you define action alias for specific methods in your struts.xml (you can do so with wildcards too), then you can use this format --validation.xml as stated below. http://struts.apache.org/2.1.8.1/docs/validation.html Defining Validation Rules Validation rules can be specified: Per Action c

Re: Annotation Validation

d in place of the {0}. Em 28-04-2010 21:30, mrsv escreveu: Did you try something like this? @RequiredStringValidator( fieldName = "label.name", key ="error.required ", message = "Name required.")} Alex Rodriguez Lopez wrote: Hi struts us

Annotation Validation

Hi struts users! I'm on my way to change from XML based validation to annotation validation. I've manage to get it working, but (probably due to my little knowledge of Java annotations) there are some things I can't get to work, so I apologise if this question is not entirelly Struts related.

Re: OptionTransferSelect in 2.1.8

http://www.manning-sandbox.com/thread.jspa?threadID=22922&start=15&tstart=0 maybe this post (and the first page) will help you, as they show a similar example and how the list relates to the properties in the action Em 27-04-2010 14:14, RogerV escreveu: mgainty wrote: the site you menti

Re: struts session help

Hi, you could put/get from session like so: ActionContext.getContext().getSession(); You can define a "parent" action (implementing preparable) with a prepare() method that retrieves data and store it in session for later (and check each time if data is already in session) and puts it into p

Re: Struts2 XML based validation doesnt work !

I'm sure your problem is related to themes/templates. If you are using simple theme you have to provide your own labels for fields, so the field validation works and S2 knows where to place the messages (because you know validation happens, it's just the messages not displaying, right?). che

Re: Custom types and select lists

How I do it with selects is having getter/setter for whatever you write in name="" (in your case "campus") as type Long (should be List if select is multiple). In prepare() you put in campus the campus id of the campus that should be preselected (the one acording to the student id, right?), and

Re: Syntax problem: Trying to display label for Select while iterating

I had similar problems with labels, most times they where related to themes. http://struts.apache.org/2.x/docs/themes-and-templates.html For example, if you turn on simple theme you'll have to provide your own tags for the labels as struts won't generate this markup. Em 08-04-2010 08:18, Roge

Re: Why do I need a refresh to print a display:table ?

tried quite early after i discovered my problem and unfortunately useless. The behaviour stays strictly the same. On Wed, Apr 7, 2010 at 4:08 PM, Alex Rodriguez Lopez wrote: Hi Stéphane, did you try implementing the Preparable interface in your action and populating your List in the prepare

Re: struts 2 tag confution

Use this syntax: forward Em 07-04-2010 06:52, Supratim Bandyopadhyaya escreveu: Greetings to all, I have been trying to get to work properly. Here is the code. Next Record here the parameter offset comes from the action bean which sho

Re: Why do I need a refresh to print a display:table ?

Hi Stéphane, did you try implementing the Preparable interface in your action and populating your List in the prepare() method? http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/Preparable.html Em 07-04-2010 05:16, Stephane Cosmeur escreveu: One week later, i'm still

Re: How to keep quotation marks

the escape attribute (set it to false) and worked like a charm. Thanks again. On Mon, Apr 5, 2010 at 10:14 AM, Alex Rodriguez Lopez< alo...@flordeutopia.pt> wrote: Try escape or escapeJavaScript atributes of tag, never used them but maybe are helpful for your situation http://struts.apa

Re: How to keep quotation marks

Try escape or escapeJavaScript atributes of tag, never used them but maybe are helpful for your situation http://struts.apache.org/2.x/docs/property.html Em 05-04-2010 15:06, Craig Ricciuto escreveu: Hi there. I've run into situation that I'm not quite sure how to resolve. In one of my acti

Re: i18n problem with Struts2 - getting weird

Do you have your struts.custom.i18n.resources property correctly assigned to your bundle(s)? Em 05-04-2010 11:27, Marc Logemann escreveu: Hi, imagine the following jsp (saved in UTF-8 encoding): -- snipp --- <%@ taglib prefix="s" uri="/struts-tags" %> Hauptmenü -- END s

Populate: Implement preparable or richer getter approach

Hi to all, as I learn more things about S2 some questions emerge about best practices more experiences users might know how to do best. I believe it is a common problem having to populate fields like selects first thing (with data from DB or stored in session) before any task is done. This

Re: Pagination with Struts 2.1.8 ?

e at DB level as Adam suggested. --- On Mon, 3/29/10, Alex Rodriguez Lopez wrote: From: Alex Rodriguez Lopez Subject: Re: Pagination with Struts 2.1.8 ? To: user@struts.apache.org Date: Monday, March 29, 2010, 4:32 AM Display tag, works like a charm: http://displaytag.sourceforge.net/1.

Re: [Struts 2.1.8.1] Internationalization: how to remain in the current page ?

ted, I can share that code Denis. Le 2010-03-29 04:55, Alex Rodriguez Lopez a écrit : Thanks Zoran for sharing your approach, greatly appreciated, I'm thinking about implementing a similar interceptor, and maybe replace the i18n one so work is done implicitly with only a change in stru

Re: Pagination with Struts 2.1.8 ?

Display tag, works like a charm: http://displaytag.sourceforge.net/1.2/tut_basic.html Works with lists and handles pagination, data export, I recommend it! Em 29-03-2010 11:07, Celinio Fernandes escreveu: Hi, This is a classic requirement. I have this table, in a JSP, that I have created with

Re: [Struts 2.1.8.1] Internationalization: how to remain in the current page ?

Thanks Zoran for sharing your approach, greatly appreciated, I'm thinking about implementing a similar interceptor, and maybe replace the i18n one so work is done implicitly with only a change in struts.xml and the new interceptor. Em 29-03-2010 02:58, Zoran Avtarovski escreveu: Hi Guys, We

Re: [Struts 2.1.8.1] Internationalization: how to remain in the current page ?

Hi Zoran, would you mind sharing the code of this tag? It would be helpful to me, as somehow I've been able to link to the same sction with an empty url tag but unable to retain params. Thanks! Em 24-03-2010 22:42, Zoran Avtarovski escreveu: I wrote a small custom tag which builds the link w

Re: Form values getting empty After validation failure

Hi, don't know if it will be usefull, but some days ago someone in the user list suggested using the getters and setters of the properties that map to your form to call get() and put() methods of the current session ( ActionContext.getContext().getSession() ) , so you get "automatic" session

Re: How to get s:select id and name under struts2 action?

Forgot to mention, this is the case with a multiple select, if the select is simple and only one option can be selected, then a bean property for an int or long will sufice. Em 23-03-2010 09:33, Alex Rodriguez Lopez escreveu: Assuming your ids are of type long, you could do it with a list of

Re: How to get s:select id and name under struts2 action?

Assuming your ids are of type long, you could do it with a list of Long like so in your action: private List test = new ArrayList(); plus the getters and setters (getTest(), setTest()). test is the name you gave in the select (). Struts2 will polulate the list with the selected ids. Em 23-0

Re: Freemarker error on form submit with checkboxlist

Solved, the list and name atributes of checkboxlist cannot have the same name: name="roles" list="roles" this is what caused the problem. Em 15-03-2010 13:16, Alex Rodriguez Lopez escreveu: Hi all, I ran into a strange error when using a checkboxlist, backed by a list

Freemarker error on form submit with checkboxlist

Hi all, I ran into a strange error when using a checkboxlist, backed by a list of usergroups (roles) objects. The error shows not when the form is displayed (it all works as expected) but when submitting the form with the checkboxes on it. Using 2.1.8.1 Could somebody please tell me if this

Re: legend don't work under of struts2

Hi! This might be related to the theme the form is using, http://struts.apache.org/2.1.8.1/docs/themes-and-templates.html This happened to me too, the default s2 theme adds table elements to forms for layout, and trying to use fieldsets results in them being rendered apart from the form elem

Re: Encoding of french characters in

Hi Ulf, do you have your charset declared as utf8 like this? <%@ page contentType="text/html; charset=UTF-8"%> Maybe you have to write the special characters in the string as html entities... Em 11-03-2010 09:10, Ulf Liedén escreveu: Hi all, my first post to this list :-). Sorry if I'm dou

Changing locale and retaining previous query url params

Hi! I have the following code in a tile I use on nearly every page of my app: "> " />

Re: About the better way to implement a JSP in read/edit mode

I do tend to think that the less files the better. Here it's the same with the number of files for actions/jsp, one can use more actions, ore less actions but more methods inside. Same with jsp, I do think it's better with less files, but a colleague here also thinks the opposite, sometimes wit

Re: AJAX Validation (calls to action methods work on submit, but messages not displayed nor page redirected)

I'm thinking this might be related to the AJAX Theme thing... is this required to work with AJAX validation? Any other requeriments aside from including the sx:head tag? Em 08-03-2010 11:11, Alex Rodriguez Lopez escreveu: Hi! I'm updating validations on my app to use AJAX. I fol

Re: struts 2 - framework question

It looks to me that you could use a combination of packages for each store with different namespaces, but to save code repetition it would be good idea to use wildcards (or go for the restful way as already suggested) in the config files and later on the action retrieve the full url to see whic

Re: possible s:submit with parameter?

You can use hidden fields inside of the form which will be sent too on submit as GET or POST params(usually good for IDs). Alex Em 05-03-2010 23:13, Adam Pinder escreveu: Any form textfield will be submitted when page submitted which is effectively a parameter. Adam On 5 Mar 2010, at 19:46,

Re: Locale and custom variables

Em 04-03-2010 14:15, abhishek jain escreveu: On Thu, Mar 4, 2010 at 7:30 PM, Alex Rodriguez Lopez wrote: Em 04-03-2010 05:49, abhishek jain escreveu: Hi friends, I have a few variables who have diff values depending on the locale / country. I do want to use a message-resources for storing

Re: Locale and custom variables

Em 04-03-2010 05:49, abhishek jain escreveu: Hi friends, I have a few variables who have diff values depending on the locale / country. I do want to use a message-resources for storing the values of those varaibles, I do not know how to get these variables in my Action (I want them in action and

Re: How to pass HTTPRequest between two JSP ?

Em 28-02-2010 23:26, Frederik Minatchy escreveu: Hello... Since a few days I am working with Struts 2. (2.1.6) I am facing a big problem with HttpRequest and JSPs. Well... I have to forward a HTTPRequest from page1.jsp to page2.jsp So... How can I pass HTTPRequest attribute betwen 2 pages? He

Re: When I link to a *.do I get "Page not found"

Em 27-02-2010 13:30, Søren Blidorf escreveu: I have made a struts application and it works just fine on my testserver. I have now uploaded it to my hosted webserver and struts does not work. When I link to a *.do I get “Page not found” Could it be a Tomcat config problem. Placing the jar

Re: Way to forcefully reload struts.xml [struts2]

Em 26-02-2010 06:06, Bhaarat Sharma escreveu: We are seeing a situation where certain namespaces/actions are getting error "There is no action mapped for namespace ... and action ..." on the server. However, on our local we do not get this error. Which leads us to believe that struts.xml might

Re: Nabble and mailing list archives

Em 25-02-2010 18:54, Greg Lindholm escreveu: This mailing list on Nabble seems to be gone, at least I can't find it. Nabble switched over to a new system and old system is now at old.nabble.com but doesn't seem to be getting updates anymore. Anyone working to get this mailing list archived on the

Re: Description of current struts-2.1.8.1\lib content

Em 24-02-2010 16:32, Lukasz Lenart escreveu: 2010/2/24 Alex Rodriguez Lopez: Hi! I've recently started a job as a webapp developer. I've been some days already working out how Struts 2 works, I'm the kind of person who likes to know exactly what's going on at all moments,

Description of current struts-2.1.8.1\lib content

Hi! I've recently started a job as a webapp developer. I've been some days already working out how Struts 2 works, I'm the kind of person who likes to know exactly what's going on at all moments, so I rather assemble my own app taking what I need at every moment that work from an example. I