Double conversion

2009-10-13 Thread Eduard Neuwirt
Hello all, so I am still facing the problem with Double conversion ins Struts. So I am trying to describe the situation: 1. double will be converted without consideration of localization, i.e. input and display form are using dot-notification. 2. Double will be convvrted with partial considera

get URL

2009-10-13 Thread Kurniawan Kuga
hi all how to get the url, with ServletActionContext, ex: hhttp: / / localhost: 8080/projectname/module/comment/create.action? idContent = 1 because I will share to facebook share -- Kurniawan Meruvian BlueOxygen Workspace Developer One Stop Java and Enterprise OSS Provider Technopreneurship, Tr

Re: Portlet form action parameters doubles the namespace of actions

2009-10-13 Thread Nils-Helge Garli Hegvik
I noticed your bug report in JIRA and will be looking into it. As for debugging, check out the setup in the sample portlet application. I use it to run portlets embedded in pluto directly in Eclipse. Makes debugging real easy. Nils-H On Fri, Oct 9, 2009 at 10:35 AM, Leonard Broman wrote: > I rec

Re: iterator and radio struts2

2009-10-13 Thread Odelya YomTov
hi! the problem was that i didn't have a get method for id and content. Now my question is: when i run the page, the source code writes the radio buttons like this: what i need it to save the answer for each question. how can i do it? what variable do i have to declare in the action class and h

RE: iterator and radio struts2

2009-10-13 Thread Lee Clemens
It looks like you may be able to nest tags to achieve this. --Lee -Original Message- From: Odelya YomTov [mailto:ode...@jpost.com] Sent: Tuesday, October 13, 2009 6:09 PM To: 'Struts Users Mailing List' Subject: iterator and radio struts2 Hi! I ha

iterator and radio struts2

