Re: How to compare string reference variables using ognl?

2011-12-12 Thread Li Ying
In OGNL, the == test will call the equals method, so, I believe the expression #selectedOffer==#queryString should work. Read the following document: http://commons.apache.org/ognl/language-guide.html In the sector [Operators], there is a table describe all the operators. If you think the test

Re: Dynamically setting the template directory in an Action

2011-12-12 Thread Li Ying
My suggestion: You can create a file(or folder) link on your file system. From the view of your web app, it works like a file(or folder) inside the [document root directory], but the real file(or folder) is actually somewhere outside the [document root directory]. 2011/12/8 Gurcharan Singh

Re: struts2 string to map conversion

2011-12-12 Thread Li Ying
What is your client side code (JSP)? In OGNL expression, a value assignment is something like: aMap[aKey] = aValue So, you need create HTML code like: input name=aMap[aKey] value=aValue / On the server side, the OGNL expression will be converted into Java method invoking like:

Re: Dynamically setting the template directory in an Action

2011-12-12 Thread Li Ying
I mean: If the OS is unix/linux, you can create file link (or folder link) on the file system. This doc describes more details: http://www.cyberciti.biz/faq/creating-hard-links-with-ln-command/ 2011/12/13 Gurcharan Singh gurcha...@rachna.co.in: Hi Li Sorry, not able to understand your point.

Re: struts2 annotation

2011-12-01 Thread Li Ying
I did some search, found it here: com.opensymphony.xwork2.conversion.impl.XWorkConverter.addConverterMapping(MapString, Object, Class) And this converter is configured in [struts-default.xml]: http://struts.apache.org/2.x/docs/struts-defaultxml.html The following doc describe more details:

Re: Customizing validation

2011-11-28 Thread Li Ying
think the final and most beautiful solution should be, adding some [pre-condition checking] into the Struts2 bundled validators themselves. But this is out of our control, hope the developers of Struts2 can here this. 2011/11/28 Jyothrilinga Rao jyoth...@gmail.com: Thanks Li Ying, I got some

Re: Customizing validation

2011-11-28 Thread Li Ying
Changing the [validation interceptor] will switch on/off the all validations by one pre-condition. But what he need is: if and only if pre-condition-A is true, run validation-A; if and only if pre-condition-B is true, run validation-B; etc... So, I think the right way is, change the validators.

Re: Please explain

2011-11-28 Thread Li Ying
This doc explains it. http://struts.apache.org/2.x/docs/interceptors.html#Interceptors-MethodFiltering 2011/11/29 Srineel Mazumdar smaz19...@gmail.com: Hi, Please explain the meaning of the following :  param name=excludeMethodsinput,back,cancel,browse/param

Re: Customizing validation

2011-11-28 Thread Li Ying
Yes, of course you are right. But what you talking about sounds like to change S2 mechanism itself, which we can not do. As a S2 user but not a S2 developer, the simplest way is to write a new validator.. Of course, If the [pre-condition based validation] is a common request, I think it will

Re: getText returns NULL when formating number using l10n

2011-11-27 Thread Li Ying
of your actions, so you can use it in all the actions. 2011/11/23 Felipe Issa felipe.i...@simova.com.br: It's not a definitive solution, but it works. Thanks Li Ying! Em 21/11/2011 23:07, Li Ying escreveu: or you can do the null check in the jsp code, before you create the param list

Re: multiple header in struts2 select tag

2011-11-27 Thread Li Ying
The error message is optGroupInternalListUiBean.parameters is undefined I had a quick look at the source of Struts2 and tag template, In [template/simple/optgroup.ftl]: line 23: #if parameters.optGroupInternalListUiBeanList??line 24: #assign

Re: multiple header in struts2 select tag

