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.

Re: how does the namespace work in struts

2010-11-05 Thread Li Ying
form action=/space/register method=post/form Are you rendering html code by your self? Don't do this. Try Struts2's tag lib instead. Example: s:form namespace=space action=register method=post/s:form The tag lib will convert the namespace/action to a valid URL for you. And then,when you

Re: how does the namespace work in struts

2010-11-05 Thread Li Ying
form action=space/register method=post/form This HTML code, will post your form to the RELATIVE path [space/register]. So, the ABSOLUTE path which is requested will depend on the current URL of this page. If ABSOLUTE path is not right, no doubt struts2 can not map it to a right

Re: struts2 html redering problem

2010-11-03 Thread Li Ying
You mean you want to print a message which include HTML Code? Try s:property value=msg escapeHtml=false 2010/11/3 m.harig m.ha...@gmail.com: hello ,       am doing a application in struts2.2.1 , in which am adding some html values in my setter method , like Home lt;Bgt;Loanlt;/Bgt;

Re: s:textfield or s:select with button

2010-10-31 Thread Li Ying
Try put them in same row of a table: table tr tds:textfield //td tds:submit //td /tr /table 2010/11/1 cellterry cellte...@gmail.com: Dear all, I have a question about s:textfield or s:select with a command button just following it. For example, I have tried this:

Re: Multiple form pages - best practise?

2010-10-31 Thread Li Ying
I think the simpler way is: (1)Implement all your inputs in one Action and one JSP (2)Control the visibility of your inputs via JQuery In your case, you can put your inputs in 3 divs(or something else), and bind click event handler to the buttons. In the handler function, you can call [show] to

Re: Get s:url in action

2010-10-28 Thread Li Ying
Not sure which part of this misson is bothering you. Basically, you need: (1)Get the context path of your web app, by invoking [ServletContext.getContextPath()] (2)Build the relative path (3)Build the query parameters what you want And then combine all of them. Most time you can implement this

Re: The requested list key 'prices' could not be resolved as a collection/array/map/enumeration/iterator type.

2010-10-28 Thread Li Ying
Did you create the list which is referenced in your JSP? 2010/10/28 cellterry cellte...@gmail.com: Hello all, I encountered a strange problem today: so.detail.jsp: … s:form action=soDetail …                        s:select id=price name=detail.price.id                                

Re: The requested list key 'prices' could not be resolved as a collection/array/map/enumeration/iterator type.

2010-10-28 Thread Li Ying
I need see all your code before I can find what's going wrong. Can you show me the whole Action class and JSP? - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail:

Re: The requested list key 'prices' could not be resolved as a collection/array/map/enumeration/iterator type.

2010-10-28 Thread Li Ying
You may need check: (1)Which jsp pages is executed when you submit your page? (2)Before the select tag reference the list which named prices, are you sure you have created it? Because I find the prices is created in only one if-else branches.

Re: Struts 2 s:action tag doesn't render action errors if any are present

2010-10-28 Thread Li Ying
2. What I liked about having an action for rendering the controls it's that I can reuse them across different JSP pages.  What other alternatives do you suggest me that can achieve the same level of modularity? Try jsp:include or s:include. You can create a common jsp, and include it in

Re: RequestHeaderAware in Struts 2?

2010-10-27 Thread Li Ying
I would implement this function as a Utility Class, and call it from the Action class. In the Utility Class you can get the HttpServletRequest instance by [ServletActionContext.getRequest()]. In this case, you even don't need RequestHeaderInterceptor to inject Headers into your action, because

Re: Reg: Issue with Struts 2 Data Binding

2010-10-27 Thread Li Ying
Your data is declared as HashMapString,Object So Struts2 don't know what data type the parameter should be converted to. My suggestion: Change your Action class likes: Public Class ActionClass{ private *HashMapString, Date* userPropsAsDate; private *HashMapString, Integer* userPropsAsInt;

Re: Reg: Issue with Struts 2 Data Binding

2010-10-27 Thread Li Ying
#setPropertyValues%28java.util.Map%29 These libs may do the data type conversion for you or not. I am not sure about it. 2010/10/27 Sathish Kumar sathishkumar.thiyagara...@gmail.com: Hi Li, Thanks ... Unfortunately, In my case, Map represents various java model classes at run time ( User, Employee etc