2009-10-13 Thread Odelya YomTov
Hi! I have the following class: public class Question implements Serializable { private Integer id; private String content; private String type; private List answers = new ArrayList(); . } And class answer: public class Answer implements Serializable{ private Integer

Unit Testing in Struts 2.1.6

2009-10-13 Thread Dan R. Olsen III
I have gone to the page found at http://struts.apache.org/2.1.6/docs/how-can-we-test-actions.html. However, the code on that page is not possible with Struts 2.1.6 although it is found in the docs for Struts 2.1.6. How can we get this page updated to show how to test actions in Struts 2.1.6 so

Re: How to get value of tag attribute from OGNL?

2009-10-13 Thread Alex Siman
Cool, welcome back, JSTL-EL! DNewfield wrote: > > Alex Siman wrote: I switched off the JSTL-EL (as it was recomended in Struts2 wiki) >>> Can you please point me to that? Seems quite strange to me... > > Since we've removed the possibility of including JSTL-EL expressions in > struts tag

Re: How to get value of tag attribute from OGNL?

2009-10-13 Thread Dale Newfield
Alex Siman wrote: I switched off the JSTL-EL (as it was recomended in Struts2 wiki) Can you please point me to that? Seems quite strange to me... Since we've removed the possibility of including JSTL-EL expressions in struts tag attributes, this advice is no longer appropriate. If that's t

Re: How to get value of tag attribute from OGNL?

2009-10-13 Thread Musachy Barroso
that's only a problem for defining maps in ognl, which used the "#{a:b}" syntax, which made the jstl el complain. The solution is just to use the alternative map syntax: #...@java.util.linkedhashmap@{ "foo" : "foo value", "bar" : "bar value" } http://www.opensymphony.com/ognl/html/LanguageGuide/c

Re: How to get value of tag attribute from OGNL?

2009-10-13 Thread Dale Newfield
Alex Siman wrote: I switched off the JSTL-EL (as it was recomended in Struts2 wiki) Can you please point me to that? Seems quite strange to me... Read the section "JSP 2.1" here: http://struts.apache.org/2.1.8/docs/ognl.html That was added by Ted Husted on 3/23/2007. What are the problems

Re: How to get value of tag attribute from OGNL?

2009-10-13 Thread Musachy Barroso
trust me, that is nothing compared to what I have seen in scriptlets. That expression could be broken down into an "if" block, even the original is not that hard to read. Assuming you don't put any business logic in scriplets, which is evil by definition (an axiom I guess), pages containing scriptl

Re: Changing the border color of a text field

2009-10-13 Thread Alex Siman
I am confused about what getter are you using for String[] zipCode = new zipCode[10]; Is it 'getZipCode' or 'getZipCodeList'? If 'getZipCodeList' then try this one: ... ... james billa wrote: > > Alex, It is a great idea. But still I haven't got it working. > "value="%{fieldErro

Re: How to get value of tag attribute from OGNL?

2009-10-13 Thread Alex Siman
Why are scriptlets an evil? Is it relates to an architectural aspect that View (JSP) must contain no business logic? Or something else? BTW sometimes OGNL also contains little complex code. What about this one: It is not so kind to deal w/ code like that((. But what to do? Add one more

Re: How to get value of tag attribute from OGNL?

2009-10-13 Thread Alex Siman
>> I switched off the JSTL-EL (as it was recomended in Struts2 wiki) > > Can you please point me to that? Seems quite strange to me... Read the section "JSP 2.1" here: http://struts.apache.org/2.1.8/docs/ognl.html > "The answer is easier if this .tag file contains no recursive calls." I think

Re: How to get value of tag attribute from OGNL?

2009-10-13 Thread Musachy Barroso
on top of that, you can use the the struts "set" tag to set stuff in any of the contexts. Scriptlets are evil. musachy On Tue, Oct 13, 2009 at 9:41 AM, Dale Newfield wrote: > Alex Siman wrote: >> >> Thanx you Dave for your advice! > > Sure, Alix. > >> I switched off the JSTL-EL (as it was recome

Re: How to get value of tag attribute from OGNL?

2009-10-13 Thread Dale Newfield
Alex Siman wrote: Thanx you Dave for your advice! Sure, Alix. I switched off the JSTL-EL (as it was recomended in Struts2 wiki) Can you please point me to that? Seems quite strange to me... so I wrote another working code: snippets of java inside your .jsp seems like a step back about

[CLOSED] Re: How to get value of tag attribute from OGNL?

2009-10-13 Thread Alex Siman
Seems like question is closed now. Thanks. Alex Siman wrote: > > Thanx you Dave for your advice! > > I switched off the JSTL-EL (as it was recomended in Struts2 wiki), so I > wrote another working code: > > <% request.setAttribute("jspContext", jspContext); %> > > > > And anot

Re: How to get value of tag attribute from OGNL?

2009-10-13 Thread Alex Siman
Thanx you Dave for your advice! I switched off the JSTL-EL (as it was recomended in Struts2 wiki), so I wrote another working code: <% request.setAttribute("jspContext", jspContext); %> And another more complex variant: -- <%

Re: Changing the border color of a text field

2009-10-13 Thread james billa
Alex, It is a great idea. But still I haven't got it working. "value="%{fieldErrors['zipCode[ > > ' + > #rowstatus.index + ']']}"/>" - always evaluates to null. Can you think of > any reason why it could be so? > On Mon, Oct 12, 2009 at 3:50 PM, Alex Siman wrote: > > Try to add next code: > >

Re: Changing the border color of a text field

2009-10-13 Thread Burton Rhodes
You could use 'addFieldError' in your action class for the zipcode field that contains the error. Then use the 'cssErrorClass' attribute in the s:textfield tag to change the display of the 'error' textfield. Each of your textfields will have to have a unique name in order to add the field error.

Passing List with Redirect

2009-10-13 Thread Timothy Orme
Hi All I'm wondering if theres a way to pass a list of values as a parameter in a redirectAction. For instance: ViewAction ${myList} ${myProperty} In this case, myList is an array list that is populated in

Re: Why is PageContext null?

2009-10-13 Thread Alex Siman
OK, let it be so. Musachy Barroso wrote: > > that should be available inside tags only, not actions..I think. > > On Tue, Oct 13, 2009 at 6:57 AM, Alex Siman > wrote: >> >> I do try to get PageContext inside action in a such way: >> >>        ServletActionContext.getPageContext(); >> >> and it

Re: Why is PageContext null?

2009-10-13 Thread Musachy Barroso
that should be available inside tags only, not actions..I think. On Tue, Oct 13, 2009 at 6:57 AM, Alex Siman wrote: > > I do try to get PageContext inside action in a such way: > >        ServletActionContext.getPageContext(); > > and it is null. Why? > -- > View this message in context: > http:

Re: Portlet form action parameters doubles the namespace of actions

2009-10-13 Thread Leonard Broman
I reconfigured the project not to use the convention plugin and using the good old xml-configuration. But the problem persists. I'll try to dig into what might be causing this. Is anyone looking actively at the portlet plugin? Can anyone give me advice on development tools for debugging portlets? T

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: How to get value of tag attribute from OGNL?

2009-10-13 Thread Dale Newfield
The answer is easier if this .tag file contains no recursive calls. The issue is that the .tag file receives attributes through jstl-el, not ognl. You can use the jstl-el c:set tag to promote that value into a namespace that's also accessible from ognl. Alex Siman wrote: /WEB-INF/tags/formFi

Why is PageContext null?

2009-10-13 Thread Alex Siman
I do try to get PageContext inside action in a such way: ServletActionContext.getPageContext(); and it is null. Why? -- View this message in context: http://www.nabble.com/Why-is-PageContext-null--tp25873385p25873385.html Sent from the Struts - User mailing list archive at Nabble.com.

RE: How to get value of tag attribute from OGNL?

2009-10-13 Thread Alex Siman
Did you mean this variant?: This code does NOT work. So the question still open. Mike Baranski-2 wrote: > > Why not use this? > http://struts.apache.org/2.1.6/docs/set.html > >>-Original Message- >>From: Alex Siman [mailto:aleksandr.si...@gmail.com] >>Sent: Tuesday, October 13, 2009

RE: How to get value of tag attribute from OGNL?

2009-10-13 Thread Mike Baranski
Why not use this? http://struts.apache.org/2.1.6/docs/set.html >-Original Message- >From: Alex Siman [mailto:aleksandr.si...@gmail.com] >Sent: Tuesday, October 13, 2009 9:25 AM >To: user@struts.apache.org >Subject: Re: How to get value of tag attribute from OGNL? > > >OK, I figured out how

Re: How to get value of tag attribute from OGNL?

2009-10-13 Thread Alex Siman
OK, I figured out how to get value of tag attribute in JSP: <%= jspContext.getAttribute("fieldName", PageContext.PAGE_SCOPE) %> Now I need to put this value into some OGNL variable, say '#ognlFieldName', to get access to this value from Struts2 tags. So, how to get access to jspContext

Re: how to add multiple addon rows in struts..urgert please

2009-10-13 Thread swathi reddy
Actuall i am strucked at design while we we want to add one more number ,he will click at add one more number then previous one need to be shouln as label and the new empty mobile no. text field should display. 2009/10/13 Mileidys González Prieto > You need to declare ur variable like an array

Re: how to add multiple addon rows in struts..urgert please

2009-10-13 Thread Mileidys González Prieto
You need to declare ur variable like an array of string, numbers... ArrayList mobiles and then in ur jsp code u just need to create differents input all of them with the same name "mobiles" dont forget the get and set for the property... De: swathi reddy Pa

Re: how to add multiple addon rows in struts..urgert please

2009-10-13 Thread swathi reddy
wrong word correct field not filed On Tue, Oct 13, 2009 at 6:20 PM, swathi reddy wrote: > Hi all > > please let me know how we can add multiple rows like he want to add > multiple Mobile numbers in the jsp page when he want to submit in struts. > > page has a filed mobile no. to enetre then besid

how to add multiple addon rows in struts..urgert please

2009-10-13 Thread swathi reddy
Hi all please let me know how we can add multiple rows like he want to add multiple Mobile numbers in the jsp page when he want to submit in struts. page has a filed mobile no. to enetre then beside add another Mobile no. and edit the No. please replay quickly... -- Thanks& Regards Swathi

Conversion problem for bi-dimensional Lists and Arrays

2009-10-13 Thread Damian
Hi all, I want to send a bidimensional List and/or a bidimensional array from my application's view to the action. For example, I have a generixMatrix object in the action (with getters and setters of course). The genericMatrix should be able to hold any kind of object. I want to set a 'Cur

Re: How to get value of tag attribute from OGNL?

2009-10-13 Thread Alex Siman
I have such custom JSP tag file: /WEB-INF/tags/formField.tag -- <%@ taglib prefix="s" uri="/struts-tags" %> <%@ tag language="java" pageEncoding="UTF-8" %> <%@ attribute name="fieldName" %> <%@ attribute name="inputId" %> <%@ attribute

Re: action class is a part of controller or model; and what about formBean

2009-10-13 Thread Gregor Marinšek
Well i would say, tha action implementation (action class) is the controller, formBean is in one way the interface between view and controller and model is implementation of some third part (f.e. hibernate)... Thats my view of the 'story'. If i'm wrong, please correct me. Gregor Arindam Rajbansh

Re: Unit Testing Actions with Annotation based validation in Struts 2.1.6

2009-10-13 Thread bloodredsun
I've figured how to do it! You need to use the container properly to populate all the fields with @Inject annotated setters. It's another reason why I don't like auto-wiring. I know it's powerful and when you're familiar with the codebase it's simple but it makes stepping through the code a night