Re: default interceptor overriding parent package default interceptor

2018-12-17 Thread Steven Yang
aviour? > > > Regards > -- > Łukasz > + 48 606 323 122 http://www.lenart.org.pl/ > > śr., 12 gru 2018 o 10:26 Steven Yang napisał(a): > > > > Hi > > I have the following setup of my struts2 xml. > > > > in cus.xml > > > > &g

default interceptor overriding parent package default interceptor

2018-12-12 Thread Steven Yang
Hi I have the following setup of my struts2 xml. in cus.xml ...no interceptors defined, using interceptors form defaultPackage in cus-cus.xml new interceptors But all now all the Actions defined in cus.xml uses the newInterceptorStack as the

Re: S2 - custom tag with Spring

2013-12-05 Thread Steven Yang
thanks I will try that On Thu, Dec 5, 2013 at 4:29 PM, Lukasz Lenart lukaszlen...@apache.orgwrote: 2013/12/4 Steven Yang kenshin...@gmail.com: I think I missed something. To be clear what I meant by tag as jsp tag with tld defined. Yes my resource beans are defined in Spring, using XML

Re: S2 - custom tag with Spring

2013-12-04 Thread Steven Yang
in a classpath which you've told Spring to scan) it is managed by spring - so you'll be able to inject whatever you want onto the bean. Beware of the scope you give to that bean, though. If it's in a tag, you might want to give it a request scope. Miguel On Wed, 2013-12-04 at 11:00 +0800, Steven

S2 - custom tag with Spring

2013-12-03 Thread Steven Yang
Hi I am writing some custom tags. I want to access some resource from Spring. Is there a clean way of doing it, instead of getting the ApplicationContext in the Components? Will @Inject work for non-Struts values? Or @Autowire will work as well? I am using the spring plugin. Thanks

Re: interceptor init twice

2013-05-29 Thread Steven Yang
finally got time to test it and it works wonder thanks On Fri, May 17, 2013 at 4:09 PM, Steven Yang kenshin...@gmail.com wrote: Thanks will do asap On Fri, May 17, 2013 at 2:39 PM, Lukasz Lenart lukaszlen...@apache.orgwrote: Committed, please check with the latest snapshot. Regards

Re: interceptor init twice

2013-05-17 Thread Steven Yang
Thanks will do asap On Fri, May 17, 2013 at 2:39 PM, Lukasz Lenart lukaszlen...@apache.orgwrote: Committed, please check with the latest snapshot. Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ 2013/5/17 Steven Yang kenshin...@gmail.com: Wow that's fast here

Re: interceptor init twice

2013-05-16 Thread Steven Yang
-- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ 2013/5/9 Steven Yang kenshin...@gmail.com: thanks good to know i am not being forgotten :) On Thu, May 9, 2013 at 12:51 PM, Lukasz Lenart lukaszlen...@apache.orgwrote: It's on my ToDo list ;-) 2013/5/9 Steven Yang

Re: interceptor init twice

2013-05-09 Thread Steven Yang
thanks good to know i am not being forgotten :) On Thu, May 9, 2013 at 12:51 PM, Lukasz Lenart lukaszlen...@apache.orgwrote: It's on my ToDo list ;-) 2013/5/9 Steven Yang kenshin...@gmail.com: Hi just wondering is anyone as any insight on this? Or do I need to provide more information

Re: interceptor init twice

2013-05-08 Thread Steven Yang
Hi just wondering is anyone as any insight on this? Or do I need to provide more information? thanks On Fri, Apr 26, 2013 at 3:37 PM, Steven Yang kenshin...@gmail.com wrote: same behavior for devMode=true and false i am not sure what you mean, shouldnt init only be called during

Re: interceptor init twice

2013-04-26 Thread Steven Yang
same behavior for devMode=true and false i am not sure what you mean, shouldnt init only be called during initialization? or do you want to confirm that when I run my app after initialization, the init method wont be called again? so far the observation is that this only happen during

Re: How can I put multiple charts into a single JSP page using JFree Chart?

