Re: How to get all sessions in one web application

2008-06-26 Thread Joey
t all sessions. On Thu, Jun 26, 2008 at 7:08 PM, Wendy Smoak <[EMAIL PROTECTED]> wrote: > On Thu, Jun 26, 2008 at 3:53 AM, Joey <[EMAIL PROTECTED]> wrote: > >> Just want to know how to get all sessions. >> now, I used a listener to add ActionContext.getContext().get

How to get all sessions in one web application

2008-06-26 Thread Joey
Hi, Just want to know how to get all sessions. now, I used a listener to add ActionContext.getContext().getSession() to a list by myself, I just wondering maybe there is a struts API can get all sessions. Thanks. Joey - To

How to use "Autocompleter" like GMail style.

2008-04-10 Thread Joey
but didn't find any useful information. Thanks Joey - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: ActionContext.getContext().getSession return null when I test Struts2 action by JUnit.

2008-02-01 Thread Joey
I found it . like this. Map param = new HashMap(); ActionContext.getContext().setSession(param); Thanks for your help On Feb 1, 2008 4:53 PM, Joey <[EMAIL PROTECTED]> wrote: > Thanks, I just checked testing class in Struts2 package, but I am a > newbie for Strut

Re: ActionContext.getContext().getSession return null when I test Struts2 action by JUnit.

2008-02-01 Thread Joey
rote: > You need to initialize the ActionContext in your unit tests. Take a > look at the Struts 2 tests how it is solved there. > > Nils-H > > > On Feb 1, 2008 9:28 AM, Joey Watson <[EMAIL PROTECTED]> wrote: > > Hi everybody. > > > > I want to test a acti

ActionContext.getContext().getSession return null when I test Struts2 action by JUnit.

2008-02-01 Thread Joey Watson
tion class is working fine in browser. thanks for any help Joey - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: JSON and ExtJS

2007-12-21 Thread joey
ExtJS script submit code is sth like this : fs.submit({url:'save.action', waitMsg:'Saving Data...'}); ExtJS form submit action is an xhr request to your form url,You just handle it in struts2 as you did in a normal html form.But your response must have the same format with your extjs form reader.

Re: JSON and ExtJS

2007-12-20 Thread joey
struts2 json plugin for extjs works good for most time. but extjs 's grid json structure is a little special, you could extend json plugin's classes to support it. ps:In some situations,you could try freemarker type result. Like global exception,validation errors... --

Re: Getting an erro like Exception starting filter struts2

2007-11-15 Thread joey
check whether the xwork2.jar exists in your classpath On Nov 15, 2007 5:16 PM, vijay vijay <[EMAIL PROTECTED]> wrote: > Hi > i am new to this struts 2.i am getting an error like fallowing can any > one help me why i am getting like this. > > 15/11/2007 12:51:47 ã org.apache.catalina.core.Sta

Re: JSONInterceptor doesn't support Long/Short/Double... type.

2007-09-10 Thread joey
atch to > implement the desired behavior. > > https://issues.apache.org/struts/browse/WW > > James > > > On Mon Sep 10 6:00 , joey <[EMAIL PROTECTED]> sent: > > >if My entity class has a property of type in (Long/Short/Double...),I get > a > > > >Ex

JSONInterceptor doesn't support Long/Short/Double... type.

2007-09-10 Thread joey
if My entity class has a property of type in (Long/Short/Double...),I get a Exception JSONExeption Incompatible types for property xxx. After read the code of JSONInterceptor ,I found it doesn't support these types which confused me.

Re: Pls help me to find Struts 1.0.2 binary, library and source

2007-09-02 Thread Joey Watson
Wendy , Thank you very much. On 9/3/07, Wendy Smoak <[EMAIL PROTECTED]> wrote: > On 9/2/07, Joey Watson <[EMAIL PROTECTED]> wrote: > > > I have to find Struts 1.0.2 Binary Distribution, Struts 1.0.2 Library > > Distribution and > > Struts 1.0.2 Source Code Dist

Pls help me to find Struts 1.0.2 binary, library and source

2007-09-02 Thread Joey Watson
ere I can download 1.0.2 binary, library and source. Many thanks. Joey - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: [s2] s:url escaping '&' between params

