RE: Help On Migration

2008-03-27 Thread vj,sandeep
Hi Laurie, I understand what you are trying to say. What I exactly have is a set of classes which extend from the FormTag, TextTag, ActionError and ActionErrors and do some business Logic implementation. Here They have used the MessageResource for holding the error messages. Now I need to do the s

Re: Please answer this struts basic qtn

2008-03-27 Thread pannar
If u know the answer, please share with us.. I haven't worked on struts much.. We have to override execute method to forward from one page to another page by using mapping.findForward("testAction") some thing like that.. DB/business logic should be inside of execute () method? is there any other

Re: Help On Migration

2008-03-27 Thread Laurie Harper
vj,sandeep wrote: Hi All, I am migrating an existing FrameWork(classes which are extending from some of the Struts classes like FormTag,TextTag etc) from struts 1 to struts 2. It uses MessageResources. I found out that the replacement for the same in struts2 (2.0.11)is WrapperMessageResources wh

Re: Message surviving redirect

2008-03-27 Thread Laurie Harper
He *is* using the store interceptor :-), though apparently it's not working. I haven't used it myself but perhaps you can see what's wrong in the configuration he posted? L. [EMAIL PROTECTED] wrote: Since "chain" can be a bad design practice, you might want to look at the store

Re: Another select-option question

2008-03-27 Thread Laurie Harper
Tom Holmes Jr. wrote: I've created numerous pages with multiple combo-dropdown boxes that captured the label and value of a select box. The formbean for these was always clear cut and simple. Now, I have a select like the following: A B C As I understand it, when I submit, this will

Re: FormFile to Next Page

2008-03-27 Thread Laurie Harper
Storing the FormFile reference into the request wont help; request attributes are discarded at the end of request processing, so by the time the next page submits the first request has gone away. To keep something from one request available to the next request, you would have to put it into the

Re: Struts constants

2008-03-27 Thread Jeromy Evans
If you want the value of a constant, use @Inject on a setter. This is available only to objects instantiated by the Struts2 Container (actions or beans in the config) Example: import com.opensymphony.xwork2.inject.Inject; @Inject("struts.devMode") public void setDeveloperMode(String value) {}

Help On Migration

2008-03-27 Thread vj,sandeep
Hi All, I am migrating an existing FrameWork(classes which are extending from some of the Struts classes like FormTag,TextTag etc) from struts 1 to struts 2. It uses MessageResources. I found out that the replacement for the same in struts2 (2.0.11)is WrapperMessageResources which extends from

Re: mapped back property equivalent in struts2

2008-03-27 Thread Cheng Wei Lee
Hi, I asked the same question a few weeks ago. Do search the archive for more details. Anyway, take a look at the ParameterAware interface. By implementing it, you have access to all the request parameters. Should be similar to mapped back. Cheers! On Fri, Mar 28, 2008 at 11:56 AM, Niral Trivedi

mapped back property equivalent in struts2

2008-03-27 Thread Niral Trivedi
Hi All, Is there anyway we can implement mapped back property ActionForm implementation from Struts1.x in to Struts2? We've been using mapped back property feature so easily to create and populate dynamic property name/value using Struts 1.x that we are not sure how to implement that in Struts2?

Re: How to get access to session scoped bean in Struts?

2008-03-27 Thread diogo pontual
Try to implement the org.apache.struts2.interceptor.SessionAware interface. It defines a method called setSession(java.util.Map session). []',s Diogo On Thu, Mar 27, 2008 at 10:39 PM, simpi <[EMAIL PROTECTED]> wrote: > > I need to access session scope bean in my java action class which will ins

How to get access to session scoped bean in Struts?

