Re: About StrutsTypeConverter

2011-07-03 Thread Vincent Lin
into this method? Best Regards, Vincent Lin 2011/7/3 Łukasz Lenart : > Take a look on EnumTypeConverter > > > Regards > -- > Łukasz > + 48 606 323 122 http://www.lenart.org.pl/ > Warszawa JUG conference - Confitura http://confitura.pl/ > > > 2011/7/2 Vincent Lin :

About StrutsTypeConverter

2011-07-02 Thread Vincent Lin
Hi! I have a questsion about StrutsTypeConverter. It has 2 methods to be implemented: public Object convertFromString(Map context, String[] values, Class toClass) and public String convertToString(Map context, Object o) . Why the second parameter in convertFromString String[] instead of String?

Re: Struts 2.2.3 i18n properties not reloaded after redeployed

2011-06-20 Thread Vincent Lin
3:14 PM, Steven Yang wrote: > i am not sure if there was any bug fix regarding i18n reload. > but can you describe how you "redeploy" your app? > do shutoff your server then deploy then start? > or do you just deploy without turning off anything? > > On Mon, Jun 20, 2

Struts 2.2.3 i18n properties not reloaded after redeployed

2011-06-19 Thread Vincent Lin
properties will be reloaded after the web app is redeployed with struts.i18n.reload=false. Can we set any configuration to let i18n properties reloaded in 2.2.3 without setting struts.i18n.reload=true? It seems to hurt performance a lot. Thanks! Vincent Lin

Re: Error Throwing With Struts 2 Tags

2009-01-09 Thread Vincent Lin
It's really an annoying issue of struts2. It took me long time to troubleshoot this kind of problem. One time I came across "NoClassDefFoundError". It was swallowed by xwork. I wouldn't know it if I'd not used eclipse debbuger to step in the code. I wonder why this simple issue is not fixed in st

OGNL exceptions are swallowed by struts2

2009-01-09 Thread Vincent Lin
Hi, Is there anyway to get better error message there's an error occurring in ognl? Everytime there's an exception in ognl it's swallowed. And I ran into some "No Result Found for XxxAction" error. It's extremely hard to debug, because there's no any useful information in it. All of them seem

[s2]Runtime exception in a bean setter

2007-11-22 Thread Vincent Lin
ff in struts.properties or struts.xml? Thanks! Vincent Lin

Re: [S2] Preselected option in tag

2007-07-25 Thread Vincent Lin
I just checked jira and found this: https://issues.apache.org/struts/browse/WW-1711 It's a bug and has been fixed in 2.0.7. I migrated my struts library to 2.0.9 and the problem was gone. Thanks. On 7/26/07, Vincent Lin <[EMAIL PROTECTED]> wrote: The generated html con

Re: [S2] Preselected option in tag

2007-07-25 Thread Vincent Lin
a JIRA issue would be a good idea :-) L. Vincent Lin wrote: > But I already specified name="adminGroupMapData.adminRid" in the tag. > Shouldn't the preselected option be the value of > "adminGroupMapData.adminRid > "? > If the preselected option won't

Re: [S2] Preselected option in tag

2007-07-25 Thread Vincent Lin
e is less than 1000? On 7/26/07, yitzle <[EMAIL PROTECTED]> wrote: On 7/25/07, Vincent Lin <[EMAIL PROTECTED]> wrote: > I found some people are discussing this problem. > When the data type of the attribute is Integer, the value can't be too > large. > We can

Re: [S2] Preselected option in tag

2007-07-25 Thread Vincent Lin
I found some people are discussing this problem. When the data type of the attribute is Integer, the value can't be too large. We can use toString() to make pre-selecting work. So I changed my tag to: And it works now. Is this a bug of struts 2.0.6??? On 7/25/07, Vincent Lin &l

[S2] Preselected option in tag

2007-07-25 Thread Vincent Lin
. But when the value is greater than 1000, it doesn't work. Why? Is there any way to solve this problem? Thanks, Vincent Lin

Re: [S2] Chinese encoding problem