2011-11-27 Thread Li Ying
is [struts2-core-2.2.3.jar], maybe you need upgrade to the latest version, and see if the error happen. 2011/11/28 Li Ying liying.cn.2...@gmail.com: The error message is optGroupInternalListUiBean.parameters is undefined I had a quick look at the source of Struts2 and tag template, In [template

Re: Customizing validation

2011-11-27 Thread Li Ying
If your validate rules are fixed, only some parameters (integer/date format or something else) relies on the country setting, I suggest you implement it by retrieve the params via OGNL expression. The parameter for the Validators can be OGNL expression. These docs may help:

Re: getText returns NULL when formating number using l10n

2011-11-21 Thread Li Ying
I have read the source of java.text.MessageFormat, looks like it output a null text to the result String when the argument is null. I think you can create a read-only property in your action (or your data model class), and implement the null check and format process in this property, code like:

Re: getText returns NULL when formating number using l10n

2011-11-21 Thread Li Ying
or you can do the null check in the jsp code, before you create the param list for the format string. Code like: s:textfield key=orderItem.price value=%{getText('format.number',{orderItem.price == null ? : orderItem.price})} / 2011/11/22 Felipe Issa felipe.i...@simova.com.br: Hi.

Re: method's namespace

2011-11-20 Thread Li Ying
This document may help: http://struts.apache.org/2.x/docs/convention-plugin.html#ConventionPlugin-Actionannotation 2011/11/21 叶伟平 weiwei5...@gmail.com: Dear All, I have a action class which's namespace is /(Annotation), and, I want to use another namespace for a method within the class. How

Re: Struts Conventional plugin is not working, Not calling invoking my Action but page is displaying

2011-11-20 Thread Li Ying
Do you want to map your action to the following url? namespace: common action: homepage But your package configuration is: package name=mypackage extends=struts-default namespace=/ I think maybe this setting maps all the actions in this package to namespace /, but not common as you want. Read

Re: Dynamically setting the template directory in an Action

2011-11-20 Thread Li Ying
(1)I believe the word [template] in struts2 means, the template file to render a struts2 tag. for example, the file [struts2-core-2.2.3.jar]/template/xhtml/form.ftl is a template file to render the tag s:form using theme xhtml (2)what you are trying to do, is to change the jsp file location

Re: Message lookup (from key) in Test

2011-11-17 Thread Li Ying
Hi Miguel: How did you generate the error message? (A)Did you add the message key to the action errors, like: this.addActionError(error.authorisation); (B)or did you retrieve the message text by the key, then add the text to the action errors, like:

Re: Right way for exception handling

2011-11-17 Thread Li Ying
Hi, Ilya: But struts-2 breaks this scheme. 1) it does not pass exception to container so container can't log it. I used struts2 for several years. In our projects, struts-2 does not break this schema. I have read the source of struts2. When an exception is thrown from action execution,

Re: [S2] Displaying user entered values after failed type conversion while using getText()?

2011-11-17 Thread Li Ying
I have 2 suggestion: (A)Declare the input data field in your action as a String, instead of date or integer. So, the String field can hold anything input from client side. But this will be inconvenience to use, because you have to convert the string value to the date or integer value by yourself,

Re: Struts 2 Initialization Plugin

2011-11-10 Thread Li Ying
I think lazy initialization is a simple choice, because it is not dependent on the J2EE container, this make your code easy to test. If you worry about duplicated-initialization triggered by multi request, the simple solution is, make your initialization code [synchronized], using reserved word

Re: s:text encoding issue

2011-10-19 Thread Li Ying
I tried the JSP code which you posted. It works fine. What is your [locale]? you said, you [select Arabic], do you mean [locale] is [Arabic]? What name is your property file, and what is the content in it? - To unsubscribe,

Re: How to use tabbed panels with s:form

2011-10-17 Thread Li Ying
JQuery UI can help you. Here is the home page: http://jqueryui.com/ Here is the tab ui demo: http://jqueryui.com/demos/tabs/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail:

Re: Unsubscribe from the group

2011-10-16 Thread Li Ying
Read the [ Unsubscribe ] section of this page: http://struts.apache.org/mail.html I believe you can do it by yourself. 2011/10/17 ashok ramasankar ramsankar.as...@gmail.com: Hi, Please unsubscribe my mail id from the user group - user@struts.apache.org Please do the needful. Thanks,

Re: Struts 2 date field problem

2011-10-11 Thread Li Ying
Did your problem happens when date input or output? For output case, the s:date tag can let you choose the format to use. See: http://struts.apache.org/2.x/docs/date.html For input case, Struts2 can convert HTTP parameters from String into most of data type you need, include Date. But for Date,

Re: slow request/response may be because of validation/conversion

2011-10-10 Thread Li Ying
I think conversion and validation should not be turned off. The [conversion] convert http parameters (which is String) to the real data type so your action can accept. The [validation] check the parameters if they a valid. And also, normally, conversion and validation should not take too much

Re: s:submit onclick=return false still call the action in IE 9!

2011-10-08 Thread Li Ying
This page may help: http://www.ontola.com/en/javascript-onclick-return-false-does-not-work-in-i - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org

