Locale SEO permanent link URLs in Struts2

2010-01-03 Thread Ignacio de Córdoba
Hi there, I have several working struts2 applications using i18n bu have an issue I need to solve. >From the user perspective, the struts2 request_locale parameter approach is perfect but as locale information is stored in session, urls visited by a user (or robot) are not locale specific. Is ther

EJb 3.1 (dependency injection) and Struts2 actions ¿CDI/Weld needed?

2009-12-07 Thread Ignacio de Córdoba
Hi there, I'd like to know if there is a recommended approach to deal with dependency injection on new EJB 3.1 EJBs. I am using now a modified version of JBoss Struts2 plugin with works great but it really does nothing more than regular JNDI lookups on every action request call. I wonder if there

Re: [Struts 2 + EJB 3] injection of EJBs into struts 2 actions

2009-12-07 Thread Ignacio de Córdoba
Which appserver are you using? I use JBoss for struts2 plugin. I hace to modifyit as it didn't support JBoss 5 naming conventions (at least for me) and it only looked for annotations in current class, so if you injected a Session Bean in a super.execute() method in a parent class, it was not look

s2: validation of checkbox a radio button

2009-11-18 Thread Ignacio de Córdoba
Hello, I am trying to use client side validations through ...-validation.xml in struts2 I have it working but only for text and file input fields. I need to validate if a checkbox is checked. using "required" or "requiredstring" validators always validates as the field as a value even if you don't

Localized key values in s:select

2009-11-12 Thread Ignacio de Córdoba
Hello, I wonder if it is possible to make s:select tag localize the content of option elements. I am using: I'd like attribute listValue="name" property value if the objects iterated not to be shown "as is" but to be used as a key to the language property files... just like the "key" attribu

Re: Using Struts2 JQuery drag & drop

2009-11-04 Thread Ignacio de Córdoba
Hello, I agree with your point of view, but sj: tags are a good start point to get introduced to JQuery. I'll look anyway at remote divs the jQuery "direct way"... Thanks for your reply Sparecreative wrote: > > Hey Ignacio, > > I’m not a big fan of integrated ajax functionality. While it prov

Re: Using Struts2 JQuery drag & drop

2009-11-02 Thread Ignacio de Córdoba
Hello Z., you are right. I am really new to JQuery & Javascript as I've just focused into server side programming. I'm not a javascript fan... I have to use it anyway. I have already solved the coords. problem in JQuery drag&drop. There seem to be many docs about it in the net. Anyway, I haven't

Using Struts2 JQuery drag & drop

2009-10-31 Thread Ignacio de Córdoba
Hello, I am looking at last version of Struts2 JQuery plugin and looks graet. Unfortunately I am really new to JQuery. I've been doing things with discontinued Dogo plugin but have found that the drag & drop tags in JQuery plugin could really fit for a Rich Int. App I have in mind. Hope somebody h

Re: Redirecting from mapping error exceptions

2009-10-17 Thread Ignacio de Córdoba
Hello, 2 years now from your question I wonder if you solved this. I'd like to do exactly the same thing... redirecting any non existing action or error from the user when entering the actin URL to the home page. (I mean, any 404 error) At first I thought about using httpd error handling for this

localization properties files working in WEB-INF/classes and not in WEB-INF/lib/NAME.jar

2009-10-13 Thread Ignacio de Córdoba
Hi there, I am facing a strange problem. My properties files work fine when I put them unjarred in /WEB-INF/classes/com/mypackage/package_en.properties /WEB-INF/classes/com/mypackage/package_en.properties but struts2 actions and tags (s:text) won't find them if I include them in the same jar fi

Re: sx:textarea border (and label...)

2009-09-24 Thread Ignacio de Córdoba
ialog, but that is a minor issue for me. CKEditor is just impressive. h-m-g wrote: > > > > Ignacio de Córdoba wrote: >> >> Hi, >> I am using sx:textarea in several pages and the HTML visutal text editor >> renders and works ok. I'd just like to make i

Re: Page waits to load initially with Div Dojo tag

2009-09-10 Thread Ignacio de Córdoba
Hello, I wonder if you solved this. I'm facing the same problema and saw no info on the docs. Also have tried with delay="0" and preload="true" Mekna wrote: > > I would appreciate any kind of Help, Thanks > > Hi, > > I am struts user. upgrading app from struts 2.0.11.2 to struts 2.1.6. > > I