2013-04-26 Thread Steven Yang
indeed just include multiple img tags that points to actions that generate images using JFreeChart see http://struts.apache.org/development/2.x/docs/jfreechart-plugin.html On Fri, Apr 26, 2013 at 3:01 PM, Lukasz Lenart lukaszlen...@apache.orgwrote: 2013/4/17 Norah Jones nh.jone...@gmail.com:

Re: How can I put multiple charts into a single JSP page using JFree Chart?

2013-04-26 Thread Steven Yang
I have no idea. I did not modify the document. I simply find the page and post for example and didnt even noticed it. On Fri, Apr 26, 2013 at 5:52 PM, Martin Gainty mgai...@hotmail.com wrote: Steven Error trying to draw image gallery org.apache.velocity.exception.ParseErrorException:

interceptor init twice

2013-04-24 Thread Steven Yang
I was using 2.1.8 and recently upgraded to 2.3.14. And I realized that my interceptor got initialized twice and it didnt happen before. This happens when I declare a default package in struts.xml and include other xml which have packages that extends my default package. But the thing is no matter

Re: interceptor init twice

2013-04-24 Thread Steven Yang
be trivial to determine by checking to see if it's the same instance. I could be misremembering. Dave On Wed, Apr 24, 2013 at 7:52 AM, Steven Yang kenshin...@gmail.com wrote: I was using 2.1.8 and recently upgraded to 2.3.14. And I realized

Re: interceptor init twice

2013-04-24 Thread Steven Yang
@Maurizio sorry in the sample app I do not using Spring. I am using Spring in my projects, sorry for the confusion And sorry this behavior started on 2.3.7 and 2.3.4.1 does not have this behavior On Thu, Apr 25, 2013 at 9:13 AM, Steven Yang kenshin...@gmail.com wrote: @Maurizio I am indeed

Re: generating taglib using Ant and Java 6

2013-04-10 Thread Steven Yang
Steven Yang kenshin...@gmail.com: submitted please let me know if anything is wrong, first timer https://issues.apache.org/jira/browse/WW-4040 Thanks a lot! I will review it asap :-) Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl

Re: generating taglib using Ant and Java 6

2013-04-08 Thread Steven Yang
yes I was using it when my project was built against java 1.5 as it uses APT which is not in Java 1.6 anymore. so I ported it to use the new Annotation Processor. I basically did a direct translation On Mon, Apr 8, 2013 at 1:49 PM, Lukasz Lenart lukaszlen...@apache.orgwrote: 2013/4/7 Steven

Re: generating taglib using Ant and Java 6

2013-04-08 Thread Steven Yang
sure but just that i have never done such thing before please inform me on the step and what should i do thanks On Mon, Apr 8, 2013 at 2:37 PM, Lukasz Lenart lukaszlen...@apache.orgwrote: 2013/4/8 Steven Yang kenshin...@gmail.com: yes I was using it when my project was built against java

Re: generating taglib using Ant and Java 6

2013-04-08 Thread Steven Yang
one question should i do it in a new package? the old one is for apt and should be kept right? On Mon, Apr 8, 2013 at 3:09 PM, Lukasz Lenart lukaszlen...@apache.orgwrote: 2013/4/8 Steven Yang kenshin...@gmail.com: sure but just that i have never done such thing before please inform me

Re: generating taglib using Ant and Java 6

2013-04-08 Thread Steven Yang
submitted please let me know if anything is wrong, first timer https://issues.apache.org/jira/browse/WW-4040 On Mon, Apr 8, 2013 at 4:43 PM, Lukasz Lenart lukaszlen...@apache.orgwrote: 2013/4/8 Steven Yang kenshin...@gmail.com: one question should i do it in a new package? the old one

Re: generating taglib using Ant and Java 6

2013-04-06 Thread Steven Yang
here is the source on git https://github.com/lunaspeed/struts-annotation-processor I am new on both git and maven so it seems I have not done somethings right. Please tell me where I can improve. On Sat, Apr 6, 2013 at 1:48 PM, Steven Yang kenshin...@gmail.com wrote: Hi all I found out

Re: generating taglib using Ant and Java 6

2013-04-05 Thread Steven Yang
to using the Processor. Need a bit more testing, I will share it when I am done testing with my own project. On Fri, Apr 5, 2013 at 12:10 PM, Steven Yang kenshin...@gmail.com wrote: I definitely will share when I figure out how and I am really interested in when Struts3 will be come GA, as I am