Re: Accessing variable in View [S 1.3.8]

2011-10-03 Thread Li Ying
I took a quick look at Struts1 document. Looks like the following information can help: http://struts.apache.org/1.x/struts-taglib/tagreference.html#html:link = START = To specify a single parameter, use the paramId attribute to define the name of the request parameter to be

Re: Unicode Encoding request parameters

2011-09-24 Thread Li Ying
You don't need an extra-filter. The S2 default encoding is UTF-8. The code of S2 filter is: org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter: public void doFilter(..) { .. prepare.setEncodingAndLocale(request, response); .. } and the code of

Re: Is it possible to redirect after a Stream result action has completed?

2011-09-24 Thread Li Ying
I guess you can not do this. Because there should be ONLY ONE HTTP response for every HTTP request. So you can only return a file downlod or a redirect to the client, but not both. If you want to jump to another page after file download, may be you can try JavaScript solution in the client side.

Re: html:link prompting me to download the jsp file

2010-12-28 Thread Li Ying
What HTML code does your html:link tag render? - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org

Re: Error validating struts-2.0.dtd

2010-12-28 Thread Li Ying
May be something getting wrong in Eclipse IDE. Try: (1)Delete the whole project from Eclipse IDE. But NOT delete the project content from the file system (2)Import the project to Eclipse again (3)Clean the project And see if the error get cleared?

Re: Creating Tabs in Struts 2

2010-12-28 Thread Li Ying
You can use the tabbedPanel tag, as Maurizio Cucchiara has told you. http://struts.apache.org/2.2.1.1/docs/tabbedpanel.html Or you can use JQuery UI. Here are demos and docs: http://jqueryui.com/demos/tabs/ - To unsubscribe,

Re: Calculate module of index in Struts2 iterator

2010-12-28 Thread Li Ying
That's just wired. The first idea in my head was, may be there is lacks of brackets in your expression. But then I checked the document of OGNL: http://www.opensymphony.com/ognl/html/LanguageGuide/apa.html Accordinting to this document, the operator [%] has higher precedence than operator

Re: Calculate module of index in Struts2 iterator

2010-12-21 Thread Li Ying
You can put the following debug code in your jsp: s:property value=#fieldNameStatus.index / s:property value=#fieldNameStatus.index % 10 / s:property value=#fieldNameStatus.index % 10 ==0 / It may help you find out what the result of expression is.

Re: Struts 2.2.1 and Tag Lib oddities

2010-12-13 Thread Li Ying
I think the tag-lib [/struts-tags] is defined in [struts2-core-2.2.1.jar/META-INF/struts-tags.tld]. Can you see this file in your Eclipse, under the [Web App Libraries]? Or, can you see the [Web App Libraries] in the [Java Build Path = Libraries] of your web-app? Or, you can [refresh] your

Re: cssClass attribute with @s.textfield ignored when inputError happens

2010-12-13 Thread Li Ying
I read the source code of [simple/css.ftl], it looks like trying to combine [cssClass] and [cssErrorClass]. So you can try: @s.textfield name=port value=port key=service.port maxsize=5 cssClass=prop-port cssErrorClass=inputError / see if the result is what you want?

Re: cssClass attribute with @s.textfield ignored when inputError happens

2010-12-13 Thread Li Ying
I read the source of [simple/text.ftl], and found nothing looks like rendering the extra [class=inputError] attribute. Can you tell me where it is? - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional

Re: Iterator: field errors.

2010-12-12 Thread Li Ying
Since after validation fails the iterator grid also empty I think, you need separate the field names by list index -- since your data model is a list--, to indicate which [textfield] should be captured by which POJO element. And also, you need separate the field name of validation error, to

Re: Problem using scriplet object in s:if tag

2010-12-12 Thread Li Ying
It don't works, because the JSP local variable is not an OGNL local variable. The JSP local variable will be translated into a local variable of the Servlet code, and it is a local variable of Java language, so you can not reference it in the OGNL expression. An OGNL local variable should be

Re: Invocation of type conversion manually

2010-12-12 Thread Li Ying
I think you don't need this bothering job. You can: (1)Define some properties in your base class of all your action classes. (2)Use these properties to capture data from the request. (3)Run your interceptor AFTER the interceptors of struts2. But BEFORE the execution of the Action class So, The

Re: Bad Struts Day s:property/