2007-06-27 Thread Vincent Lin
er affect the character encoding in HttpServletRequest? On 6/27/07, Christopher Schultz <[EMAIL PROTECTED]> wrote: Vincent, Vincent Lin wrote: > I use POST in my form. :( You mentioned that MSIE seems to fail, while Mozilla Firefox works. Is this behavior consistent? Does ff always work?

Re: [S2] Chinese encoding problem

2007-06-27 Thread Vincent Lin
I use POST in my form. On 6/27/07, Christopher Schultz <[EMAIL PROTECTED]> wrote: Vincent, Vincent Lin wrote: > I'm having problem to submit Chinese characters from browser to web server. GET, POST, or both? If it's only failing for GET, check to make sure that your

Re: [S2] Chinese encoding problem

2007-06-27 Thread Vincent Lin
debug mode Emilia -Original Message- From: Vincent Lin [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 27, 2007 1:30 PM To: Struts Users Mailing List Subject: Re: [S2] Chinese encoding problem Emilia, I've tried -Dclient.encoding.override=UTF-8, it doesn't seem to change a

Re: [S2] Chinese encoding problem

2007-06-27 Thread Vincent Lin
n google client.encoding.override and you will find more) Emilia -----Original Message- From: Vincent Lin [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 27, 2007 12:56 PM To: Struts Users Mailing List Subject: Re: [S2] Chinese encoding problem By the way the settings in my JSP: <%

Re: [S2] Chinese encoding problem

2007-06-27 Thread Vincent Lin
By the way the settings in my JSP: <%@ page contentType="text/html; charset=UTF-8" %> Did I miss anything else? On 6/27/07, Vincent Lin <[EMAIL PROTECTED]> wrote: Hi I'm having problem to submit Chinese characters from browser to web server. I have

[S2] Chinese encoding problem

2007-06-27 Thread Vincent Lin
Hi I'm having problem to submit Chinese characters from browser to web server. I have the following settings in struts.properties: struts.locale=zh_TW struts.i18n.encoding=UT8 But when I submit Chinese characters to web server. It gets scrambled characters. (The wierd thing is that sometimes

Re: [S2] onsubmit in tag

2007-06-26 Thread Vincent Lin
Hi Dave, Thank you. You are right. There is an error in my validateFields() function. It works now. The "return true" in onsubmit has nothing to do with my problem. Vincent On 6/26/07, Dave Newton <[EMAIL PROTECTED]> wrote: --- Vincent Lin <[EMAIL PROTECTED]> wrote

Re: [S2] onsubmit in tag

2007-06-26 Thread Vincent Lin
ions are passed. Return false when there is something wrong in your input. On 6/26/07, Dave Newton <[EMAIL PROTECTED]> wrote: --- Vincent Lin <[EMAIL PROTECTED]> wrote: > For example, onsubmit="return (validateFields())" is > specified in html tag. If the javascript &

Re: [S2] How do I create a client side validator?

2007-06-26 Thread Vincent Lin
]> wrote: --- Vincent Lin <[EMAIL PROTECTED]> wrote: > Is there any document talking about how to create a > client side validator in struts2? Yes, it's one of the links under the "validation" section on the wiki. http://struts.apache.org/2.x/docs/validation.html ht

Re: [S2] onsubmit in tag

2007-06-26 Thread Vincent Lin
uts2 always add 'return true' in onsubmit event. That causes validateFields() useless. On 6/26/07, yitzle <[EMAIL PROTECTED]> wrote: Um... Firstly, it does the same thing. I think if you move the code to the submit button it renders it as expected. On 6/26/07, Dave Newton <[EMAI

[S2] How do I create a client side validator?

2007-06-26 Thread Vincent Lin
Is there any document talking about how to create a client side validator in struts2? Thanks!

[S2] onsubmit in tag

2007-06-26 Thread Vincent Lin
Hi! I wrote in my JSP, but struts 2 rendered the following html: Why it renders onsubmit="return (validateFields()); return true;" instead of onsubmit="return (validateFields())" ? Can I make renders onsubmit="return (validateFields())" only? Thanks!

[S2] datetimepicker reset value to 00:00 when type="time" after submitting page

2007-06-10 Thread Vincent Lin
I have a datetimepicker in my JSP to let user select time: When user select 10:15 and submit to webserver, after the web page refreshes the value becomes 00:00. Is this another datetimepicker bug? I have a type converter for converting time the format string is "HH:mm": public class TimeConve

Re: FormFile: Catching IllegalArgumentException

2007-06-08 Thread Vincent Lin
Do you have this setting in your form? enctype="multipart/form-data" On 6/8/07, Eric Jain <[EMAIL PROTECTED]> wrote: I have a form with a FormFile field, which works great, except that when someone submits a plain string for this field (e.g. a spammer crawling the site and doing random submiss

Re: [s2] How to get the value of dojo datetimepicker object

2007-06-07 Thread Vincent Lin
t long ago on this list. Basically you have to use > "getDate()" to get a JavaScript date object and getValue() to get the text > entered in the datepicker. > > musachy > > On 6/7/07, Vincent Lin <[EMAIL PROTECTED]> wrote: > > > > I am trying to get the val

[s2] How to get the value of dojo datetimepicker object

2007-06-07 Thread Vincent Lin
I am trying to get the value inputed by the user from datetimepicker object. I have the following javascript in my JSP: var obj = dojo.widget.byId("createTimeTm"); alert(obj); alert(obj.getValue()); But "alert(obj.getValue())" encounter a javsacript error. Can anyone tell m

Re: datetimepicker & S2 validation

2007-06-06 Thread Vincent Lin
Is struts 2.1 available for downloading? I only find struts 2.0.6 in apache website. On 6/7/07, Musachy Barroso <[EMAIL PROTECTED]> wrote: sorry. 2.1 is the one. musachy On 6/6/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > It is getting to the action! Can you tell me if a new version

Re: [S2] issues

2007-06-06 Thread Vincent Lin
What is the data type of autoridade.orgao.codObjeto and autoridade.cargo.codObjeto? On 6/7/07, Rafael Dittberner <[EMAIL PROTECTED]> wrote: This is my code: Someone please explain to me why in the first one i had to use toString() to make it work, but the second one works perfectly as is?

Re: cannot reset dynavalidatorform in struts 1.2.9

2007-06-06 Thread Vincent Lin
Could you check the generated HTML code? (Use the view source function of your browser) If the html of the field has value="x", the reset button won't clear it. It just reset the value to original value. Did you set the properties to your DynaActionForm? Or the form has default values? On 6/

Re: display current date in header

2007-06-06 Thread Vincent Lin
You can write a base action and have every action extends it. And do this in your execute() method: Calendar cal = Calendar.getInstance(); Date currDate = cal.getTime(); SimpleDateFormat df = new SimpleDateFormat("dd.MM."); String showDate = df.format(currDate); request.setAttribute("showDat

[S2] Is Action thread-safe in struts 2?

2007-06-06 Thread Vincent Lin
Hi I am a newbie in struts2. I have a fundamental question abut s2. We all know that a Servlet is not a thread-safe object unless it implements SingleThreadModel. Is Action in s2 thread-safe or not? Container will create a new Action instance for each new request? Thanks!

[s2] Is there a tag similar to in s1

2007-06-06 Thread Vincent Lin
Hi! Is there a tag in struts 2 which has similar function to in struts1 ? Thanks.

Quetsions about tag

2007-06-05 Thread Vincent Lin
Hi, I've tried tag in my JSP. It's really a cool tag which render a date selection javascript control. But I have some quetsions about this tag: 1. Can I select date and time simultaneously in one datepicker control? Currently I map a date property in action to 2 separate datepicker in JSP: one

[S2] map to boolean property not checked

2007-06-05 Thread Vincent Lin
I have a java bean serviceData with a Boolean property autoActivate in my action. And I wrote a tag in my JSP: But the default radio button is not checked in my page. (While autoActivate is true the radio button of 'true' should be checked, but it isn't.) It works when I map to java 1.5 enum

[S2] How do I disable tags generated by ?

2007-06-05 Thread Vincent Lin
Hi! I've done several projects with struts1 and planned to use struts2 in my new project. I am amazed the the code is so concise in struts2. But I have quetsion about the tag. When I use and , the , and tags are generated in html page. Can I disable this feature? Because it might interfere