Re: s:checkbox inside a s:iterator and values in a Integer[]

2009-07-12 Thread Ignacio de Córdoba
f objects): > > > value="%{#selectedValues.contains(top)}" /> > > > musachy > > 2009/7/12 Ignacio de Córdoba : >> >> Hello, >> I've browsed nabble, google, ... but can't find a simple example on how >> to >> do somet

s:checkbox inside a s:iterator and values in a Integer[]

2009-07-12 Thread Ignacio de Córdoba
Hello, I've browsed nabble, google, ... but can't find a simple example on how to do something very simple. I need to iterate through, let's say, a picture category list, showing each category as a s:checkbox. The picture belongs to some of these categories (and user can changed that, or course,

emptyoption with s:select and Integer values

2009-06-21 Thread Ignacio de Córdoba
Hello, I need to use s:select with emptyoption="true" attribute. it works OK with Strings but can't make it work with Integers. As empty option generates an empty string option parameter value, Struts2 seems unable to convert it to a null value if setter method in the Action is Integer. I get: og

Re: s:text undesired behaviour - getting action properties in struts 2

2009-05-07 Thread Ignacio de Córdoba
Hello, did you manage to solve this? I don't know if it is the desired behaviour or it is a bug. It is really annoying getting the property value in place of the localized text just because they have the same name. I am in the same situation as you and don't get to find any solution. Anybody else

RE: Integer s:checkbox sends "false" value to action setter

2009-05-05 Thread Ignacio de Córdoba
in S1 you had to reset all > your checkboxes in code in order to get unchecked values that were > previously checked when the page loaded. > > Furthermore, there are struts 2 books out there that explain how this > could work. Did you try this: > > > -1 > >

Re: Integer s:checkbox sends "false" value to action setter

2009-05-05 Thread Ignacio de Córdoba
Hi, I've seen this has not been solved or replied here. Could anybody give me any directions on how to post a JIRA issue for this? I've seen https://issues.apache.org/struts/secure/BrowseProject.jspa but can't get to the area for posting new issues/bugs. Thanks, Ignacio -- View this message in c

sx:textarea border (and label...)

2009-05-04 Thread Ignacio de Córdoba
Hi, I am using sx:textarea in several pages and the HTML visutal text editor renders and works ok. I'd just like to make it have a simple border, like every input type text or type textarea has. I'd like to do this directly and avoid enclosing sx:textarea in some type of to make it look have a re

How to define a String array in FreeMarker

2009-04-24 Thread Ignacio de Córdoba
Hi there, i am using FreeMarker to generate HTML content for mails in my application (not for the web presentation; I use JSP for that). I so use FreeMarker directly, not integrated to struts. My problem is localizing messages with parameters. I am invoking the freemaker template passing the acti

Re: EJB3 plugin struts2

2009-04-14 Thread Ignacio de Córdoba
the ejb2 jndi method, works and no contradiction (or > not?) > > 2009/4/14 Ignacio de Córdoba : >> >> Hi there...just google "struts2 ejb3 plugin" >> >> In the 2 first links you'll find the plugin and the doc page about it. I >> personally use a

Re: EJB3 plugin struts2

2009-04-14 Thread Ignacio de Córdoba
Hi there...just google "struts2 ejb3 plugin" In the 2 first links you'll find the plugin and the doc page about it. I personally use a the JBoss plugin, which includes a cache. I've extended it to do lookups annotated on parent classes. Try which ever fits you and write here abut any concrete pr

RE: Removing the align="right" from tag