2010-12-12 Thread Li Ying
Try: s:url value='/' + getText('IMAGE') / - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org

Re: submit date in textfield with custom date format

2010-12-12 Thread Li Ying
Read this doc: http://struts.apache.org/2.2.1/docs/type-conversion.html From [# 3 Creating a Type Converter] to [# 6 Applying a Type Converter for an application] - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For

Re: any option parameter for populating parameters to my bean?

2010-12-09 Thread Li Ying
Can you show us the entire Exception stack? I guess, this may be a type conversion error. According to this struts2 documents: http://struts.apache.org/2.x/docs/type-conversion.html#TypeConversion-BuiltinTypeConversionSupport XWork will automatically handle the most common type conversion for

Re: Iterator: field errors.

2010-12-09 Thread Li Ying
What is the data type of objectList? How did you execute the validation, and how did you add the field error? - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail:

Re: Cancel in a form re: bypass Validation

2010-12-09 Thread Li Ying
I think Michal was right. If you don't want execute validation for some Action Method, the annotation @SkipValidation is a good solution. And, in your case, I noticed that, your server side action is doing nothing when the [cancel] button clicked. I suggest you can put a html Link for your

Re: RE: RE: Result Type Stream Corrupted

2010-12-08 Thread Li Ying
Are the file size different? - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org

Re: Asking about BigDecimal in Struts 2

2010-12-07 Thread Li Ying
solve this issue by changing our java script lib. Thanks On Mon, Dec 6, 2010 at 11:47 AM, Li Ying liying.cn.2...@gmail.com wrote: This looks like the result of toString() of BigDecimal. May be you can try this: http://download.oracle.com/javase/1.5.0/docs/api/java/math

Re: Bookmark and session

2010-12-06 Thread Li Ying
Do you mean, when user click some bookmark, you want to check if this bookmark belongs to this user? Basically, you can not control bookmark, because it is a browser operation. The only way i can tell is, to add a user id param to all your page url. So, when userA saved a bookmark, and when it

Re: Problem in calling method from Struts.xml in struts2

2010-12-06 Thread Li Ying
It looks like, the latest class files were not deployed to the WebApp Context. Sometimes this happens. When you find something getting wrong, and your source code looks like right, Just try turn off the web app, and re-deployed your latest code again. See if it the error get fixed. Sometimes,

Re: Problem in calling method from Struts.xml in struts2

2010-12-06 Thread Li Ying
BTW, according to the exception message: The execute method of UserRegistrationAction IS CALLED, but some code invoked by this method raised an exception. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For

Re: Asking about BigDecimal in Struts 2

2010-12-05 Thread Li Ying
This looks like the result of toString() of BigDecimal. May be you can try this: http://download.oracle.com/javase/1.5.0/docs/api/java/math/BigDecimal.html#toPlainString%28%29 2010/12/6 Yanto Bong yantob...@gmail.com: Hi All, We've using BigDecimal as datatype in hibernate and model for

Re: any ideas about handle user's relogin using interceptor?

2010-12-02 Thread Li Ying
The problem will be: (1)How to save the information about who is logged in from which session. and (2)How to check this information before every action execution For problem 1, if you only have one app server, you can save this information in global variable, if you need support multi app

Re: any ideas about handle user's relogin using interceptor?

2010-12-02 Thread Li Ying
ActionContext is just a wrap class for convenience. If you need the real HttpSession. You should get the HttpRequest first, from ServletActionContext.getRequest(). See: http://struts.apache.org/2.2.1/struts2-core/apidocs/org/apache/struts2/ServletActionContext.html And then, you can get the

Re: Spring 3 Upgrade

2010-12-02 Thread Li Ying
I built a web app in this summer, using the latest Struts2.2.1 and the latest Spring3.x. And there was nothing going wrong. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail:

Re: any ideas about handle user's relogin using interceptor?

2010-12-02 Thread Li Ying
The only data need to save is UserID and SessionID, I think it will not over 100 bytes per user. For 1000 user, the total memory will not over 10MB. So, you don't have to worry about memory problem. For the DB solution, if you worry about response speed. You can change the solution: Do not check

Re: any ideas about handle user's relogin using interceptor?

2010-12-02 Thread Li Ying
I read your code, and noticed one thing. You saved the whole HttpSession instance in Map, this will waste memory. The information you really need is just the SessionID, but not the whole Session. SessionID can be retrieved from HttpSession.getId(); See:

Re: any ideas about handle user's relogin using interceptor?

2010-12-02 Thread Li Ying
It looks like so. 2010/12/3 maven apache apachemav...@gmail.com: Thanks! So the way I use the interceptor is right? Nothing have to be changed except saving the session id intead of sessin it self? - To unsubscribe,

Re: Calling Struts Action from JavaScript

2010-12-01 Thread Li Ying
2010/12/1 Anjib Mulepati anji...@hotmail.com: Li When you say sending response using JSON what does that mean? I mean, send a string in JSON format as response. If your response is simple, for example, just a OK or ERROR flag, you can use plain text. But when you need send a complex data

Re: Incorporating action interceptor configuration parameters into a message

2010-12-01 Thread Li Ying
I have read the source code of FileUploadInterceptor. I think it do the message getting in it's private method, and dose not use the maximumSize as a message format param. So I believe there is no simple way to extract interceptor interceptor param. The simplest way I known is, hard coding the

Re: Calling Struts Action from JavaScript

2010-12-01 Thread Li Ying
I recommend JSON when you need exchange complex data strut between client and server. Because it is very friendly to JavaScript, so you can easily handle complex data strut in your client side JavaScript code. Sample for JSON can be find in the web site Biesbrock has told you. The idea of JSON is

Re: Calling Struts Action from JavaScript

2010-12-01 Thread Li Ying
OR, You can send a whole HTML code of the table as response. In this case, your server side view will be simple, just like any normal JSP. The client side will receive the HTML code, and you can insert this HTML piece into your page. But it will be difficult to manipulate, because what you get

Re: labelizing submit buttons

2010-11-30 Thread Li Ying
I think your tag has a leak of attribute method Your code: s:submit key=btn.search / will generate HTML likes: input type=submit name=btn.search value=Search/ When you click this button, there will be a http request parameter like btn.search=Search. Struts2 will accept this parameter, and try

Re: binding paramters in struts2 without the form

2010-11-30 Thread Li Ying
Struts will not automatically populate fields based on parameters passed via the URL I always use URL to binding parameters to Action. And I have read source code of ParametersInterceptor, I think this Interceptor will populate all the params to Action. And it dose not treat params via URL or

Re: Calling OGNL static method with date argument issue

2010-11-30 Thread Li Ying
What is the error message? And, how did you defined the property today? Is it the same data type as the static method param? - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail:

Re: Calling Struts Action from JavaScript

2010-11-30 Thread Li Ying
Chris is right. On the client side, there is not such a concept of Struts Action.There is Server Side Resource only. You have to access(post or get) it by URL, param, and you must handle the response from the server side. Code should looks like: (1)Client side JavaScript Send a request to

Re: Incorporating action interceptor configuration parameters into a message

2010-11-30 Thread Li Ying
The source code of FileUploadInterceptor is: http://svn.apache.org/repos/asf/struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/FileUploadInterceptor.java .. if (maximumSize != null maximumSize file.length()) {

Re: Upload file content to text box using struts 1.3.8