Re: generating taglib using Ant and Java 6

2013-04-04 Thread Steven Yang
share it as we can use with Struts 3 then :-) 2013/4/4 Steven Yang kenshin...@gmail.com: Sorry this may not be directed to Struts2 I have written some Struts2 taglib and want to package them into a jar. I am not using maven so I used to use Ant with apt tag. And my task looks

Re: Using HashMap in selectbox

2012-03-28 Thread Steven Yang
i think you can turn the map to a SetEntryK, V then use it as listKey as getKey() or key and listValue as getValue() or value On Wed, Mar 28, 2012 at 6:16 PM, Rakeshkumar Parmar rakeshkumar_par...@persistent.co.in wrote: I think it requires list. So you can get values from hashmap using

Re: Struts, spring integration while using struts annotations

2012-02-28 Thread Steven Yang
check this http://struts.apache.org/2.0.8/docs/spring-plugin.html you can use spring along with the annotation in the convention-plugin such as @Action, etc On Tue, Feb 28, 2012 at 6:01 PM, Puneet Babbar 2 pbabb...@sapient.comwrote: Hi, I am using struts annotations with my applications, I

Re: Nested Iterator tag...

2011-11-23 Thread Steven Yang
try: s:iterator id=outerList value=outerList s:iterator id=innerList value=top s:property / /s:iterator /s:iterator or s:iterator id=outerList value=outerList var=il s:iterator id=innerList value=#il s:property / /s:iterator /s:iterator or since

Re: Edit a list of Strings to action