2007-04-12 Thread joey
I tried your code,but it worked fine! On 4/12/07, Manu Mahajan <[EMAIL PROTECTED]> wrote: Hi I'm facing a very annoying problem with s:url. For some reason it is encoding the '&' between the params to & Here's my code The above code outputs the url with parameters and '&' enco

Re: struts.action.extension question

2007-04-11 Thread joey
keep struts.action.extension default.and create a filter to make sure it's before the struts filter.like this: yourfilter movie/* struts2 /* u can foward or redirect to the url movie.action?movieTitle=* or something else in your filter. regards jo

Re: Accesssing a bean from a jsp without struts tags

2007-04-07 Thread joey
struts set action object in valuestack,so you can't refere to it in your tag. I just manually set it in request scope. btw.Maybe someone know better method.:) On 4/7/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: joey wrote: > add request.setAttribute("invoices",accou

Re: Accesssing a bean from a jsp without struts tags

2007-04-07 Thread joey
just implement interface "ServletRequestAware" and ensure you has config "servlet-config" interceptor in your action mapper. regards joey On 4/7/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: [EMAIL PROTECTED] wrote: > joey wrote: >>

Re: caching and reload

2007-04-06 Thread joey
do you have this? On 4/7/07, Laurie Harper <[EMAIL PROTECTED]> wrote: Chris Pat wrote: > Hello > Is/how it possible to clear the cache on an action? > My action works perfectly, however when the user hits reload > the previous values are repeated. I'm not sure what cache you're talking abou

Re: Accesssing a bean from a jsp without struts tags

2007-04-06 Thread joey
add request.setAttribute("invoices",accountBean.getInvoices()) in your action execute method. On 4/7/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: OK, let me include more details, may be someone will understand what I am talking about. I have a list that belongs to a Bean that's wet in an ac

Re: [S2] redirect-action to different namespace

2007-04-06 Thread joey
only interceptors,results will be inherited from parent package. On 4/6/07, Manu Mahajan <[EMAIL PROTECTED]> wrote: Ok. So what happens when I extend a package? Do i inherit its namespaces, interceptors and actionmappings in the sub package? joey wrote: > Package 's name is

Re: [S2] redirect-action to different namespace

2007-04-06 Thread joey
Package 's name is the key to for other packages to reference like extend. Namespace could be different to name. On 4/6/07, Manu Mahajan < [EMAIL PROTECTED]> wrote: Manu Mahajan wrote: > 1. How can I redirect a result from an action to an action in another > namespace? > I have separate config

Re: S2: Design Input suggestion

2007-04-05 Thread joey
I don't think you should turn on validation in "edit" mode or "create" mode. Validation is only needed in "save" mode. "edit" mode or "create" mode is just to show field data,no submit. You can set validation only work for "save" mode like this: Add edit,create i

Re: S2: Better passing of fields by link

2007-04-05 Thread joey
Yes,your method is easier,I just missed your reply. regards joey On 4/6/07, Musachy Barroso <[EMAIL PROTECTED]> wrote: I think it is easier just to use the anchor tag from the ajax theme, which already does this. regards musachy On 4/5/07, joey <[EMAIL PROTECTED]> wrote: > >

Re: S2: Better passing of fields by link