2010-11-29 Thread Li Ying
(1)Select file from a [file input] (2)Upload it to your Action (by a post) (3)In your action, read in the CSV data, and store into some property(let's say CSVDataProperty) (4)Show your page again, and set the default value of the textarea by CSVDataProperty 2010/11/30 Anjib Mulepati

Re: Upload file content to text box using struts 1.3.8

2010-11-29 Thread Li Ying
Why do you need two forms? Can't you put the FileUpload and the textarea in one form? And in your Action, you can create 2 method, one handle the file upload, and the other one handle the other request - To unsubscribe,

Re: Upload file content to text box using struts 1.3.8

2010-11-29 Thread Li Ying
Another way is, using AJAX: (1)Send a file upload post, (using AJAX), to your FileUploadAction (2)FileUploadAction just read in the CSV file content, and return it as HTTP Response (3)On client side, AJAX can receive the Server response, then you can put it to the textarea (using JQuery) See:

Re: javax.servlet.ServletException: BeanUtils.populate

2010-11-27 Thread Li Ying
I think the reason of the Exception maybe: (1)the data you post is named like liste[0].nom (2)Struts1 accept this http param, and try to translate it to a form property, by using a lib named Apache Commons BeanUtils See: http://commons.apache.org/beanutils/ (3)BeanUtils treats nested property

Re: javax.servlet.ServletException: BeanUtils.populate

2010-11-27 Thread Li Ying
java.util.ArrayList; import java.util.List; /** * A List class which can create items as need.br / * When method get(index) and add(index, element) is called,br / * and if there is no item in this index, item instances will be created * automatically to avoid a NullPointerException. * * @author Li

Re: javax.servlet.ServletException: BeanUtils.populate

2010-11-27 Thread Li Ying
There will be only one class, which will be the class of the elements in the List. I just want to find the Constructor with the least parameters if there are more than one constructors for this class. Once I get the constructor, I can use it to create instance and append it to List

Re: javax.servlet.ServletException: BeanUtils.populate

2010-11-27 Thread Li Ying
What happens when (1)liste is null or (2)liste is filled by null element or (3)index accessed is out of bound? 2010/11/27 Peter Nguyen pe...@peternguyen.id.au: Li, I think the issue is here is most likely point 3. When the form is submitted, I suspect struts is trying to call

Re: File Download with multiple files. Design question

2010-11-20 Thread Li Ying
Any examples of doing this in struts 2 You can get the HttpServletResponse by: ServletActionContext.getResponse() And then, you can set the download file name, by: response.setHeader(Content-Disposition, attachment; filename= + fileName); And then, you can get the

Re: Databinding a checkboxlist

2010-11-19 Thread Li Ying
try s:checkboxlist list=@my.site.enums.co...@values() listKey=label listValue=label name=colors / 2010/11/19 Altenhof, David Aron dalte...@iupui.edu: Trying to figure out a way to do the following without much luck. I

Re: struts2.1 validation problem! with fileUploadStack

2010-11-19 Thread Li Ying
Maybe you can add a property in your action which return the current date. And reference this property in your validation configuration. Or create a Static method in an Utility class, return return the current date, And reference this property in your validation configuration. If both of these

Re: File Download with multiple files. Design question

2010-11-19 Thread Li Ying
My suggestion: (1)I believe you can use ZipOutputStream to output the zipped data to the response OutputStream directly, instead of a temp file. So no temp file need to be created. OR (2)You can create a batch application, repeatedly run it with some interval (use cron or something). And in

Re: OGNL map key reading

2010-11-18 Thread Li Ying
try: invoke the [get] method on map: s:property value=currentPageHotelList[#stat.index].get(#roomindex)/ or reference property on map: s:property value=currentPageHotelList[#stat.index].(#roomindex)/ or iterator on values of map: s:iterator value=currentPageHotelList[#stat.index].values

Re: Interceptor Stack config

2010-11-18 Thread Li Ying
Why you define paramsPrepareParamsStack again? I believe it is already defined in the default configuration file, you can just use it. 2010/11/18 RogerV roger.var...@googlemail.com: Hi I'm setting up a new Struts 2 project - the first time I've started from scratch in ages. I think it

Re: Struts2, convention plugin, websphere 6.1

2010-11-18 Thread Li Ying
Everything submit from the client side, are passed as String. So you can't take object instance as your parameter. You need take the ids of these objects as parameter, and load object by the ids by you self. 2010/11/18 Harsh C hchau...@gmail.com: I think that is probably what it was.

Re: Another stupid question re: Interceptors

2010-11-17 Thread Li Ying
I suggest you to do these things in the following way: (1)put 2 method in IdentifyAction. The first [execute] method returns [input], show the input page to user. (2)In the Identify-input.jsp, submit fields to [IdentifyAction] itself, but another method: [verify] (3)when validation fails, the

Re: Setting object from param tag fails in Struts 2.2.1

2010-11-17 Thread Li Ying
proxy object on the action class and is complaining about that. We are using cglib-nodep-2.2 to lazy load the KeywordList, and it worked perfectly fine in Struts 2.0. (Sorry if this appears multiple times, I keep getting a spam rejection notice.) Raj. On 6:59 AM, Li Ying wrote

Re: Setting object from param tag fails in Struts 2.2.1

2010-11-15 Thread Li Ying
[Ljava.lang.String; means a String array. Looks like you are trying to copy a List from one action to another. By somehow, struts2 is looking for a set method which take a String array as it's parameter. 2010/11/15 Raj Nagappan r...@velocitylabs.com: Hi, we recently upgraded from Struts

Re: Running external Javascript files through Struts/Freemarker -- access to ActionContext and ValueStack?

2010-11-12 Thread Li Ying
My suggestion: (1)Reference your js file as a static resource. (2)If the js need some dynamic information from your action. You can put js variables or hidden tags in your jsp, and retrieve these variables or hidden tags in your js. The js can be static outside resource, but [dynamic

Re: Missing message for key welcome.title in bundle (default bundle) for locale es

2010-11-10 Thread Li Ying
I think there are several problem (1)You have defined the same message key in different resource bundle (ApplicationResource and MessageResources). This may be not a good way to maintenance resource (2)message-resources parameter=com/myapp/struts/MessageResources_es/ is not very good. The

Re: Problem with Struts 1 form

2010-11-10 Thread Li Ying
(1)Is there any Proxy Server between the client PC and the Web App Server? (2)When the action going wrong, is there any Error or Exception message on the Server side? (3)There is a configuration item to control the max-file-size you can upload. You may need change it to more than 200MB.

Re: Problem with Struts 1 form

2010-11-10 Thread Li Ying
3. No such value is set. So I guess it is taking default value right now. As I said, You may need change it to more than 200MB. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail:

Re: Missing message for key welcome.title in bundle (default bundle) for locale es

2010-11-09 Thread Li Ying
try message-resources parameter=com/myapp/struts/MessageResources/ This is right. The name of a resource bundle, should not include the locale suffix. Actually, a resource bundle, contains several resource files which have the same base name and different suffix for each locale. For more

Re: ONGL EL expression problem.

2010-11-08 Thread Li Ying
s:iterator value=list.{?#this.id == titleID'} Is there an unnecessary quotation mark after [titleID]? Try delete it and see if works. If it still not working, My suggestion is: (1)you can implement the search logic in the method [viewPage], and access the search result via a new property.

Re: Have you ever used InputConfig annotation?

2010-11-06 Thread Li Ying
Actually, I am using interface [ValidationWorkflowAware] instead of annotation [InputConfig] for the purpose of repopulation when input validation fail happen. You can see how ValidationWorkflowAware work when you read the source code of DefaultWorkflowInterceptor. Basically, the idea is

Re: How to use s:optiontransferselect/

2010-11-06 Thread Li Ying
if I click the button to move the items, it doesn't work. Does any javascript error show up? Can you show us your entire source code? 2010/11/6 Mead Lai laiqi...@gmail.com: Hi All, I am now using s:optiontransferselect tag with simple theme. It shows two select-list fine, but if I click

Re: How to pass date from action to custom jsp tag?

2010-11-06 Thread Li Ying
The value passed to tag attribute is a simple String. You have to EVALUATE IT as a expression to get the real value. You can read the source of Struts2 tag lib to study how they evaluate the expression. For example: in class [org.apache.struts2.components.Property] (This class is invoked by tag

Re: How to use s:optiontransferselect/

2010-11-06 Thread Li Ying
no object found looks like some javascript is running, but it could not found an object in the HTML DOM. so, it looks like not an error of javascript file, but an error of your HTML DOM. For example, ID of some element is missed. Again, I need read the entire source code before I can tell what is

Re: How to use s:optiontransferselect/

2010-11-06 Thread Li Ying
s:optiontransferselect doubleList={'testing','funning'} list={'spring','hibernate'} doubleName=/s:optiontransferselect Looks like you missed the attribute [name] - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org

Re: How to use s:optiontransferselect/

2010-11-06 Thread Li Ying
: The JavaScript isn't being included. This is not an Ajax tag, and the s: head tag needs to be there. Dave  On Nov 6, 2010 2:59 AM, Li Ying liying.cn.2...@gmail.com wrote: s:optiontransferselect doubleList={'testing','funning'} list={'spring','hibernate'} doubleName=/s:optiontransferselect Looks like

Re: How to use s:optiontransferselect/

2010-11-06 Thread Li Ying
Sorry, type error: The is nothing ... should be There is nothing ... - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org

Re: How to use s:optiontransferselect/

2010-11-06 Thread Li Ying
The template of optiontransferselect has these code: #if !stack.findValue(#optiontransferselect_js_included)??#t/ script type=text/javascript src=@s.url value=/struts/optiontransferselect.js encode='false' includeParams='none'//script #assign temporaryVariable =

Re: UpDownSelect JPA

2010-11-05 Thread Li Ying
The struts2 document says: [The tag will pre-select multiple values if the values are passed as an Array or a Collection(of appropriate types) via the value attribute] see: http://struts.apache.org/2.2.1/docs/updownselect.html So maybe you need define the property in your action as an Array.

  1   2   >