Re: RequestHeaderAware in Struts 2?

2010-10-26 Thread Li Ying
What Chris has said is right. But what Jose Luis asked for is a inject mechanism likes ParameterAware which takes all the request params through one Map, but not through several property. So I think the simpler (also more Quick And Dirty) way is: (1)Create a interface, likes: public interface

Re: checkbox problem

2010-10-26 Thread Li Ying
My way to solve this kind of problem: (1) Use a DTO class as the data modal for columns of each row. Every column is represented by one property of the DTO class. For example: public class Info { private boolean use; private String name; private int id; // getter

Re: checkbox problem

2010-10-26 Thread Li Ying
I mean: Representing associated data by a DTO class and then holding DTO instances in one List is better than Holding data in several separated Lists each represent one column. 2010/10/26 Dave Newton davelnew...@gmail.com: On Tue, Oct 26, 2010 at 4:32 AM, Li Ying wrote: I think

Re: checkbox problem

2010-10-26 Thread Li Ying
Actually, I have tested these sample codes before I sent it to you, and it worked very well. If it not working on your environment, maybe something else is getting wrong. Does any exception message appeared? 2010/10/27 Peter Bliznak pbliz...@gmail.com: Thanks for your time but what you show me

Re: checkbox problem

2010-10-26 Thread Li Ying
I think so. In the final, if you want to submit any data to member of a list, the [name] of the HTML element should be something like: listName[indexNumber].propertyName Or strust2 can not know where this parameter should be applied to. If your code can work, the first thing should check is: If

Re: Validation in Struts 1

2010-10-25 Thread Qiang Li
wrong. Qiang -- Qiang Li HuBei Polytechnic Institute No. 17 YuQuan Road XiaoGan HuBei 432100 China E-mail: liqi...@hbvtc.edu.cn - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail

Re: Overriding Templates

2010-10-21 Thread Li Ying
I have reported it to JIRA as a BUG. https://issues.apache.org/jira/browse/WW-3522 If the develop team confirm that it really is a bug, then I will add information to the docs. - To unsubscribe, e-mail:

Re: This absolute uri (http://displaytag.sf.net) cannot be resolved in either web.xml or the jar files deployed with this application

2010-10-21 Thread Li Ying
Are your referencing your tag in jsp by code likes: %@ taglib prefix=display uri=http://displaytag.sf.net; % I am not sure, but maybe in the old version of JSP specification, you need add this to your web.xml: taglib taglib-urihttp://displaytag.sf.net/taglib-uri

Re: Overriding Templates

2010-10-20 Thread Li Ying
Just add this to your web.xml:    context-param        param-nametemplatePath/param-name        param-valuetemplate/param-value    /context-param The param [templatePath] can start with only class:// or file://. Otherwise, struts will ignore it and do not create a TemplateLoader for it.

Re: [S2] 2.2.1 possible freemarker template bug

2010-10-20 Thread Li Ying
With a lot of debugging, I think i have found what's wrong. If you use the default setting, In method [createTemplateLoader] of class [org.apache.struts2.views.freemarker.FreemarkerManager], Struts will create 3 TemplateLoader which is: 1,ClassTemplateLoader, which will load Template from class

Re: Overriding Templates

2010-10-20 Thread Li Ying
is different from the Struts2 document. And, as adam said, it also different from the old version of Struts2. 2010/10/20 Dave Newton davelnew...@gmail.com: So you're saying it doesn't work for him? Dave On Wed, Oct 20, 2010 at 5:26 AM, Li Ying liying.cn.2...@gmail.com wrote: Just add this to your

Re: Overriding Templates

2010-10-20 Thread Li Ying
If I am the author of this code, i think the priority order of these 3 TemplateLoaders should be: 1, WebappTemplateLoader 2,ClassTemplateLoader (when value of param [templatePath] is string starts with class://) or FileTemplateLoader(when value of param [templatePath] is string starts with

Re: Overriding Templates

2010-10-20 Thread Li Ying
Actually I did not know about these, Sorry. And (A)I am just a new guy of Struts2 community, if I put some message into the Struts2 docs and it is not right, I will mislead so many users, I will feel so~~~ sorry. (B)As you can see, my English is not good. 2010/10/20 Dave Newton

Re: Overriding Templates

2010-10-20 Thread Li Ying
OK, I will do it, But maybe tomorrow, because the local time is over 11PM now. 2010/10/20 Dave Newton davelnew...@gmail.com: (A)I am just a new guy of Struts2 community, if I put some message into the Struts2 docs and it is not right, I will mislead so many users, I will feel so~~~ sorry.

Re: Can't deploy on server

2010-10-20 Thread Li Ying
Are you using OC4J? These pages may help: http://forums.oracle.com/forums/thread.jspa?threadID=363566 http://forums.oracle.com/forums/thread.jspa?forumID=46messageID=726074threadID=248962 http://forums.oracle.com/forums/thread.jspa?threadID=367999tstart=0

Re: Can't deploy on server

2010-10-20 Thread Li Ying
Thanks for your answers, i try put next code into web.xml file: !-- xml -- system-property javax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl/ system-property javax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl/ !--  xslt --

Re: Overriding Templates

2010-10-19 Thread Li Ying
With a lot of debugging, I think i have found what's wrong. If you use the default setting, In method [createTemplateLoader] of class [org.apache.struts2.views.freemarker.FreemarkerManager], Struts will create 3 TemplateLoader which is: 1,ClassTemplateLoader, which will load Template from class

Re: Can't deploy on server

2010-10-19 Thread Li Ying
It looks like: 1, Oracle's XML parser is chosen to parse your xml configuration file. 2, And it failed. (Don't know why and don't interest to know) You can try to delete Oracle's XML parser and use another one. See this page: https://issues.apache.org/activemq/browse/SM-169 for more information.

Re: Master-details JSP with Validation xml

2010-10-19 Thread Li Ying
the interceptor stack, this make it easier to upgrade to a new version of Struts in the future. 2010/10/13 Dave Newton davelnew...@gmail.com: On Wed, Oct 13, 2010 at 12:44 AM, Li Ying wrote: But, in some case, the data loading logic need to access the parameters value to know what data should

Re: Overriding Templates

2010-10-19 Thread Li Ying
Hi Maurizio: In this document: http://struts.apache.org/2.2.1/docs/template-loading.html It says the template should be searched in (in this order): 1, web app folder 2, class path But i have read the Struts2.2.1 source code, it creates TemplateLoader in a different order, as i described in my

Re: select field value causing NumberFormatException and breaking Action

2010-10-18 Thread Li Ying
I think it is [Parameters Interceptor]: http://struts.apache.org/2.2.1/docs/parameters-interceptor.html You can set a break point in the [setXXX] method of your Action class, then you can find out who is invoking it from the [Call Stack]. One other question, do you guys know where the writing

Re: select field value causing NumberFormatException and breaking Action

2010-10-18 Thread Li Ying
I think it is perhaps a JBoss error. Because the parameters in ServletRequest should be immutable, that means Struts (or other frameworks) has no chance to change the Request parameters. See: http://download.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html#getParameterMap%28%29 So the

Re: After upgrading from Struts 2.0.x to 2.2.x, static content no longer served...

2010-10-18 Thread Li Ying
Are your setting: constant name=struts.action.extension value= / ? Try delete it, use the default setting instead. I take a quick look of the struts source code. In [org.apache.struts2.dispatcher.mapper.DefaultActionMapper], it use the extension of request url to detect if this request should

Re: After upgrading from Struts 2.0.x to 2.2.x, static content no longer served...

2010-10-18 Thread Li Ying
By the way, if you DO want to set the extension of action to , try: constant name=struts.action.extension value=, / See if it works. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail:

Re: Overriding Templates

2010-10-18 Thread Li Ying
Hi adam: what theme are you using? The default theme in Struts2.2.1 is [xhtml]. Maybe you need change the default theme or the theme of your tag to [simple]. Can you show us your setting file(struts.xml and so on) and your jsp code? 2010/10/19 adam pinder apin...@hotmail.co.uk: I have

Re: Character Encoding Error using new filters

2010-10-17 Thread Li Ying
I did a quick look at the struts2.2.1 source code. It looks like the method [HttpServletRequest.setCharacterEncoding] is invoked by class [FilterDispatcher] and [StrutsPrepareFilter]. (You can use [Call Hierarchy] view to find out this information) In your old configuration,

Re: Character Encoding Error using new filters

2010-10-17 Thread Li Ying
Sorry, type error: In your old configuration, [StrutsPrepareFilter] is the last filter applied to request == Should be: In your old configuration, [FilterDispatcher] is the last filter applied to request 2010/10/18 Li Ying liying.cn.2...@gmail.com: I did a quick look at the struts2.2.1

Re: referencing javascript files from (action) jsp file

2010-10-15 Thread Li Ying
Hi Robert and Dave: I tried c:url in my application, and it works for almost all the case. But there is one exception: In my application, i customized the CSS files shiped with Struts JQuery plugin and put them under path [{contextPath}/res/struts/]. In JSP, i need add code likes: sj:head

Re: referencing javascript files from (action) jsp file

2010-10-15 Thread Li Ying
[utils.js] is used for client side validation. it should be found in [struts2-core-2.2.1.jar/org/apache/struts2/static/utils.js] [styles.css] is used for Struts themes. it should be found in [struts2-core-2.2.1.jar/template/theme_name/styles.css] 2010/10/15 Guy Thomas

Re: referencing javascript files from (action) jsp file

2010-10-15 Thread Li Ying
You can read this document: http://struts.apache.org/2.2.1/docs/static-content.html and check if your configuration is right. 2010/10/15 Guy Thomas guy.tho...@vlaamsbrabant.be: Thank you, this works. I would like to draw your attention to possible problems with the struts head tag. See

Re: give suggestion data display base on the Locale

2010-10-15 Thread Li Ying
You can call method [getText(activity.name)] to retrieve localized string. Read this document for more information: http://struts.apache.org/2.2.1/docs/localization.html 2010/10/15 singh123 vij...@rediffmail.com: s:iterator value=listObject s:component template=abc.vm        s:param

Re: referencing javascript files from (action) jsp file

2010-10-15 Thread Li Ying
Thanks a lot, I will try it. 2010/10/15 Robert Taylor rtay...@dtgresults.com: Hi Li, JSTL and EL give you access to the implicit pageContext object. From there you can access attributes from request and session. For example: c:set var=contextPath value=${pageContext.request.contextPath

Re: Struts, Spring, Hibernate and multiple Sessionfactories

2010-10-15 Thread Li Ying
We developed a multi-tenant app last year. But we didn't separate their data into different DB. Instead, we stored all data in one DB, and add a [tenant_id] column to all tables to distinguish which tenant it belong. I think this is a simpler solution. When you need to add new tenant, you can

Re: Struts, Spring, Hibernate and multiple Sessionfactories

2010-10-15 Thread Li Ying
If you want to use multi-DB for multi-tenant (let's say tenant01 and tenant02) I think you can create config file should likes: bean id=sessionFactory_tenant01 class=x property name=configLocation value=cfg_tenant01.xml/ /bean bean id=sessionFactory_tenant02 class=x property

Re: Struts, Spring, Hibernate and multiple Sessionfactories

2010-10-15 Thread Li Ying
I think i don't understand what you want exactly. Can you tell me what you want to achieve? And what your code looks like? 2010/10/15 Eduard Neuwirt eduard.neuw...@googlemail.com: Hi Li, thanks for the answer. I didn't get how does it work within the ? In this case ist the the question

Re: select field value causing NumberFormatException and breaking Action

2010-10-15 Thread Li Ying
I suggest you to check what the parameters value actually are sent to server side. You can see this information via these tools: [Burp Proxy]: http://portswigger.net/burp/proxy.html OR [TCPMon]: http://ws.apache.org/commons/tcpmon/tcpmontutorial.html If the parameter value sent to server is not

Re: referencing javascript files from (action) jsp file

2010-10-14 Thread Li Ying
I suggest you to reference your resource file(js, image, css and so on) in this way: script type=text/javascript src=s:property value=contextPath //path/filename.js/script The [s:property value=contextPath /] part will render the contextPath where the web application is deployed. The

Re: referencing javascript files from (action) jsp file

2010-10-14 Thread Li Ying
Hi guys: c:url looks like a better choice. I will try it in my project. Thanks~~~ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org

Re: ognl and multdimensional lists

2010-10-13 Thread Li Ying
Hi Dave: What version of Struts are you using? A long time ago, i met the similar problem in Struts1. I thought the parameter named cellCosts[0][4].quota should be translated into java code likes: action.getCellCosts().get(0).get(4).setQuota(value); And the method [get] throws a

Re: Master-details JSP with Validation xml

2010-10-12 Thread Li Ying
Hi cellterry: I think your problem is very general. What you need is a chance to reload some data, when the validation get failed and the page is displayed again. I think this document can help you: http://struts.apache.org/2.2.1/docs/inputconfig-annotation.html

Re: Master-details JSP with Validation xml

2010-10-12 Thread Li Ying
Another solution is: 1, Implement interface [ValidationWorkflowAware] in your Action class 2, In method [getInputResultName], you can load all the data you need, and then, return constant [INPUT] as the result name. Actually, In my application, I am using this solution in a little different

Re: Master-details JSP with Validation xml

2010-10-12 Thread Li Ying
By the way, you can read source code of [com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor] to see how these 2 solutions get work. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands,

Re: Master-details JSP with Validation xml

2010-10-12 Thread Li Ying
Interface [Preparable] is another choice to implement the data loading logic. But, in some case, the data loading logic need to access the parameters value to know what data should be loaded. And, unfortunately, the interceptor [prepare] is configured before interceptor [params] in the default

Re: Struts2 - Generate XML in an Action, then direct user to download .xml

2010-10-12 Thread Li Ying
You can generate your XML dynamically, and then write it to the response stream. If you set the response headers correctly, the browser should treat this response as a file downloading. Code in your action looks like this: public String execute() { String xmlStr = generateXML();

Re: sx:datetimepicker

2010-10-10 Thread Li Ying
Try delete the attribute [readonly=true]. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org

Re: sx:datetimepicker

2010-10-10 Thread Li Ying
I read the documents of JQuery Plugin. It looks like the attribute [showButtonPanel] means if show button panel [in the calender], but not if show a button beside the textfield. I think maybe you should use the attributes [showOn]/[buttonImage]/[buttonImageOnly]/[buttonText] instead. You can

Re: How to create a costume struts2 tag? any demo?

2010-10-09 Thread Li Ying
Hi Lai: The error message looks like the value of the attribute [theme] (in your jsp) is invalid. Can you show us your jsp and TLD file? 2010/10/9 Mead Lai laiqi...@gmail.com: I read the attribute name in the template, the Exception log: Attribute theme invalid for tag hello according to

Re: How to create a costume struts2 tag? any demo?

2010-10-09 Thread Li Ying
by the attribute [theme], maybe you should extend your tag class from [UIBean] instead of [Component]. Which means, your class should like: public class Hello extends UIBean { ... ... } 2010/10/9 Li Ying liying.cn.2...@gmail.com: Hi Lai: The error message looks like the value of the attribute [theme

Re: How to create a costume struts2 tag? any demo?

2010-10-09 Thread Li Ying
Hi Lai: I used to read the documents of Struts2, but mostly it can't answer my question. So i had to read the source, or debug it. For your question, i think you should read the source code of classes in package [org.apache.struts2.views.jsp.ui]. Get a look at the entire Class Hierarchy before

Re: How to create a costume struts2 tag? any demo?

2010-10-09 Thread Li Ying
Hi Lai: Of course you should extend your class from [BaseUI], so you can inherit the property [theme] in your class. But also, you should define the attribute [theme] (and all the other attributes you want to use) in you TLD file, or the jsp compiler can not recognize it in your jsp. You can

Re: Create Text Box Dynamically

2010-10-09 Thread Li Ying
Hi I think you can use tags looks like this: s:iterator var=counter begin=1 end={n} s:textfield name=data / /s:iterator to generate 'n' text box dynamically. The html code should be: input type=text name=data repeats 'n' times. When user input text in these text boxes and submit the form,

Re: [S2] How to add a custom parameter to an existing Struts UI Tag?

2010-10-09 Thread Li Ying
Hi Burton: The error message looks like the TLD file does not defined the new attribute correctly. So i think maybe the execute environment is not using the modified TLD file but the old one. Can you show us how you do apply your TLD file to the execute environment?

Re: If tag expression problem

2010-10-08 Thread Li Ying
I think there is a type mismatch too. Converting the array [pages] to strings should work, can you post your code, show us how you convert it? Or, you can try this: s:if test=#it.toString() == #parameters['page'] see if it works. 2010/10/8 Darren Karstens darrenkarst...@gmail.com: Hi, I

Re: If tag expression problem

2010-10-08 Thread Li Ying
[it] in the iteration. Code should like this: Java: XXXAction { private int page; public int getPage()... public void setPage(int page)... } JSP: s:if test=#it == page 2010/10/8 Li Ying liying.cn.2...@gmail.com: I think there is a type mismatch too. Converting the array [pages] to strings

Re: How to set the value of request scope in a interceptor and get it in jsp?

2010-10-07 Thread Li Ying
try s:property value=#request.key / 2010/10/7 lunch...@yahoo.co.jp Hi, When I set a value in my interceptor,I could not get it in a jsp. How to do that? ### my interceptor public class HogeIntercepter extends AbstractInterceptor { @Override public String

Re: How to set the value of request scope in a interceptor and get it in jsp?

2010-10-07 Thread Li Ying
'] (request.getAttribute()) So i believe that #request.key and #request['key'] should work both. 2010/10/7 lunch...@yahoo.co.jp Hi, Thanks Li and Maurizio! Here is the solution. s:property value=#request['key'] / I really appreciate you guys because I spent a whole day for this problem

Re: Accessing User input in execute ( ) method

2010-09-27 Thread Li Ying
Hi hareendra : You don't need an ActionForm to capture the variables sent by client request. What you used to defined in ActionForm class, is now should be defined in Action class. You can read more detail information in http://struts.apache.org/2.2.1/docs/comparing-struts-1-and-2.html

Re: struts.xml parsing error, involving interceptor

2010-09-27 Thread Li Ying
Hi Ken: In the DTD file, it is defined: !ELEMENT package (result-types?, interceptors?, default-interceptor-ref?, default-action-ref?, default-class-ref?, global-results?, global-exception-mappings?, action*) That means, you should add the definition of interceptor as children nodes of the

Re: Incorrect test syntax

2010-09-24 Thread Li Ying
be to add a new tab, and which negative result is to write the content of the ProjectName property. Here it is : s:if test=config.project == 'dba2' lia href=#null onclick=openReport('ia08');Unsolved Tickets/a/li /s:if s:else s:property value

Re: Incorrect test syntax

2010-09-24 Thread Li Ying
Hi Michael: I think changing the return type from Enum to String is not a very good solution. It maybe make your JSP get work,but your Java code will become a little ugly. I think the better way is: (1)do not chang the return type of config.getProject(). (2)in tag s:if, compare it to an enum

Re: Incorrect test syntax

2010-09-24 Thread Li Ying
Hi Michael: Or you can use another simple solution: Convert the value to String(by invoke the [toString] method), before you can compare it to the String constant. In your case, it should be: s:if test=config.project.toString() == 'dba2' ... 2010/9/24 Li Ying liying.cn.2...@gmail.com Hi

Cant get css, js files if not using .do extension

2009-05-12 Thread KE LI
Dear all, I had met a strange problem: If I modified the struts.xml file and I dont want to use .do extension for actions. I set it as /* . For example, the previous link is http://localhost:8080/test.do. Now after modification it becomes: http://localhost:8080/test. But when I restart the

struts 2.1.6 action test using junit-plug-in

2009-05-07 Thread Li
Hey guys, I am recently working with struts2.1.6. I was trying to test my action using struts2.1.6 junit-plugin. It was working fine till I started using annotation to replace XML configuration. Seem the configuration info that was generated using annotation was not loaded by my test case. the

Re: Struts2 REST

2009-03-23 Thread Li
thanks maplye ~

Struts2 REST

2009-03-22 Thread Li
Hey guys, I am a fan of REST and I am excited that Struts2 started supportting REST architecture. I have used Struts REST plug-in to create a demo struts rest application with the help of Struts 2 REST showcase. Interestingly I found out the content under WEB-INF is a required setting, which you

Dynamic TextFields in Struts 2

2009-01-19 Thread KE LI
Dear All, I want to do something like this: in my action i create: ListString textFields = new ArrayListString(); and i tried to write set method in 2 ways: 1. public void setTextFields (ListString textFields) 2. public void setTextFields(String text) { textFields.add(text); }

Re: Dynamic TextFields in Struts 2

2009-01-19 Thread KE LI
Hi Dave and Shashi, Thanks for you two's quick reply!! It does help~:) I just got up, lol. Licco 2009/1/20 sasikumar sasikumar.sugu...@deciphar.com Hi, you dont have to explicitly add the values to the list in the setter methods, since the framework will do that for you , also you

Re: Dynamic s:checkbox name?

2009-01-18 Thread KE LI
Got it, quite useful. Thanks for all you guys' help! 2009/1/18 abhijit.sulh...@gmail.com Makes perfect sense if interested in matching the values from checkbox list. Another variation, I think in that case would be to use the 'fieldValue' instead of name; that way the set values can be

Dynamic s:checkbox name?

2009-01-17 Thread KE LI
Dear All, I am confusing about how to write dynamic s:checkbox names in s2. For example, s:iterator value=test_list status=status s:checkbox name=test_string_? value=true /s:iterator I want to achieve the result as: s:checkbox name=test_string_0 value=true s:checkbox

Re: Happy new Year

2008-12-30 Thread Li
Hey thanks Muralidhar. And wish all users here have a healthy, happy and smooth year of 2009. On Wed, Dec 31, 2008 at 2:12 PM, Muralidhar Y muralidh...@kensium.comwrote: Hi Friends, I wish you all a very happy and prosperous new year. May god bless you with all the happiness in the world. Have

Re: How can these query data be got?

2008-12-02 Thread KE LI
, only the default method execute will be called, right? Thanks a lot! 2008/12/2 Dave Newton [EMAIL PROTECTED] --- On Tue, 12/2/08, KE LI wrote: public class welcome implements Action { private List paramList; setters public String execute() throws Exception

Re: Problem when using result type=redirect-action

2008-12-02 Thread KE LI
admin{1} 2008/12/2 ravindra [EMAIL PROTECTED] I think some thing is wrong at these lines, result name=* type=redirect-action ViewTestedLetters /admin 1 /result Your mapping should be like, result

How can these query data be got?

2008-12-01 Thread KE LI
Hi All, I am quite confusing about this problem: Suppose this is an action: public class welcome implements Action { private String param1; private String param2; private List paramList; getters setters public String execute() throws

Re: Pagination Questions

2008-11-30 Thread KE LI
and resultsPerPage variable that I pass to my data layer. I don't know what database you're using but most allow you to limit the results, using an offset and number of results. KE LI-2 wrote: Dear All, I am currently working on pagination to the result of search result. I want to ask which solution

S2 Side Integrated with UI side(js + ajax)

2008-11-25 Thread KE LI
want me to show the items in the xxInitList by using li in HTML and then he will make the checkboxlist by nicer solution. So how can I solve this problem by getting values from action by not using S2 tags? And what's the best practise to integrate UI side code? This question may be quite trivial

A Strange Error with My Own Tag

2008-11-18 Thread KE LI
Guys, I am writing my own tag as: public class PageTag extends ComponentTagSupport For ComponentTagSupport, it's org.apache.struts2.views.jsp.ComponentTagSupport. But the error appears, it says: Description Resource Path Location Type The project was not built since its build path is

Re: A Strange Error with My Own Tag

2008-11-18 Thread KE LI
Got it.Thanks a lot! 2008/11/18 Lukasz Lenart [EMAIL PROTECTED] You are missing reference to javaee.jar library and it's not related to Struts project Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe,

Re: A Strange Error with My Own Tag

2008-11-18 Thread KE LI
For further information: The Eclipse said: The type javax.servlet.jsp.tagext.BodyTagSupport cannot be resolved. It is indirectly referenced from required .class files 2008/11/18 KE LI [EMAIL PROTECTED] Guys, I am writing my own tag as: public class PageTag extends ComponentTagSupport

HNY

2007-12-31 Thread Li
Hi guys, Happy New Year to you and happy new year to Struts too. Regards Li -- Small win by playing smart Big win by playing honest

Re: Problem running the MySQL script in Struts 2 + Spring 2 + JPA + AJAX tutorial

2007-11-20 Thread Lewis Li
: Tuesday, November 20, 2007 9:59 PM Subject: Re: Problem running the MySQL script in Struts 2 + Spring 2 + JPA + AJAX tutorial Do you have a quickstart schema in your db? musachy On Nov 20, 2007 12:43 AM, Lewis Li [EMAIL PROTECTED] wrote: Hi! I'm doing the tutorial Struts 2 + Spring 2 + JPA

<    1   2   3   >