2011-10-24 Thread Steven Yang
try s:iterator value=*inputStrings* status=*sts* var=s s:textfield name=*inputStrings[%{#sts.index}].value* value=%{#s}/ s:textfield or s:iterator value=*inputStrings* status=*sts* s:textfield name=*inputStrings[%{#sts.index}].value* value=%{top}/ s:textfield On Mon, Oct 24, 2011 at 2:21

Re: an odd problem about struts2 annotation

2011-09-29 Thread Steven Yang
sorry just to be clear did you jar the classes or did you war the classes? if you jar the classes then i dont think struts 2 will scan your classes in jars. On Thu, Sep 29, 2011 at 2:34 PM, dan.zheng cmaj...@gmail.com wrote: hi,everyone I meet an odd problem with struts2 annotation,Let me

Re: an odd problem about struts2 annotation

2011-09-29 Thread Steven Yang
wrote: I jar the classes and put it into WEB-INF/lib of course you know,the war will package all jars and jsp files in bundle why the struts2 can't scan classes in WEB-INF/lib? On Fri, Sep 30, 2011 at 10:05 AM, Steven Yang kenshin...@gmail.com wrote: sorry just to be clear did you

Re: Problem with checkbox's tooltip when overriding the css_xhtml template

2011-09-19 Thread Steven Yang
I am not completely sure here but if I am not wrong the default struts theme is xhtml. so try to remove struts.ui.theme=css_xhtml because some how I remember the theme name is xhtml instead of css_xhtml even though the folder name is constructed otherwise. On Tue, Sep 20, 2011 at 3:59 AM, Arnaud

Re: URL is stripped of its parameters on redirectAction

2011-09-17 Thread Steven Yang
I think the document is only talking about how to include dynamic parameters for redirectAction you should do something like result type=redirectAction param name=actionNameNavigateTo/param param name=myParametermyValue/param /result see

Re: OGNL context lookup

2011-08-11 Thread Steven Yang
so what you want is dynamically finding values on top of the OGNL stack? I am pretty sure its not possible directly through existing tags. But if write your own method which is like public Object getValueFromStack(String key) { return stack.findValue(key) } (havent gone to check how exactly to

Re: Doubt on Struts 2 Architechture

2011-07-19 Thread Steven Yang
and by the way, interceptors dont get called again after action is completed they just havent ended when the action is and result is done. On Tue, Jul 19, 2011 at 10:17 PM, mmcken...@wernervas.com wrote: The struts2 architecture allows for preprocessing and post processing of requests. What

Re: How to display data from database to JSP Page in Struts2

2011-07-10 Thread Steven Yang
some hints about Java naming convention 1. package names are all lower cases 2. field/properties/variables begin with lower case letter, only class/interface...etc. begin with upper case letter yes you should make a separate class for retrieving data. Action is for preparing data for your

Re: Struts 2.2.3 i18n properties not reloaded after redeployed

2011-06-20 Thread Steven Yang
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, 2011 at 1:55 PM, Vincent Lin vincent.lin...@gmail.comwrote: Hi, We

Re: chain or redirectAction ResultType

2011-05-31 Thread Steven Yang
, Steven Yang wrote: chaining is not recommended. basically as you have observed, chaining is a server-side redirect. you go to another page without changing client's browser url. i have not seen a formal argument of the bad of it (or i forgot) but what i have observed is that the user may hit

Re: chain or redirectAction ResultType

2011-05-30 Thread Steven Yang
chaining is not recommended. basically as you have observed, chaining is a server-side redirect. you go to another page without changing client's browser url. i have not seen a formal argument of the bad of it (or i forgot) but what i have observed is that the user may hit Reload on browser and

Re: Access to ActionContext.getContext().getName() using OGNL

2011-05-28 Thread Steven Yang
like Jason said they way i do it is writing a getter method in my action say getActionName() then in it i do ActionContext.getContext().getName() dunno if there is a better way because i have been doing this since the beginning of Struts2 or even Webwork time On Sun, May 29, 2011 at 10:48 AM,

Re: Iterator tag and enumeration

2011-05-12 Thread Steven Yang
try s:select list=@{full package name}.Localization@values()/ On Thu, May 12, 2011 at 3:33 PM, matthieu.m...@ensam.eu wrote: Hi, I have an enumeration 'Localization' : public enum Localization { AIX(Aix-en-provence), ANGERS(Angers) ; } And I want to put a form select in

Re: Iterator tag and enumeration

2011-05-12 Thread Steven Yang
-Message d'origine- De : Steven Yang [mailto:kenshin...@gmail.com] Envoyé : jeudi 12 mai 2011 12:34 À : Struts Users Mailing List Objet : Re: Iterator tag and enumeration try s:select list=@{full package name}.Localization@values()/ On Thu, May 12, 2011 at 3:33 PM, matthieu.m

Re: Tag iterator and my object container

2011-05-10 Thread Steven Yang
you need to implement the Iterator interface On Tue, May 10, 2011 at 4:14 PM, matthieu.m...@ensam.eu wrote: Hi everybody, I have a container object SearchResults which contains a treeMap of simple object SearchResult. I want to iterate over SearchResults in order to display properties of

Re: Debug problem, one http request is send twice.

2011-04-10 Thread Steven Yang
I used to have problem with FF submitting multiple times. You have to check your event handlers on your submit buttons. Check to see if you accidentally more than one event handlers on one submit button that does form.submit, or make sure the event handler you want to do the submit stops the

Re: Unable to pass a date as a parameter a action

2011-03-15 Thread Steven Yang
try setting devMode=true and set logging to DEBUG and see what message you get On Sat, Mar 12, 2011 at 2:59 AM, Jainitya jainitya.jaiys...@gmail.comwrote: Hi I have to pass a parmeter to action s:url action=DailyShopStockChart id=url s:param name=date value=date/ /s:url Now

Re: Re : Re : Re : url question

2011-03-10 Thread Steven Yang
On Fri, Mar 11, 2011 at 11:10 AM, François Rouxel rouxe...@yahoo.comwrote: well thx, but I need struts2 to do a little job, parse the url...and go to another action... without changing the url... because, actually, there is no www.mysite.com/abusiness.html try chain? redirectAction is

Re: AJAX Sessions

2011-01-27 Thread Steven Yang
Like Dave said The way I did it is in the LoginInterceptor I check the header to see if its an XHR (i have special header for all my XHR calls, I dunno any other way to distinguish between normal http call and xhr, if anyone has better way please do share), and if it is return a special header,

Re: Localice text through hierarchy.

2011-01-20 Thread Steven Yang
IIRC, LocalizedTextUtil looks for package according to the Class hierarchy. What I mean is if your MyAction extends Struts' ActionSupport then after looking a MyAction.properties and the package.properties in the same package it will be looking for ActionSupport.properties and package.properties

Re: JSON Property

2011-01-05 Thread Steven Yang
, Jan 4, 2011 at 6:12 PM, Steven Yang kenshin...@gmail.com wrote: I might be wrong here. As I remember JSON Plugin turns the whole action into one single JSON object. I dont believe its what Jim wants, but most definitely there must be something Jim can use in the Plugin to transform

Re: JSON Property

2011-01-04 Thread Steven Yang
. Obviously if one is dealing with AJAX one has no choice but to have JSON actions, but I'm not. I've now written a JSON tag, but given that Steven Yang and I have now written something to do the same job it seems to me that there ought to be some common entity for providing it (i.e. I

Re: JSON Property

2011-01-03 Thread Steven Yang
well for me I do have an custom tag the tag converts any entity into JSON, so for example i have ListMyEntity myEntities; in my JSP i can do s:iterator or output as Javascript array sx:json value=myEntities/ without action knowing what the output will be formated. and in the tag i have my

Re: Parameter manipulation

2010-12-16 Thread Steven Yang
is your user object initialized when the param interceptor is run? here i might be wrong, but what i know is if your object is initialized then Struts or OGNL will call getUser().setEmail(...) otherwise create a new User then setEmail then setUser then the second case should fail for you again,

Re: Iterate through a List of Maps

2010-12-13 Thread Steven Yang
yes try adding # before record - #record and since record is a map you can iterate through it directly without calling entrySet() On Tue, Dec 14, 2010 at 10:36 AM, Dave Newton davelnew...@gmail.com wrote: What version? Early versions sometimes required a # before the variable name when

Re: OGNL map key reading

2010-11-17 Thread Steven Yang
so currentPageHotelList[#stat.index] gives a Map? if ur using an iterator u can just do s:iterator value=list var=map -- of course u can use top as well but l like giving it a name s:property value=map[#roomindex]/ /s:iterator On Wed, Nov 17, 2010 at 4:13 PM, Emil Dombagolla

Re: Struts2 - implementing SSL

2010-11-09 Thread Steven Yang
yes using SSL provided by web container or http server is the way to go i think the struts ssl plugin only provide convenient way to redirect certain page to https/http. for example, you might want to force your login page to be always accessed using https then it can help you easily redirect all

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

2010-11-09 Thread Steven Yang
try message-resources parameter=com/myapp/struts/MessageResources/ and make sure your locale is es_ES and not just es (not sure if it matters, but just to be on the save side) On Wed, Nov 10, 2010 at 6:00 AM, bladu ego...@hotmail.com wrote: Hi, I have created a project basic project in

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

2010-10-13 Thread Steven Yang
Hi Overby Result is indeed your choice to go. in general you should avoid any direct use of the Servlet stuff in your Actions. you should prepare your data in your action or execute then determine what data type you want to return then return the proper result string then let your Result format

Re: Struts2+json question

2010-08-06 Thread Steven Yang
this is the matter with how you handle your result in your javascript and how you communicate with your javascript in you case, you should always return a json because your doing your validation by AJAX right? its in your javascript that you need to tell whether the login was successful or not,

Re: Iterate over an ArrayList of arrays

2010-05-11 Thread Steven Yang
try s:iterator value=breadcrumbs lia href=${top[1]}${top[0]}/a/li /s:iterator On Tue, May 11, 2010 at 5:52 PM, Thomas Lulé tho...@lule.fr wrote: I just found an ugly solution : ul s:iterator value=breadcrumbs

Re: How to convert request parameters into Collection type - Set

2010-01-20 Thread Steven Yang
simply loose the [n] just have all fields with name middleNames On Wed, Jan 20, 2010 at 8:34 PM, Mittal, Nitin (US - Mumbai) nimit...@deloitte.com wrote: Hi, I need help in mapping JSP text fields to a setter in action class which have parameter as SetString I know Struts 2 supports

Re: [S2] s:select can't use ENUM type

2009-12-22 Thread Steven Yang
what does getComboBox accepting? an Enum value or Enum array? if an Enum value then you have to do @{include full package path}comboboxt...@sex On Wed, Dec 23, 2009 at 12:15 AM, mailtolouis2020-str...@yahoo.com wrote: Hi, I got problem to using ENUM type in s:select, here is my code:

Re: Getting result of JSP before sending to client

2009-10-29 Thread Steven Yang
need a jsp and could use freemarker or velocity. musachy On Wed, Oct 28, 2009 at 6:28 PM, Steven Yang kenshin...@gmail.com wrote: Hi I am wondering is there a way in Struts2 to get the result of JSP before returning the composed HTML back to client? for example public String

Re: Getting result of JSP before sending to client

2009-10-29 Thread Steven Yang
. is there other way? Thanks On Thu, Oct 29, 2009 at 3:24 PM, Steven Yang kenshin...@gmail.com wrote: i will take a look at embeddedjsp plugin actually what we are doing is we have a form/survey and after user completes it, we, originally, want to save it as PDF which would have no problem for me

Getting result of JSP before sending to client

2009-10-28 Thread Steven Yang
Hi I am wondering is there a way in Struts2 to get the result of JSP before returning the composed HTML back to client? for example public String execute() { ...do my logic and prepare my data ...then using the data, compose a HTML file from existing jsp ... then i need to save the HTML

Re: Exception using ParametersInterceptor to fill a SetString

2009-10-22 Thread Steven Yang
, msbrogli On Oct 22, 2009, at 2:56 AM, Steven Yang wrote: Set usually dont have orders unless specifically implemented forif you need to preserver order then use List then email[0] will work On Thu, Oct 22, 2009 at 12:38 PM, Marcelo Salhab Brogliato msbro...@vialink.com.br wrote: I

Re: Exception using ParametersInterceptor to fill a SetString

2009-10-21 Thread Steven Yang
Set usually dont have orders unless specifically implemented forif you need to preserver order then use List then email[0] will work On Thu, Oct 22, 2009 at 12:38 PM, Marcelo Salhab Brogliato msbro...@vialink.com.br wrote: I made some tests in a very simple application now and I got this

Re: Problem with available Strus2 Releases

2009-09-29 Thread Steven Yang
So is 2.1.8 out but just not yet officially announced? and does http://people.apache.org/builds/struts/2.1.8/ provide the final version of 2.1.8? Thanks On Mon, Sep 28, 2009 at 9:16 PM, Wes Wannemacher w...@wantii.com wrote: Keep an eye out ;) -Wes On Mon, Sep 28, 2009 at 9:08 AM, Greg

[S2] accessing enum inside a Class

2009-09-15 Thread Steven Yang
Hi I know if I want to access an enum in JSP i can do s:property value=@com.my.package.mye...@my_value/ However if MyEnum is public in a class, say MyClass, how do it get the value? I tried @com.my.package.myclass.mye...@my_value @com.my.package.mycl...@myenum@MY_VALUE

Re: [S2] accessing enum inside a Class

2009-09-15 Thread Steven Yang
yeahi just went back to check it is set to true On Tue, Sep 15, 2009 at 3:20 PM, Lukasz Lenart lukasz.len...@googlemail.com wrote: Did you set struts.ognl.allowStaticMethodAccess to true? Regards -- Lukasz http://www.lenart.org.pl/ http://dailylog.lenart.org.pl/

Re: Warning message when setting BigDecimal to list of bean

2009-09-14 Thread Steven Yang
converter and include code to return a null if the input value is blank? Steven Yang wrote: so...this is an OGNL error? is there a way to fix it? or should i file a bug? On Fri, Sep 11, 2009 at 12:32 AM, j alex strutstwou...@gmail.com wrote: hmm..i remember getting the warning even

Re: Warning message when setting BigDecimal to list of bean

2009-09-14 Thread Steven Yang
a customer converter or crank down your logging. Steven Yang wrote: 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

Re: Warning message when setting BigDecimal to list of bean

2009-09-12 Thread Steven Yang
parameters are Strings ) into the BigDecimal field since it cannot find an appropriate setter. In connection to this, can anyone let me know how to suppress this message with lo4j.properties (not log4j.xml) configuration. On Thu, Sep 10, 2009 at 11:59 AM, Steven Yang kenshin...@gmail.com wrote

Re: Warning message when setting BigDecimal to list of bean

2009-09-10 Thread Steven Yang
Sorry I forgot to mention I am using Struts 2.1.8 SNAP SHOT with XWork 2.1.6 samething happens with XWork 2.1.5 On Wed, Sep 9, 2009 at 2:03 PM, Steven Yang kenshin...@gmail.com wrote: Hi I have a bean like public class Account { private String type; private String name

Warning message when setting BigDecimal to list of bean

2009-09-09 Thread Steven Yang
Hi I have a bean like public class Account { private String type; private String name; private BigDecimal value1; private BigDecimal value2; private BigDecimal value3; //getter, setters } in my action i have public class TestAction extends ActionSupport { private

Re: uploading a .xls file

2009-09-09 Thread Steven Yang
are u getting anything from the uploadContent? because i think i should be File file String fileContentType String fileFileName On Thu, Sep 10, 2009 at 12:50 PM, KIRTI CHOPRA kirtichopra2...@gmail.comwrote: hi all i am new to struts and trying to upload a file in struts 2.0 i am using

Re: Mapping of form object to a java bean

2009-08-27 Thread Steven Yang
you can try modelDriven or simply create a javabean with fields matching your form and put it as an attribute of or action but you still need a getter setter for this bean for example in Action: private FormBean myBean; in JSP: s:textfield name=myBean.myProperty/

param for action in struts.xml

2009-08-06 Thread Steven Yang
Hi I want to set initial value for an action I believe the way is action name=myAction class=.xxx.xxxAction param name=myParammyParamValue/param /action then myParamValue will be set to my Action's myParam property. but i am not getting anything in my action class. Am i missing something?

Re: param for action in struts.xml

2009-08-06 Thread Steven Yang
Thanks a lot ChrisI guess I took out one too many interceptor from the basic stack. StaticParam is what i am looking for

Re: [s2] Struts 2.1.8 - jsonplugin 0.34

2009-08-05 Thread Steven Yang
have you tried to upgrade the json plugin jar to version 2.1.8 as well?

[S2] Getting property value from Enum

2009-05-26 Thread Steven Yang
Hi First of all if this question has been ask, I apologize for the double post. and please refer me to the reference. thanks I am using 2.1.6. I have a Enum class Gender and it has a method getTextKey() which simply returns a key for me to use in getText() in Action If in my Action I have

Re: [S2] Getting property value from Enum

2009-05-26 Thread Steven Yang
Just want to add some more information if I do s:property value=gender.toString()/ s:property value=gender.name()/ s:property value=gender.cardinal()/ I get what is expected. I guess all native Enum methods are fine.

Re: [S2] Getting property value from Enum

2009-05-26 Thread Steven Yang
OMG I can't believe myself. how can i make such a stupid mistake Sorry guys for wasting your time. Its all my fault my method name was getTextkey() but I kept on using getTextKey() or textKey (capital K) thats why it never worked its solved.

Re: Javascript CSS obfuscator and packing

2009-05-22 Thread Steven Yang
So what you mean is you want the process to be automated?just as if you press Ctrl+b in Eclipse, its compiles your .java to .class? but instead turns your .js to .min.js? or are you simply looking for something to obfuscate your scripts?

Re: how to use struts 2 to redirect jQuery Ajax request

2009-05-18 Thread Steven Yang
Actually you went off Struts' scope by using AJAX.because javascript is on the client side. by using XHR you have put the control of determining the result to javascript and not Struts. one other way you can do it is you can let server send the url along with other information to client and client

Re: how to format a percentage

2009-05-05 Thread Steven Yang
have you trieds:text name=format.percents:param value=%{( (50.0 / 200.0) *100.0)}//s:text without the decimal OGNL might treat your numbers as integers and there for you get 0. I havent test it out but thats what I used to do for JSTL

Re: struts 2, implements Action / extend ActionSupport

2009-04-12 Thread Steven Yang
basically ActionSupport gives you some default implemented methods to make your life easier. if you dont need them you can simply implement Action But for Struts2 you dont even HAVE to implement the Action interface, as long as you have a method called execute or any named method that your

Re: Issue with the Browser Cache

2009-03-29 Thread Steven Yang
Hii think you did everything that i did. not sure where is wrong but when you get from the first page to the second, did you use GET or POST? if you use GET please see if your server gets hit again when you press back. if you use POST i believe you should see the page expired thing

Re: Struts performance metrics

2009-02-21 Thread Steven Yang
We plan to profe right from the beginning but I am not sure how JSTL can replace Struts tags to increase performance. I understand that in order to display data we can use JSTL. Struts tags are required to use the framework fully. Isn't it ? - I guess for some cases you do have to use

Re: Struts performance metrics

2009-02-20 Thread Steven Yang
Hijust to share some of my experience and see what you decide to do I have worked on a project which the end result is packed into a jar (actions and stuff)and will be throw into and coexist with other project. To run the project, I simply put the jar and related jsp and struts setting xml's into

Re: getText did not return value in s:submit

2009-02-08 Thread Steven Yang
(2) Put package.properties under /WEB-INF/classes/ have you tried to put package.properties under the same package as your action class?AFAIK package.properties only works with classes in the same package or classes sub-classing the classes in the package.

Re: TypeConverter needs Spring Bean

2009-02-05 Thread Steven Yang
Hi I also need my Converter to be handled by Spring however I could not get it to work as well. From my observation is that the Converter is set to X-Work but not to Struts, there for the Spring plugin may not work there. Please correct me if I am wrong. Or is there a correct way to set it up?

Re: [S2] apply i18n on java entity from DB

2008-12-25 Thread Steven Yang
Dimitar thanks for the idea.And Roger thanks for your description that made me understand better what Dimitar is talking about, as I am not familiar about database message resources. With your reference I am able to present solution to my boss better now. Thanks a lot guys learn something new

Re: Step by Step Struts 2 tutorial

2008-12-22 Thread Steven Yang
Great Thanks a lot My company is just gonna start to use S2. I can sure use your demos to teach my colleges good job

Re: How to convert output of s:property into int?

2008-12-22 Thread Steven Yang
just print the property on your jsp or page actually for example var i = s:property value=int/; will become var i = 9; then your javascript will interpret it as an int

Re: [S2] apply i18n on java entity from DB

2008-12-22 Thread Steven Yang
Thanks a lot No problem about the code I get your point clearly. I will definitely take this in to consideration. I guess I need to look back into my design patterns as well ha If anyone else have any thoughts or suggestion please fill free to hit me Thanks

[S2] apply i18n on java entity from DB

2008-12-19 Thread Steven Yang
HI If this question has been asked, please refer me. Thanks in advance I am currently using Struts2 with Spring. Basically I have struts action backed by Service and DAO injected by Spring. I may be getting a java entity from the Service, for example a Product. And the product object has

Re: Performance issue

2008-12-15 Thread Steven Yang
I had encountered similar problem a while back in Webwork.I believe its OGNL's problem as well. However, in most of my other projects using WebWork, I had no performance problem. I believe it has something to do with some jar files included in the project. I have not got a chance to find out which

Re: form to array

2008-11-30 Thread Steven Yang
I believe what you want is checkbox right? radio only has one value simply declare an instance property in your action private String[] names; and public getter setters for it and in your html just do input name=names type=checkbox value=1 input name=names type=checkbox value=2 and so on

Re: need to create servlet

2008-11-26 Thread Steven Yang
I am guessing its suggesting you have one context root for static content and another root for your actions and stuff. for example you might have something like for actions http://localhost/actions/login.action and for static contents http://localhost/static/login.png and in your login.action

Re: Form submitted twice (no AJAX!)

2008-11-19 Thread Steven Yang
can you post the html generated from your action and jsp?

Re: SPAM WARNING!: RE: Struts2 : Calling AJAX function on button click(ONLY)

2008-10-29 Thread Steven Yang
Hi on thing i noticed is that you have a notifyTopics attribute on you submit tag which i dont think is necessary and used wrong. i havent used dojo for a long time, so i am not sure if they changed any api or settings. but just a reminder you might need to take a look. you dont have to specify

  1   2   >