2008-03-27 Thread simpi
I need to access session scope bean in my java action class which will insert data from all session beans to the Database. I know I can access I all session beans in JSP using: How to access this bean in Java Action Class? Please Help me !!! :( - In JSF people do it : FacesContext facesCon

Re: Message surviving redirect

2008-03-27 Thread stanlick
Since "chain" can be a bad design practice, you might want to look at the store interceptor. I have used it successfully. On Thu, Mar 27, 2008 at 4:02 PM, Jiang, Jane (NIH/NCI) [C] < [EMAIL PROTECTED]> wrote: > Instead of type="red

Re: ExceptionMappingInterceptor

2008-03-27 Thread stanlick
Never mind d! I was using action redirectAction when I needed chain. Scott On Thu, Mar 27, 2008 at 7:39 PM, <[EMAIL PROTECTED]> wrote: > H > > Any idea why this would return null? > > ActionContext.getContext().getValueStack().findValue("exception") > > > > > On Thu, Mar 27, 2008 at 7:11 PM

Re: S2: Actions/DAO interaction getting messy...

2008-03-27 Thread Adam Hardy
Eric D Nielsen on 26/03/08 15:31, wrote: Adam Hardy on 26/03/08 00:28:43 Eric D Nielsen on 25/03/08 14:29, wrote: Its a Struts2/Spring2/JPA(Hibernate) based project. I'm using a slightly modified version of the Generic DAO pattern shown in the Java persistence with Hibernate book and/or the IBM

Re: ExceptionMappingInterceptor

2008-03-27 Thread stanlick
H Any idea why this would return null? ActionContext.getContext().getValueStack().findValue("exception") On Thu, Mar 27, 2008 at 7:11 PM, Dave Newton <[EMAIL PROTECTED]> wrote: > --- [EMAIL PROTECTED] wrote: > > How would you go about retrieving this ExceptionHolder from the value > stack

Re: ExceptionMappingInterceptor

2008-03-27 Thread Dave Newton
--- [EMAIL PROTECTED] wrote: > How would you go about retrieving this ExceptionHolder from the value stack > from within an action? I can't figure out what "key" to specify when > trying to find it. It's pushed; AFAIK there is no key, just like there's no key for a pushed action (unless somebody

ExceptionMappingInterceptor

2008-03-27 Thread stanlick
How would you go about retrieving this ExceptionHolder from the value stack from within an action? I can't figure out what "key" to specify when trying to find it. /** * Default implementation to handle ExceptionHolder publishing. Pushes given ExceptionHolder on the stack. * Subclas

Re: s:submit and cssStyle

2008-03-27 Thread Okan Özeren
Try this: On Thu, Mar 27, 2008 at 8:32 PM, Brian Relph <[EMAIL PROTECTED]> wrote: > Hello, > > I am trying to add a cssStyle to my button - that includes an > : > > cssClass="previewToggle" cssStyle="background: #F6F6F6 url( value="/images/edit-small.png" />) no-repeat;" action="cancelPrevie

Action attribute getting set to input content value incorrectly

2008-03-27 Thread ryangr
Sorry for the confusing title...I couldn't think of a more succinct description. Basically what is happening is that I have a standard CRUD setup in my app to manage my own User objects. When I edit a user and submit the changes back to the Action, the "id" attribute (just a standard UUID stri

Re: @ExpressionValidator - how to set the expression correctly ? (amount either greater than 0 or null? )

2008-03-27 Thread xianwinwin
WAIT! you were right!!! i was too quick - this solved it. THANK YOU Randy Burgess-3 wrote: > > Did you try > @ExpressionValidator(expression = "(amount > 0) || (amount == null)", > message = "err message") > > Regards, > Randy Burgess > Sr. Web Applications Developer > Nuvox Communi

Re: Struts 1 Javascript Question

2008-03-27 Thread Laurie Harper
bhaarat Sharma wrote: Hello I am using struts 1 to show a link to the user like this Edit However I want this link to open up from Javascript instead! For javascript I have a code like the following function openPopup() { windowReference = window.open('/cmrs/editProjectMonitor

Re: @ExpressionValidator - how to set the expression correctly ? (amount either greater than 0 or null? )

2008-03-27 Thread xianwinwin
thanks, this throws an exception FreeMarker template error! Method public java.util.List org.apache.struts2.components.Form.getValidators(java.lang.String) threw an exception when invoked on [EMAIL PROTECTED] The problematic instruction: Randy Burgess-3 wrote: > > Did you try > @Expressi

RE: Message surviving redirect

2008-03-27 Thread Jiang, Jane (NIH/NCI) [C]
Instead of type="redirect-action", did you try "chain"? -Original Message- From: chubi [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2008 4:05 PM To: user@struts.apache.org Subject: Message surviving redirect Hello, I have posted the same problem in a previous thread, yet g

Re: submit and cssStyle

2008-03-27 Thread Brian Relph
that does work, thanks for the idea On Thu, Mar 27, 2008 at 2:04 PM, Michael Gagnon < [EMAIL PROTECTED]> wrote: > Would: > > > > > cssClass="previewToggle" cssStyle="background: #F6F6F6 url(%{editSmall}) > no-repeat;" action="cancelPreview" > onclick="skipAlert(this);" /> > > > not work? > > --

Message surviving redirect

2008-03-27 Thread chubi
Hello, I have posted the same problem in a previous thread, yet got no reply, but I'm really stuck with it and spending days trying to solve it, in vain... I have two actions: editFeature and saveFeature. Whereas editFeature should submit successfuly to saveFeature the latter performs a

Struts constants

2008-03-27 Thread Matthew Seaborn
How can you get hold of the constants defined in the struts.xml? Matthew Seaborn Software Architect t+44(0) 208 484 0729 m +44(0) 7949 465 142 e [EMAIL PROTECTED] [cid:image001.jpg@01C8903D.E0C3C3F0] Sussex House Plane Tree Crescent Feltham, Middlesex, TW13 7

RE: submit and cssStyle

2008-03-27 Thread Michael Gagnon
Would: not work? -Original Message- From: Brian Relph [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2008 2:33 PM To: Struts Users Mailing List Subject: s:submit and cssStyle Hello, I am trying to add a cssStyle to my button - that includes an : ) no-repeat;" action="canc

Re: Struts2 / Spring not working a a WAR in Weblogic9.1

2008-03-27 Thread Laurie Harper
mpaschke wrote: I'm having a problem with using Struts2 and Spring with Weblogic9.1. When I deploy the application as an exploded directory, no problem. Struts2 autowires without a problem. When I deploy as a WAR, with NO other changes, autowire can't find the beans. Is there some special classpa

Action chaining problem

2008-03-27 Thread Enrico Drusiani
hi i've a problem with action chaining. i've defined a xml action in a xml file called struts-ordini.xml with the following result ResiSelection the target action is in another xml file that is imported before the "struts-ordini.xml". i can't understand why the chaining fails, reloading the

s:submit and cssStyle

2008-03-27 Thread Brian Relph
Hello, I am trying to add a cssStyle to my button - that includes an : ) no-repeat;" action="cancelPreview" onclick="skipAlert(this);" /> However, it appears that the tag does not like the inside the cssStyle property ... if this is the case, could anyone point me to the where i would modify

Re: Dojo not working in Struts2.

2008-03-27 Thread Kropp, Henning
Hi Sharath, I am not quit sure, but I think it might help if you simply remove the tag. You see dojo is already configured inside of struts (inside the core jar and static folder or so) to be used with it's tags http://struts.apache.org/2.x/docs/tag-reference.html . Since you are not using a

RE: Calling Action on form load

2008-03-27 Thread Jiang, Jane (NIH/NCI) [C]
Aum, After you retrieve the list in your action, save it in session using session.put("mySelectionList", list); Then in your jsp, use the list in session for s:selection. Hope this helps, Jane -Original Message- From: aum strut [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27

Re: Calling Action on form load

2008-03-27 Thread aum strut
Jane, can you just give me a brief aidea about (or even if u can a demo code ) how u put ur list in to the action. that will be of gr8 help --aum On 3/27/08, Randy Burgess <[EMAIL PROTECTED]> wrote: > > Use the tag. > > http://struts.apache.org/2.x/docs/action.html > > Regards, > Randy Burges

Re: Calling Action on form load

2008-03-27 Thread Randy Burgess
Use the tag. http://struts.apache.org/2.x/docs/action.html Regards, Randy Burgess Sr. Web Applications Developer Nuvox Communications > From: aum strut <[EMAIL PROTECTED]> > Reply-To: Struts Users Mailing List > Date: Thu, 27 Mar 2008 22:04:04 +0530 > To: Struts Users Mailing List > Subject

RE: Calling Action on form load

2008-03-27 Thread Jiang, Jane (NIH/NCI) [C]
Aum, I know what you are talking about. I end up putting all lists for select tag in the session. Otherwise, you will have to reload the list every time the form submits and when validation error happens. I'd like to find out if there are other ways to get around too. Jane -Original Mes

Calling Action on form load

2008-03-27 Thread aum strut
Hi all, is it possible to call an action in struts2 everytime when the page get loaded if yes how it is possible. my problem is i am using tag and using a list to pupulate this drop down this list is coming from the action which i m calling before the page is being displayed. the folw is like t

Re: FormFile to Next Page

2008-03-27 Thread Antonio Petrelli
2008/3/27, Tom Holmes Jr. <[EMAIL PROTECTED]>: > > Yes, I thought I mentioned that I could parse it and store it until > I need it. > However, I don't like to store data like that in a session ... it could > be a lot of data. > But I could pass it into the request Wait a moment, maybe

Re: FormFile to Next Page

2008-03-27 Thread Tom Holmes Jr.
Yes, I thought I mentioned that I could parse it and store it until I need it. However, I don't like to store data like that in a session ... it could be a lot of data. But I could pass it into the request Antonio Petrelli wrote: 2008/3/27, Tom Holmes Jr. <[EMAIL PROTECTED]>: Wel

Re: FormFile to Next Page

2008-03-27 Thread Antonio Petrelli
2008/3/27, Tom Holmes Jr. <[EMAIL PROTECTED]>: > > Well, my use case, I am parsing a CSV file and the first line contains > the header information. > Each column has a header so rather than parse the entire file at > this time, I just grab the first line. > That's all I need to do in that acti

Re: FormFile to Next Page

2008-03-27 Thread Tom Holmes Jr.
Well, my use case, I am parsing a CSV file and the first line contains the header information. Each column has a header so rather than parse the entire file at this time, I just grab the first line. That's all I need to do in that action, then I need to hold onto that file, and then go to t

Another select-option question

2008-03-27 Thread Tom Holmes Jr.
I've created numerous pages with multiple combo-dropdown boxes that captured the label and value of a select box. The formbean for these was always clear cut and simple. Now, I have a select like the following: A B C As I understand it, when I submit, this will submit back a string ar

Re: FormFile to Next Page

2008-03-27 Thread Antonio Petrelli
2008/3/27, Tom Holmes Jr. <[EMAIL PROTECTED]>: > > Ok . maybe what I'll do in this case is put the FormFile into the > request manually Isn't it easier to parse the FormFile in the action? Antonio

Re: FormFile to Next Page

2008-03-27 Thread Tom Holmes Jr.
Ok . maybe what I'll do in this case is put the FormFile into the request manually, so I can pass it from one page to the next. I'm not so much concerned with the FormFile.getInputStream since I can use FormFile.getFileData to get the byte array data. Thanks! Antonio Petrelli wrote: 2008/

Tabbed panel question

2008-03-27 Thread Jiang, Jane (NIH/NCI) [C]
I just started using tabbed panel. I started with these simple 3 tabs. I now want to add a link to tab one that when clicked opens up tab 2. I know I can use the selectedTab attribute to dynamically select a tab. Is there a better/simpler way to do that? Thanks a lot for your help, Jane

Re: FormFile to Next Page

2008-03-27 Thread Antonio Petrelli
2008/3/27, Tom Holmes Jr. <[EMAIL PROTECTED]>: > > Anyway, my question is after I upload my file and look at the data, I > want to hold onto that file to the next page. ... > Can I do this, or do I need to parse the entire file after the first > page, and then how would I persist this without writ

FormFile to Next Page

2008-03-27 Thread Tom Holmes Jr.
I have found dozens of examples on the Net to use Struts 1 to upload a file using the FormFile object. This works great. However, there is probably a bug in the FormFile since getting the inputStream doesn't seem to work. But using the getFileData to get the byte array does work fine, so then

Re: Struts 2.1 autocompleter, get the value

2008-03-27 Thread sassien
Ok, I finally managed to make it work. so now the answer... as I said, I did it exactly the same way as the example: Autocompleter 2 and here we never get the result (the selected thing). Of course if we want to have it we have to add name="mySelectedValue" and have a setMySelectedValue in

Dojo not working in Struts2.

2008-03-27 Thread sharath karnati
Hi All, Please find 'test4Dialog.jsp' in attachment. This .jsp file is placed inside /WEB-INF/pages directory. When I'm accessing this .jsp with (http://localhost:7001/hibernate/pages/test4Dialog.jsp), it is displaying 'dijit.TooltipDialog' correctly. The same page I c

Re: @ExpressionValidator - how to set the expression correctly ? (amount either greater than 0 or null? )

2008-03-27 Thread Randy Burgess
Did you try @ExpressionValidator(expression = "(amount > 0) || (amount == null)", message = "err message") Regards, Randy Burgess Sr. Web Applications Developer Nuvox Communications > From: xianwinwin <[EMAIL PROTECTED]> > Reply-To: Struts Users Mailing List > Date: Wed, 26 Mar 2008 16:34:48

Re: Please answer this struts basic qtn

2008-03-27 Thread Antonio Petrelli
2008/3/27, pannar <[EMAIL PROTECTED]>: > > There was a interview question in Struts framework. Mmm... ready for a "do your own homework" answer? When i extend the Action class to implement the db/business logic Bad habit, the db/business logic should be elsewhere, not in actions... is it >

Please answer this struts basic qtn

2008-03-27 Thread pannar
Hi, There was a interview question in Struts framework. When i extend the Action class to implement the db/business logic, is it possible to invoke my own business logic methods without overriding execute() method of Action class?? regards pannar -- View this message in context: http://ww

Re: Struts 1 Javascript Question

2008-03-27 Thread Antonio Petrelli
2008/3/27, bhaarat Sharma <[EMAIL PROTECTED]>: > Hello > > I am using struts 1 to show a link to the user like this > page="/editProjectMonitor.do" paramId="report_id" > paramName="report" > paramProperty="reportId" target="_blank"> > Edit

Struts 1 Javascript Question

2008-03-27 Thread bhaarat Sharma
Hello I am using struts 1 to show a link to the user like this Edit However I want this link to open up from Javascript instead! For javascript I have a code like the following function openPopup() { windowReference = window.open('/cmrs/editProjectMonitor.do?report_id=<%=WHAT TO

Re: Replacement for org.apache.struts.taglib.html.FormTag and org.apache.struts.taglib.html.Constants.

2008-03-27 Thread Antonio Petrelli
2008/3/27, sandyvj83 <[EMAIL PROTECTED]>: > > Does someone know the replacement for > org.apache.struts.taglib.html.FormTag > and org.apache.struts.taglib.html.Constants in struts 2. Err... sorry Sandeep but I think that you are following a wrong approach. If you want to convert an application f

Replacement for org.apache.struts.taglib.html.FormTag and org.apache.struts.taglib.html.Constants.

2008-03-27 Thread sandyvj83
Hi All, Does someone know the replacement for org.apache.struts.taglib.html.FormTag and org.apache.struts.taglib.html.Constants in struts 2. Thanks in Advance, Sandeep -- View this message in context: http://www.nabble.com/Replacement-for-org.apache.struts.taglib.html.FormTag-and-org.apache.st

Re: How to use in your own java file?

2008-03-27 Thread Chen Chunwei
Thanks Antonio I will try it. Talos - Original Message - From: "Antonio Petrelli" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Thursday, March 27, 2008 4:23 PM Subject: Re: How to use in your own java file? 2008/3/27, Chen Chunwei <[EMAIL PROTECTED]>: > I've already co

Re: How to use in your own java file?

2008-03-27 Thread Antonio Petrelli
2008/3/27, Chen Chunwei <[EMAIL PROTECTED]>: > I've already configured a in struts-config.xml through some > reference. But I don't know how to use it in my own business logic. Use the "getDataSource" method in your action. Anyway, notice that it is discouraged to use a data source this way. It

How to use in your own java file?

2008-03-27 Thread Chen Chunwei
Hi all, I've already configured a in struts-config.xml through some reference. But I don't know how to use it in my own business logic. Talos

Re: Struts2 Annotation based Validation

2008-03-27 Thread Lukasz Lenart
> > Im not sure where to place my properties file. I almost always put my messages to file named package.properties in the same folder as my action's classes. Regards -- Lukasz http://www.linkedin.com/in/lukaszlenart - To un