2007-04-05 Thread joey
I think you want the a tag having the ajax function like the autocompleter tag. You can just use ajax lib javascript like dojo to achieve it. There is the snippet: function dojoForm(form) { var kw = { mimetype: "text/plain", encoding:

Re: Struts 2 exception problem

2007-04-04 Thread joey
Are you sure you catch the HibernateException? On 4/4/07, oguzhan tortop <[EMAIL PROTECTED]> wrote: hi all, i am using struts2 with hibernate i have a basic form which inputs the given data via hibernate. I get the hibernate session from my custom hibernate interceptor and from that intercept

Re: S2 life cycle

2007-04-04 Thread joey
I prefer to achieve it by writing some java code than xml snippet. Maybe migrating from struts1.x would do this. If I just wanted to share more than one form within some actions,I must declared more than one interceptor.If I achieve it by only java code,I only need write a base action and extend i

Re: [S2] action mapping best practice

2007-04-03 Thread joey
In the latest struts2 version 2.0.6,I only found .There was no ... So you confused me. Regards joey On 4/3/07, Jae K <[EMAIL PROTECTED]> wrote: I'm talking about struts2. My post was a reaction to that config file. I was just pointing out what my thoughts were on the best practices

Re: [S2] action mapping best practice

2007-04-02 Thread joey
Which version of struts2 are you talking about? I just found in configuration files. You just confused me. On 4/3/07, Jae K <[EMAIL PROTECTED]> wrote: I have a comment about the MailReader tutorial. This is the action declaration for the Login action: ... ... To invoke this action, the user

Re: Struts ui components inside in a single line.

2007-03-29 Thread joey
web page designers should like your method.You also can achieve it by overriding the template file which genernate the html codes. regarding joey On 3/30/07, Felipe Rodrigues <[EMAIL PROTECTED]> wrote: Hi guys, I found the solution to my case. I got the rendered html and put it direct

Suggestion about Type Conversion Error Handling!!!

2007-03-28 Thread joey
I hate the default type conversion error report message which is Invalid field value for field {1}. after I read the document,I find there is two ways to override it: 1.define the generic i18n key xwork.default.invalid.fieldvalue in your global i18n resource bundle. 2.adding an i18n key associat

Re: if tag doesn't seem to work(Struts 2)

2007-03-26 Thread joey
I thought it may be like this: Hello World or Hello World On 3/27/07, Darren Salomons <[EMAIL PROTECTED]> wrote: I don't know if this is a bug or if I'm doing something wrong but the if tag in Struts 2 always returns false for the first run and then if I hit refresh it gets the correct value.

Re: S2: What do you forward to after a response writer?

2007-03-26 Thread joey
s2 website. regards joey On 3/26/07, Scott Nesbitt <[EMAIL PROTECTED]> wrote: Hmm, when I have this class public class PopulateGridAction extends ActionSupport implements ParameterAware, Result With this method: public void execute(ActionInvocation invocation) throws Exception It never ge

Re: S2: What do you forward to after a response writer?

2007-03-26 Thread joey
you can just register a custom result which implement com.opensymphony.xwork2.Result. Find detail in struts2 document. On 3/26/07, Scott Nesbitt <[EMAIL PROTECTED]> wrote: I am moving an app from S1 to S2 that has a third-party grid component. In S1 it looked like this: public ActionForwar

Re: A Problem in Json plugin!

2007-03-26 Thread joey
support very cool ui. ps.ext website:http://www.extjs.com/ On 3/26/07, Musachy Barroso <[EMAIL PROTECTED]> wrote: Hi Joey Could you send me a testcase for the problem you are having, like a sample action that will break the json generation? I thought about adding parameters a while bac

Re: A Problem in Json plugin!

2007-03-26 Thread joey
he last 2 character is cutted,and I get like this:{"name":"测试,After I replace the code with "json.getBytes(getEncoding()).length", it works fine. currentUser is a ognl expression. On 3/26/07, Musachy Barroso <[EMAIL PROTECTED]> wrote: Hi Joey Could you send me a

A Problem in Json plugin!

2007-03-25 Thread joey
I just tried to generate json result by using Json plugin. But I found that the result is cutted,not a well-formed json result. After debugging ,I found the reason,one of my string property of the struts action isn't a iso-8859-1 encoding string. In the method "execute" of class JSONResult,you co

Re: A suggestion for struts.xml!

2007-03-20 Thread joey
d hate to have a member of the development team drop a .xml file in the config dir and break the deployment for "no" aparent reason. Harring On 3/20/07, joey <[EMAIL PROTECTED]> wrote: > > I think if struts.xml 's element 'include' support wildcard,it will be

A suggestion for struts.xml!

2007-03-20 Thread joey
I think if struts.xml 's element 'include' support wildcard,it will be better. For example I have ten file to be included in struts.xml,now I have to write ten times.But if it has supported wildcard, I would only need write once like this . is it possible to support wildcard next version?I thi

A suggestion for struts.xml!

2007-03-20 Thread joey
I think if struts.xml 's element 'include' support wildcard,it will be better. For example I have ten file to be included in struts.xml,now I have to write ten times.But if it has supported wildcard, I would only need write once like this . is it possible to support wildcard next version?I thi

Re: [s2] Possibility to hide input fields if not empty?

2007-03-20 Thread joey
Just use condition tag to hide your fields,like this: On 3/20/07, Piero Sartini <[EMAIL PROTECTED]> wrote: Just wondering how you guys would make something like this: When a Field in a form is null or empty it should be displayed, if it is al

JSP Compile error

2006-07-02 Thread Joey Watson
Hello everybody. I got a strange problem, I use the code : ' /> it can work if I add onchange to JSP directly in Jboss tmp folder, but when I try to compile this JSP , got a compiling error, [jasperc] 2006-07-03 09:39:35 - error-the file '\jsp\com\xxx\xxx\xxx\User.jsp' generated the followi ng

Re: How to avoid lots of "if else" in Action class.

2006-05-04 Thread Joey Watson
Thanks Michael. I will study it. On 5/5/06, Michael Jouravlev <[EMAIL PROTECTED]> wrote: Dispatching action. Do not use old and crusty DispatchAction. See these links: http://wiki.apache.org/struts/EventActionDispatcher http://wiki.apache.org/struts/DataEntryForm Michael. On 5/4/06

How to avoid lots of "if else" in Action class.

2006-05-04 Thread Joey Watson
e codes is not hard to be understant, but sometimes it make the action class too big. Any suggestion? Thanks. Joey. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: How to use

2006-05-04 Thread Joey Watson
Thanks Kjersti. ur code works. but I am just thinking. is it a best way? coz it seems little bit hard to read. On 5/4/06, Kjersti Berg <[EMAIL PROTECTED]> wrote: Try making the entire onchange one scriptlet like this: Kjersti On 03/05/06, Joey Watson <[EMAIL PROTECTED]>

Re: How to use

2006-05-03 Thread Joey Watson
;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< struts does not translate the '<%=ApplicationAction.ACCSUBJ_CHANGE%>' to its value 'accsubj_change

How to use

2006-05-02 Thread Joey Watson
t;<<<<<<<<<<<<< those codes can work well. but now I want to use . but the code '<%=ApplicationAction.ACCSUBJ_CHANGE%>', and '<%=index%>' value can not be get. the value passd to the doSubmitWithIndex function is <%=Applicat

Re: Problem about first page.

2006-02-20 Thread Joey Watson
Thanks Bryan and Michael. I have solved this problem. Thanks you very much. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Problem about first page.

2006-02-20 Thread Joey Watson
Or I think maybe many project would meet this kind of quesition. Just want to know how to deal with it when you need to display some information loaded from db in you first page. On 2/21/06, Joey Watson <[EMAIL PROTECTED]> wrote: > yes. I think it is a good idea. but I don't know t

Re: Problem about first page.

2006-02-20 Thread Joey Watson
ke you welcome page different than login.jsp and have it forward > to login.jsp? If login is your front door, maybe all of your welcome pages > could forward to it. > > - Original Message - > From: "Joey Watson" <[EMAIL PROTECTED]> > To: "Struts Users

Problem about first page.

2006-02-20 Thread Joey Watson
displayed. Thanks.. Joey - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: looking for struts,ejb,jboss,ant demo

2006-02-09 Thread Joey Watson
Thanks everybody. It's seems I need to study it by myself...np.. thanks Joey On 2/9/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Or use the struts,ejb,jboss,eclipse demo and then learn how to set up > the ant build. I use eclipse for day-to-day work and ant for th

Re: [other] Borland want to sell its IDE products.....

2006-02-09 Thread Joey Watson
Borland, a great company is gone. I can not forget Delphi, best IDE tool I have used. to be honesty, I like Delphi more than Eclipse. haa, but it's life... On 2/9/06, Legolas Woodland <[EMAIL PROTECTED]> wrote: > > Hi > just look at > http://blogs.borland.com/davidi/archive/2006/02/08/23013.aspx

looking for struts,ejb,jboss,ant demo

2006-02-09 Thread Joey Watson
Hello everyone. I am looking for a demo using struts,ejb,jboss, ant. I searched by google. but only found struts,ejb,jboss demo by eclipse. but I don't depend on IDE tools. I want to learn more. So hope anybody can help me find a demo using struts,ejb,jboss with ant. Thanks so much. Joey

Re: How to use checkbox in struts.

2006-02-08 Thread Joey Watson
Thanks everybody, I followed the method that Vidya told me. it can work well. and Robert , you can send Vidya's letter to the programer , if still unsuccessful you can tell me. I will make a demo for you. Thanks again. Joey.

How to use checkbox in struts.

2006-02-06 Thread Joey Watson
-- my problem is : 1. In Row class. If define isSelect as a String , is it ok, or boolean is better? 2. I don't know how to write or to make a checkbox, and make action can know whick is be selected. Thanks for any help. Joey