Re: Create a struts ajax anchor using javascript

2009-09-14 Thread Christian Javellana
I just avoided the use of JSON, and use the s:url / and s:div / approach instead. Not what i have originally planned but works as well. Thanks everyone. Paweł Wielgus wrote: Hi Christian, can't You update a div or a form or a table with parsed contents of a json from ajax call. Or even

Re: Warning message when setting BigDecimal to list of bean

2009-09-14 Thread Steven Yang
Hi I just added my custom BigDecimal converter and it worked. I guess because I took care of it. But isn't it suppose to be taken care of by OGNL or Xwork? because if I don't do it in a List, but as an direct Action property instead, there wont be any warning message. Thanks On Mon, Sep 14, 2009

Re: Struts 2 dojo jsonrpc SMD problem

2009-09-14 Thread Rafael Taboada
package name=sigedgrid extends=struts-default,json-default action name=SMDAction class=dojoAction interceptor-ref name=json param name=enableSMDtrue/param param name=excludeNullPropertiestrue/param /interceptor-ref result type=json

Re: Warning message when setting BigDecimal to list of bean

2009-09-14 Thread dusty
Its not a huge deal, since the issue is What do I convert a blank to? You don't want it to be zero, and it ends up being null, but the type converter throws that error as it tries to figure out what to do. I would say a patch to just return null on blanks for the native type converters would be

calling Struts2 XML validation manually on arbitrary bean

2009-09-14 Thread michele mazza
hi I have a fairly complex set of xml validation rules for a large form, which is working fine. I now have to load from db a bean with the same data and validate it before displaying a page (the data comes from a different source and could be incomplete). is it possible to call the same logic

Struts 1 - Initialization versus validation

2009-09-14 Thread Kevin Hale Boyes
I have a setup action defined: action path=/setup type=package.SetupAction name=MyForm validate=false forward name=success path=/path/Form.jsp / /action This action is responsible for setting up values in my (dyna) form before getting to the JSP page. I have a second action

Re: Struts 1 - Initialization versus validation

2009-09-14 Thread Paweł Wielgus
Hi Kevin, as far as i know form.reset(...) should be used to reset form fields, one good example is checkbox field that needs to be reseted. I don't know if using reset method in order to initialize objects in form. Can You do it with some kind of initialize/prepare method in SetupAction or

Re: Struts 1 - Initialization versus validation

2009-09-14 Thread Kevin Hale Boyes
Yes, I'm using form.reset() to initialize my fields but the problem is I don't want to initialize the fields if I'm coming into the SetupAction because of a validation error. I've worked around it for now by looking checking ActionErrors errors = (ActionErrors)

Re: [S2] i18n for lists/maps

2009-09-14 Thread Zoran Avtarovski
Exactly. Using the s:select for your example below would be as follows: s:select name=²loanType² list=²#{1:getText(key.value1), 2, getText(key.value2)}²/ Z. Z, I'll clarify with a simple example : The dropdown must be like : select name=loanTypeoption value=1EnglishType1/optionoption

Re: Warning message when setting BigDecimal to list of bean

2009-09-14 Thread Steven Yang
yeah i understand just thought it would be something that would be supported natively thats all just that you know when things go into production, some ppl are just afraid to see anything on the log file and whine a lot about it. i guess i will fix it myself or can you point me to the right

OGNL Iterator/Array Expression Question

2009-09-14 Thread ets04uga
I have the following code: s:property value=periodModel.weeks.iterator.{? true }[0].startDate/ based on example code provided in the OGNL guide to get the startDate from the first object in a returned array from the iterator. I would like to make the 0 dynamic based on the 'wno' property so

sx:submit and s:file don't work together

2009-09-14 Thread Ignacio Enriquez
Hi. This is a extrange behavior when using the file tag s:submit works but sx:submit does not. Actually sx:submit does nothing. does not even return error. nothing happens.(the button is pressed but nothing happens) Why the following does not work? (the code is short ) s:form method=post

Re: OGNL Iterator/Array Expression Question

2009-09-14 Thread Dale Newfield
Aren't these two identical by definition: %{periodModel.weeks.iterator.{? true }[0].startDate} %{periodModel.weeks[0].startDate} based on example code provided in the OGNL guide to get the startDate from the first object in a returned array from the iterator. weeks is a collection of some