2009-04-14 Thread Ignacio de Córdoba
Hi again, I have successfully extended css_xhtml theme but I am having a problem form sx:submit. I specify struts.ui.theme=servengine in struts.properties and the new theme works OK (servengine y the name of my new theme) My problem is... sx:submit still uses ajax theme (I had to replace submit:f

Re: Removing the align="right" from tag

2009-04-14 Thread Ignacio de Córdoba
Hi there, Maybe this helps someone else... I just solved my problem by unpacking struts2-core-2.1.6.jar and placing submit.ftl file in webapp dir /WEB-INF/classes/template/... commenting the following: <#--if parameters.align??> align="${parameters.align?html}"<#t/> (Lines 20->30) I noted

Re: Removing the align="right" from tag

2009-04-14 Thread Ignacio de Córdoba
x27;m sure I'll take me a lot of time. I'll try anyway but also post here any solutions I've found. Thanks, Ignacio newton.dave wrote: > > Ignacio de Córdoba wrote: >> Thanks Dave, >> I did that (myClass) but the class is only added to the tag, >> not >

Re: Removing the align="right" from tag

2009-04-14 Thread Ignacio de Córdoba
Thanks Dave, I did that (myClass) but the class is only added to the tag, not to the div enclosing it, which is the one that has that magnificent align parameter. I'm on my way extending css_xhtml them to try to solve this. I'll post about it here... newton.dave wrote: > > > > Or you could a

Re: Removing the align="right" from tag

2009-04-14 Thread Ignacio de Córdoba
.lorenz wrote: > > You can change it by using CSS! > > 2009/4/14 Ignacio de Córdoba > >> >> Hi there, >> i am using css_xhtml them and renders all form elements quite ok but it >> inserts a align="right" in the enclosing every submit button. >>

Removing the align="right" from tag

2009-04-14 Thread Ignacio de Córdoba
Hi there, i am using css_xhtml them and renders all form elements quite ok but it inserts a align="right" in the enclosing every submit button. Is there anyway to remove that right alignment? I guess all this should be a matter of css and not an alignment in the HTML code. Don't know if it is a b

Re: Struts and EJB 3

2009-04-11 Thread Ignacio de Córdoba
e library inside web-inf/lib and > put these libraries into the project? nothing else? > > thanks. > > 2009/4/10 Ignacio de Córdoba : >> >> Hi there, >> I am using struts2 and tiles2 with JBoss 4 without any problems. I use no >> other frameworks or librari

Re: Struts and EJB 3

2009-04-10 Thread Ignacio de Córdoba
Hi there, I am using struts2 and tiles2 with JBoss 4 without any problems. I use no other frameworks or libraries. I got the EJB3 extension for struts2 (which does JNDI call internally as an interceptor) and even added a new functionality (it only locates EJBs in current class but coder forgot tha

Invoking a method in the Action from a FreeMarker template

2009-04-08 Thread Ignacio de Córdoba
Hi there, I am trying to invoke a method in a struts2 action from a FreeMarker template. To do this, I "put" the action as an object named "action" and then I reference it, for example, as: <#list action.sortedFields as field> (Sorted fields is a method: getSortedFields()) this

again... dynamic s:tree

2009-03-30 Thread Ignacio de Córdoba
Hi there, I am trying to build a dynamic tree in my application. I used to do it with struts1, tags and making it recurse by including a JSP file recursively. I don't find the tags in struts2 and after searching nabble it seems that s:tree tag is not finished to be able to obtain a dynamic tree

Making labelposition="left" default

2009-03-29 Thread Ignacio de Córdoba
Hi there, I asked this some time ago but after doing, again, some search here and googling I still need find a way to make my forms s:textfield have a default labelposition="left" attribute. I am using css_html theme... I have done a find/replace to make all my s:textfield have that property in

sx:textarea and label

2009-03-16 Thread Ignacio de Córdoba
Hi there, I have just replaced s:textarea with sx:textarea to get the HTML editor. It works OK but now I don't see the "labels" for these textarea fields: ¿Anybody knows if that is the suppoused behaviour and I must add tags my self? thanks, Ignacio -- View this message in context: http://w

Re: OGNL problem in s:checkbox

2009-03-09 Thread Ignacio de Córdoba
Hi, I fond the answer to my problem. Maybe it helps anyone here... if "service" is the var from a s:iterator doing %{serviceNames.contains(service)} will not work but %{serviceNames.contains(#attr.service)} will work. I don't know how. Must be related of how objects are set into OGNL valueSt

OGNL problem in s:checkbox

2009-03-08 Thread Ignacio de Córdoba
Hi there, I am trying to activate some checkboxes if a certain condition is matched: service is a String var which contains my site service names. I get it iterating over a collection. checkbox should be checked when serviceNames contains the String in "service" var. It works OK if I replace "

Re: Struts and EJB 3

2009-03-06 Thread Ignacio de Córdoba
Hi, I'm us¡ng JBoss and @EJB doesn't work either. Are you using Struts1 or Struts2? If Struts2, You can use the extension for EJB3 for Struts2. It works OK (interceptor). senderj wrote: > > My env is Netbean with Glassfish. I am able to create a servlet to call > EJB with this code: > > public

Re: FreeMarker error when trying to use AJAX Theme

2009-02-26 Thread Ignacio de Córdoba
) thanks, Ignacio mitch.gorman wrote: > > Ignacio de Córdoba wrote: >> I see actionerror.ftl exists for simple theme but not for ajax theme. Any >> workarrounds? >> > i don't have a solution to your actual problem, but the issue you > note in the sentence ab

Integer s:checkbox sends "false" value to action setter

2009-02-25 Thread Ignacio de Córdoba
Hi there, I am trying to start using struts2 checkboxes via s:checkbox tag: This renders: I was getting an error which sais String setter was required, and not a Integer setter. I didn't understand why as values where ints but now I've changed setter in the action to: public void setRemoveE

Re: FreeMarker error when trying to use AJAX Theme

2009-02-24 Thread Ignacio de Córdoba
I've been doing some changes but now I'm still getting an error related to the ajax theme... I see actionerror.ftl exists for simple theme but not for ajax theme. Any workarrounds? Thanks for any help 2009-02-24 12:06:37,299 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[local.atla

FreeMarker error when trying to use AJAX Theme

2009-02-24 Thread Ignacio de Córdoba
Hi there, i am trying to use AJAX theme to use sx:datetimepicker tag but whether or not I use that tag I am getting the following error only by adding the ajax header: I thought it was caused by the date picker, but it happens on every page (I use Tiles2 with struts2.1) Thanks for any help/dir

DateTimePicker FreeMarker template error!

2009-02-23 Thread Ignacio de Córdoba
Hi there, I am trying to use DateTimePicker with struts 2.1.2 I get the following error: ¿Any ideas? ¡Thanks! Expression parameters.pushId is undefined on line 24, column 6 in template/ajax/a-close.ftl. The problematic instruction: -- ==> if parameters.pushId [on line 24, column 1 in temp

Simplets way to make default labelposition=left on css_html theme

2009-02-20 Thread Ignacio de Córdoba
Hi there, after doing some search here and googling I still need some directions on the simplest way to make my forms s:textfield have a default labelposition="left" attribute. I am using css_html theme... ¿do I need to extend it? thanks, Ignacio -- View this message in context: http://www.nabb

How to get request method from OGN using s:if

2009-02-17 Thread Ignacio de Córdoba
Hi there, I need to know the method of current request from the page using OGNL. I used to do: ¿Can I access the request object, not just request parameters, from OGNL to do this test? is not working thanks, Ignacio -- View this message in context: http://www.nabble.com/How-to-get-request-

Re: How to render a JSP/Struts2 action to send it (mail, ...)

2009-02-12 Thread Ignacio de Córdoba
on. > > musachy > > On Thu, Feb 12, 2009 at 2:19 PM, Ignacio de Córdoba > wrote: >> >> hi again, >> thanks for your reply. I've never used FreeMaker or Velocity. I use >> Tiles2... can you figure out if your solution can be solved with Tiles2. >&g

Re: How to render a JSP/Struts2 action to send it (mail, ...)

2009-02-12 Thread Ignacio de Córdoba
cfg.getTemplate(template); > temp.process(values, writer); > writer.flush(); > } > > //also JSP has not way to deal with empty spaces and such > > musachy > > On Thu, Feb 12, 2009 at 1:49 PM, Ignacio de Córdoba > wrote: >> >> Hi there, >> I had a

How to render a JSP/Struts2 action to send it (mail, ...)

2009-02-12 Thread Ignacio de Córdoba
Hi there, I had a working solution that was fine for struts1 and doesn't work with struts2. The scenario is evey time the application needs to send a mail from an action (for example, when a user signs up, the system sends him a welcome mail) My solution got the JSP the following way: pu

Re: Text link to submit a form ¿struts2 way?

2009-02-11 Thread Ignacio de Córdoba
Are you really sure that s:a generates a tag that submits the form??? I just get a regular link pointing to a regular URL, no form or form data anywhere. By the way, formId property is not a property for s:a tag, at least not in docs and TagLibDocs. mitch.gorman wrote: > > mitch gorman wrote:

Indexed properties in forms

2009-02-10 Thread Ignacio de Córdoba
Hi there, I am trying to migrate a form population module from struts1 to struts2 and I am not sure if struts2 supports indexed/mapped value properties. After reading OGNL docs I see that indexed properties are supported both with ints and objects. I guess they refer just to "red" de properties,

Re: Text link to submit a form ¿struts2 way?

2009-02-10 Thread Ignacio de Córdoba
e. thanks, Ignacio Jack Qu wrote: > > In that way ,there has no way to do it excluding from javascript > ------ > From: "Ignacio de Córdoba" > Sent: Tuesday, February 10, 2009 9:29 PM > To: > Subject: Re: Text link

Re: Text link to submit a form ¿struts2 way?

2009-02-10 Thread Ignacio de Córdoba
I love submit buttons but in this design I must use text as submit buttons. Buttons were to big for the graphic designer to fit them. Jack Qu wrote: > > Can submit button meet your request! > > -- > From: "Ignacio de Córd

How to generate a URL with s:url encoded in UTF-8

2009-02-09 Thread Ignacio de Córdoba
Hi there, I am trying to generate a URL with s:url and s:param so that parameters are encoded in URL. Special characters are not processed ok. (The struts action works fine as I have posted that same URL data with a form encoded in UTF-8 and they are decoded fine in my java code) I've tried doing

Text link to submit a form ¿struts2 way?

2009-02-08 Thread Ignacio de Córdoba
Hi there, I just wonder if there is any proposed way or struts2 tag to generate a text link that submits a form. I've checked s:a and sx:a tags and can't find any info. I'd like to avoid using javascript directly if possible (even though I've been doing it in the past with struts1) Thanks for any

Re: s:iterator ¿begin -> end?

2009-02-05 Thread Ignacio de Córdoba
We have it standard in spanish keyboards close to the downside up one :-) Wes Wannemacher wrote: > > On Wednesday 04 February 2009 23:05:06 Martin Gainty wrote: >> Dave and Crew >> >> Where is the upside down question-mark key??? >> > > It's ALT-F4 > > :) > > -Wes > > -- > > Wes Wannemach

Re: s:iterator ¿begin -> end?

2009-02-04 Thread Ignacio de Córdoba
nd knowledge to help on all this. Now I just can't. newton.dave wrote: > > Ignacio de Córdoba wrote: >> Hi there, >> I've checked struts2 docs and this forum and have found no inside syntax >> for >> s:iterator tag to do: >> >> >> Examples i

Is possible to set encoding="false" as default?

2009-02-04 Thread Ignacio de Córdoba
Hi there, I am having a problem with encoding and (and other tags). As default it encodes non ASCII chars and I get: categoría y tecnología where I should get accented chars: categoría y tecnología I've seen adding encoding="false" to the s:property tag solves this. Can I configure this behav

s:iterator ¿begin -> end?

2009-02-04 Thread Ignacio de Córdoba
Hi there, I've checked struts2 docs and this forum and have found no inside syntax for s:iterator tag to do: Examples in docs just show how to count from 1 to 5 ¿? I'd like to avoid counting and using indexed property to access an iterator. The last example in docs doesnt seem to work if I repla

Re: How to change locale inside an Action method

2009-02-01 Thread Ignacio de Córdoba
Great attitude yours :-) I'll explain my (simplified) case... I am migrating a struts1 content manager to struts2; maybe I still stick to struts1 concepts but... imagine there are several articles in the users screen. They might be written in different languages; an article language is set in a p

Re: How to change locale inside an Action method

2009-02-01 Thread Ignacio de Córdoba
OK. Thanks again... after reading some other docs I'll be doing: ActionContext.getContext().setLocale(locale); session.put(com.opensymphony.xwork2.interceptor.I18nInterceptor.DEFAULT_SESSION_ATTRIBUTE,locale); session.put(Config.FMT_LOCALE, locale); //Also for JSTL, not only Struts. sessio

Re: How to change locale inside an Action method

2009-02-01 Thread Ignacio de Córdoba
Thanks for your reply, I had read the i18n docs you refer but still find no info about changing the session locale inside an Action. Anyway, after reading the source of the Interceptor, I understand that doing: session.put(i18nInterceptor.DEFAULT_SESSION_ATTRIBUTE,myNewLocale); in my Action shou

How to change locale inside an Action method

2009-02-01 Thread Ignacio de Córdoba
Hi there, I've been searching through struts2 docs and old threads here but I've found no way of changing current locale from inside an action. I know I can pass a parameter in the request, and maybe other ways to change it... but I am looking for a method that allows me to change current locale f

Re: Best global parameter aproach for struts2

2009-01-28 Thread Ignacio de Córdoba
Oh yes, I have no problem with EJB3 init parameters. The only thing I am really missing is where to put struts2 actions init paramers. -- View this message in context: http://www.nabble.com/Best-global-parameter-aproach-for-struts2-tp21698744p21702585.html Sent from the Struts - User mailing lis

Re: Best global parameter aproach for struts2

2009-01-27 Thread Ignacio de Córdoba
Thanks for your reply, I have lots of code developed for struts1+tiles+EJB3 (Jboss). I am migrating struts-tiles to struts2 + tiles2. I have too much EJB3 code and I don't have a clear picture of where I can fit Spring there. I have so much time to invest just to move to struts2... and absolutely

Best global parameter aproach for struts2

2009-01-27 Thread Ignacio de Córdoba
Hi there, after starting some serious migration from struts to struts2 I am wondering is there is any "best practices" for global application parameters. I used to store this parameters in web.xml, but as struts2 finds important not to be tied to the "http" thing (I read it very often in docs... a

Struts2 + Guice JNDI names as a parameter

2009-01-27 Thread Ignacio de Córdoba
Hi there, I am trying to use Guice to take care of the injection of Local Stateless Session Beans (I use Jboss 4). My problem is that all solutions I've found using guice involve hard coding the application ear name. (JBoss sets JNDI of EJBs depending on the ear file name). I've read Struts2 Guice

Re: Injecting in Interceptors

2009-01-20 Thread Ignacio de Córdoba
lazy load aproach seems the best for the moment. Lukasz Lenart wrote: > > 2009/1/20 Ignacio de Córdoba : >> Anybody has an idea on how can I get info about ServletContext in the >> init() >> method of an interceptor? I'd like to lookup EJBs there and not lookup >

Re: Injecting in Interceptors

2009-01-20 Thread Ignacio de Córdoba
newton.dave wrote: > > Ignacio de Córdoba wrote: >> Hi Musachy and thanks for your reply but that static invocation in that >> class >> is not working if called from an interceptor or, at least, from the >> init() >> method of the interceptor. > > You d

Re: Injecting in Interceptors

2009-01-20 Thread Ignacio de Córdoba
ther ideas? :-) Thanks, Ignacio Musachy Barroso wrote: > > org.apache.struts2.ServletActionContext.getServletContext() is what you > want. > > musachy > > On Tue, Jan 20, 2009 at 3:03 PM, Ignacio de Córdoba > wrote: >> >> Hi there, >> I am developi

Injecting in Interceptors

2009-01-20 Thread Ignacio de Córdoba
Hi there, I am developing a Authorization interceptor and need to perform a JNDI lookup to get some Stateless EJBs from JBoss. My problem is that this interceptor init() method gets no parameters. I need to get at least the ServletContext of the web application to specify the main JNDI lookup nam

Accesing Cookies from a custom interceptor

2009-01-20 Thread Ignacio de Córdoba
Hi there, I am writing a custom authentication and authorization interceptor and need access to cookies. I've checked in Struts2 and other docs both ways of getting access to cookies. I can't use CookieInterceptor or CookiesAware interface as I need cookies in the interceptor, not in an action, s

Loosing content type encoding in bean:include

2008-05-10 Thread Ignacio de Córdoba
Hi there, I am having a problem when trying to include a page using bean:include. I loose the encoding even the included page has the right <@page encoding ...> attributes. Is this a bug or I am doing something wrong? I am using struts 1.3 I've tried to use othre include options, but is the one t