update values in a collection of beans through JSP

2004-08-24 Thread Muhammad Momin Rashid
Hello, I have a collection of a perticular type of bean. I am displaying the values of fields in each bean (bean values are of type strings, boolean etc.) inside a logic:iterate. The problem is when I change any value in the webpage, the bean in the collection does not get updated. Can anyone g

Re: updating values in a collection of beans through JSP

2004-08-24 Thread Richard Yee
Muhammad, The JSP is evaluated on the server and then sent to the browser. When you change a value on the web page, you submit the form to an Action class which then takes the form properties and should update your collection and then persist it or put it in request or session scope. You can the

Re: duplication of codes in different Action class

2004-08-24 Thread Sebastian Ho
I am already using DispatchAction. I didn't use the scope in my action-mapping. Instead I use session.setAttribute in my Action. The codes to update the actionform is in action1. But I need to update the same form in action2. One way is to duplicate the same codes in both action. Or the common up

forwardPattern in -XML-Element

2004-08-24 Thread Matthias Wessendorf
Hi folks, just a question on forwardPattern of . Perhaps i missed something. Default value is $M$P, which means, module and path. so what would be a good example of changing this behavior? Regards, Matthias -- Matthias Weßendorf Email: matthias AT wessendorf DOT net URL: http://www.wessendorf.n

updating values in a collection of beans through JSP

2004-08-24 Thread Muhammad Momin Rashid
Hello, I have a collection of a perticular type of bean. I am displaying the values of fields in each bean (bean values are of type strings, boolean etc.) inside a logic:iterate. The problem is when I change any value in the webpage, the bean in the collection does not get updated. Can anyon

Re: duplication of codes in different Action class

2004-08-24 Thread Rick Reumann
lixin chu wrote: so JSP1 should be associated with another Action, which fetch data from DB and setAttribute in request or session. Well everything should be going through an Action of some sort so "yes" just make sure the form is populated in your Action before forwarding on to the JSP. -- Rick

Re: ActionForm and Transfer Object

2004-08-24 Thread Rick Reumann
Sebastian Ho wrote: Say I retrieve a TO from database and convert it into a actionForm for display. In this case I have 4 fields for my actionForm but 10 in my TO. (6 are not needed for display). A user updates the 4 fields and the action convert those into TO. In this case, the other 6 fields will

SV: HTML:TEXT tag and Internationalization

2004-08-24 Thread hermod . opstvedt
Hi Yeah, but why invent something new every time when the framework can do it for you ? -Opprinnelig melding- Fra: Jim Barrows [mailto:[EMAIL PROTECTED] Sendt: 24. august 2004 18:47 Til: Struts Users Mailing List Emne: RE: HTML:TEXT tag and Internationalization > -Original Message

Antw: Re: using struts and dbcp together throws sometimes a NoSuchElementException/SQLNestedException:

2004-08-24 Thread PANTA-RHEI WOLF
Hi Erik, this is what i really do, i believe that closing the connection will close automaticly the statement and the resultset, or? the point is, i work with the resultset in a function, which is hidden from the db access, so there i only have my resultset. From these i try to get the statement

Re: duplication of codes in different Action class

2004-08-24 Thread lixin chu
so JSP1 should be associated with another Action, which fetch data from DB and setAttribute in request or session. You should make your Action not the JSP1 available to the user. --- Sebastian Ho <[EMAIL PROTECTED]> wrote: > Hi > > Scenario : > > 1. User submits form in JSP1 which Action1 save

Re: duplication of codes in different Action class

2004-08-24 Thread Rick Reumann
Sebastian Ho wrote: Hi Scenario : 1. User submits form in JSP1 which Action1 saves to database. 2. Action1 set Form1 into session. 3. Action1 forwards to JSP1 again, which is suppose to display newly added form with other forms previously added. How do I make JSP1 to get values from database BEFORE

ActionForm and Transfer Object

2004-08-24 Thread Sebastian Ho
Hi People have been telling me that ActionForm should not be dependent on your TO. Simple because actionForm is for presentation and TO for your business requirement. Sounds logical and right way to go. Now that I started developing using struts, it is actually not that simple. Say I retrieve a

duplication of codes in different Action class

2004-08-24 Thread Sebastian Ho
Hi Scenario : 1. User submits form in JSP1 which Action1 saves to database. 2. Action1 set Form1 into session. 3. Action1 forwards to JSP1 again, which is suppose to display newly added form with other forms previously added. How do I make JSP1 to get values from database BEFORE JSP1 displays an

Re: checkbox is not correct setted in ActionForm

2004-08-24 Thread Shinobu Kawai
Hi Stefan, > I notice something really strange. > I have a update form and the user disable a check box : > > However the action form setter is every time triggered with a "true" > value. ;-o > The really strange thing that I have a other action and form that > contains a checkbox as well

checkbox is not correct setted in ActionForm

2004-08-24 Thread Stefan Groschupf
Hi, I notice something really strange. I have a update form and the user disable a check box : However the action form setter is every time triggered with a "true" value. ;-o The really strange thing that I have a other action and form that contains a checkbox as well and everything is perfec

Re: forward and set url parameter

2004-08-24 Thread Stefan Groschupf
Thanks a lot! Am 25.08.2004 um 00:05 schrieb Guillermo Meyer: +1 Adding a redirect: public ActionForward executeActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { ActionForward forward = mapping.findForward("success"); String path =

submitting map-backed action forms

2004-08-24 Thread Olve Sæther Hansen
Ok, trying once more, hopeing for more help this time.. I have a jsp, getting values from an action. These values represent questions, and alternatives for each question rendered as radio-buttons. The radiobuttons is preset to a choice if the user has visited and answered this question before, b

RE: forward and set url parameter

2004-08-24 Thread Guillermo Meyer
+1 Adding a redirect: public ActionForward executeActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { ActionForward forward = mapping.findForward("success"); String path = forward.getPath(); path += "?foo=bar"; return new ActionForw

RE: thanks, a technical question about using Eclipse with Struts (fwd)

2004-08-24 Thread keith . wright1
Hey Martin, that's a very good idea. Will try and let you know if it worked Thanks much, Keith http://volunteer.johnkerry.com/member/832501 -- Original message from "Martin Gainty" : -- > hey Keith- > > I would doubt the jar versions are changing unless of cou

Re: forward and set url parameter

2004-08-24 Thread Erik Weber
public ActionForward executeActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { ActionForward forward = mapping.findForward("success"); String path = forward.getPath(); path += "?foo=bar"; return new ActionForward(path); } But in th

RE: a technical question about using Eclipse with Struts (fwd)

2004-08-24 Thread Martin Gainty
hey Keith- I would doubt the jar versions are changing unless of course your build process is un jarring all the jars and then re-jarring them later altho why eclipse would do that is beyond me- sounds more like a config issue (by Eclipse) specifically what it is doing to server.xml and web.xml?

RE: I suspect this is a bad idea...so what's a better one?

2004-08-24 Thread Yee, Richard K, CTR,, DMDCWEST
Joe, Delegate the work that you are doing in your Action class to a service class and think about using an ORM framework like Hibernate or Ibatis. Since the service class will be local the Action, it will be threadsafe (unless you use static vars in your service class or do something else that is u

a technical question about using Eclipse with Struts (fwd)

2004-08-24 Thread keith . wright1
Hi, I can't seem to get the newest Struts-examples source code into Eclipse 3.0 in such a way as to generate a good .war file that can deploy to TomCat 5.027. The only public guide I see on how to set up struts in Eclipse is out of date. This happens no matter which version /build of Struts

forward and set url parameter

2004-08-24 Thread Stefan Groschupf
Hi, I wish to forward to a action that require a url parameter. request.setAttribute does not set a urlParameter in the style showBla.do?pk=2323; How to set such a parameter, since request.getParameterMap().put() has no effect? Thanks for any hints. Stefan --

RE: I suspect this is a bad idea...so what's a better one?

2004-08-24 Thread Joe Hertz
> > > > Sounds like you really want a Filter that creates the persistence > > object on the way in (storing it in a request attribute, so > that it's > > accessible in the Action.execute() method), and cleaning up > on the way > > out. > > > > Now, I hadn't thought of that.. Would you store it

RE: HTML:TEXT tag and Internationalization

2004-08-24 Thread bmf5
Thanks for the tip. mailto: [EMAIL PROTECTED] "Jim Barrows" <[EMAIL PROTECTED] m

RE: I suspect this is a bad idea...so what's a better one?

2004-08-24 Thread Jim Barrows
> -Original Message- > From: Craig McClanahan [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 24, 2004 10:20 AM > To: Struts Users Mailing List > Subject: Re: I suspect this is a bad idea...so what's a better one? > > > On Tue, 24 Aug 2004 13:10:50 -0400, Joe Hertz > <[EMAIL PROTECTE

RE: HTML:TEXT tag and Internationalization

2004-08-24 Thread Jim Barrows
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 24, 2004 10:09 AM > To: Struts Users Mailing List > Subject: RE: HTML:TEXT tag and Internationalization > > > > > > > >>you could format them yourself, either in the setter > (yuck), or

Re: I suspect this is a bad idea...so what's a better one?

2004-08-24 Thread Craig McClanahan
On Tue, 24 Aug 2004 13:10:50 -0400, Joe Hertz <[EMAIL PROTECTED]> wrote: > > It seems like you're over engineering something that is > > simple... what problem are you trying to solve with this? > > I want to be able to do alot of the mundane setup stuff that happens in > every action method witho

RE: I suspect this is a bad idea...so what's a better one?

2004-08-24 Thread Jim Barrows
> -Original Message- > From: Joe Hertz [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 24, 2004 10:11 AM > To: 'Struts Users Mailing List' > Subject: RE: I suspect this is a bad idea...so what's a better one? > > > > It seems like you're over engineering something that is > > simple.

RE: HTML:TEXT tag and Internationalization

2004-08-24 Thread bmf5
>>you could format them yourself, either in the setter (yuck), or in the action. Why not in the setter? Sometimes I'll use the setter to populate some other fields privately that then get used later on in the form. Example: I get a decimal number representing time off the db. The setter mov

RE: I suspect this is a bad idea...so what's a better one?

2004-08-24 Thread Joe Hertz
> It seems like you're over engineering something that is > simple... what problem are you trying to solve with this? I want to be able to do alot of the mundane setup stuff that happens in every action method without having to think aboout it. Rather than having every method create and destroy

Re: Date Validation

2004-08-24 Thread bmf5
Thanks for the response. >You can specify the action > path in the tag instead of the form name, and the > javascript tag will work fine -- basically, html:javascript looks for > the literal value from " in the Validator XML config > -- whether it be a form name (ValidatorForm, DynaValidatorF

Re: What happended to Ted Husteds Struts pages?

2004-08-24 Thread David Evans
I found another location for the tips: http://www.jguru.com/faq/topicindex.jsp?topic=Struts then search for Tools:Framework:Struts:Tips On Tue, 2004-08-24 at 08:48, Susan Bradeen wrote: > David Evans <[EMAIL PROTECTED]> wrote on 08/23/2004 05:01:39 PM: > > > Anyone know what happened to the web

RE: I suspect this is a bad idea...so what's a better one?

2004-08-24 Thread Jim Barrows
> -Original Message- > From: Joe Hertz [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 24, 2004 9:49 AM > To: 'Struts Users Mailing List' > Subject: RE: I suspect this is a bad idea...so what's a better one? > > > > You are not safe here ... there is one and only one instance of each

RE: I suspect this is a bad idea...so what's a better one?

2004-08-24 Thread Joe Hertz
> You are not safe here ... there is one and only one instance of each > Action, shared by all requests through the lifetime of the web > application. I'm picking this topic up again and actually, what I'm kicking myself for just now occuring to me is this: To recap: if I make my Persistence obje

RE: HTML:TEXT tag and Internationalization

2004-08-24 Thread Jim Barrows
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 24, 2004 4:38 AM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: HTML:TEXT tag and Internationalization > > > Hi > > Is there any reasonable argument as to why the html:text tag uses

Re: ot: dallas help wanted

2004-08-24 Thread Vic Cekvenich
repost Please let me know if you somone. (it's not Struts, but related). .V -- Please post on Rich Internet Applications User Interface (RiA/SoA) - To unsubscribe, e-mail: [EMAIL PROTECTED] For addition

RE: Tiles and well formed html

2004-08-24 Thread Jim Barrows
> -Original Message- > From: andy wix [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 24, 2004 3:27 AM > To: [EMAIL PROTECTED] > Subject: Tiles and well formed html > > > Hi, > > I have a trypical layout and each tile has its own style > sheet and is well > formed html. > My proble

Re: Date Validation

2004-08-24 Thread Joe Germuska
The commons-validator date validation indeed, can only validate a single date pattern. Joe Hertz made a good point that you must have the multi-format parsing problem solved, so subclassing a ValidatorForm will probably be a good solution. However, I don't understand your other comment: I don'

RE: preventing direct access to action

2004-08-24 Thread Jim Barrows
> -Original Message- > From: Dan Allen [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 24, 2004 7:59 AM > To: Struts Users Mailing List > Subject: preventing direct access to action > > > Normally we talk about preventing direct access to a JSP, but, in > contrast, have a question reg

RE: Date Validation

2004-08-24 Thread Jim Barrows
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 24, 2004 8:58 AM > To: Struts Users Mailing List > Subject: Date Validation > > > > > > > When I search the archive I get no results for the word "date" so here > goes. > > I've been us

RE: Date Validation

2004-08-24 Thread Joe Hertz
Let me ask you this: Presumably whatever the user enters is going to be used to construct a Date object. And if you do that, you presumably also know which of the various formats it got entered in. And if you have the logic somewhere to divine which format it's in, it sounds like you have what y

Date Validation

2004-08-24 Thread bmf5
When I search the archive I get no results for the word "date" so here goes. I've been using the validation plug-in to validate the date format of MM/dd/. A new requirement is to allow the user to enter a date in one of several formats(mmddyy, mm/dd/, and others). Can the validator d

RE: Exception Handler Help!

2004-08-24 Thread Keith Bottner
errors.do is an action mapping. But your question made me take a second look at something. It appears that the exception was getting caught and turned into an ActionError in a base class and therefore never thrown outside the servlet, which of course prevents it from using the global-exception. If

preventing direct access to action

2004-08-24 Thread Dan Allen
Normally we talk about preventing direct access to a JSP, but, in contrast, have a question regarding direct access to an action. Consider the following scenario: A portal application hosts several portlet modules. Each of the modules is passed certain parameters from the portal when the user se

RE: Tiles and well formed html

2004-08-24 Thread Ruben Cepeda
Andy, I used s and they work fine. Are you using pattern matching in you style sheet. EXAMPLE: //css1.css #headerTile h1 { font-size: 400%; } #bodyTile h1 { font-size: 100%; color: navy; } //layou.html ... Hello World!! Body of text * Ruben Cep

Re: using struts and dbcp together throws sometimes a NoSuchElementException/SQLNestedException:

2004-08-24 Thread Erik Weber
Why not just close the connection if con != null && !con.isClosed() ? I always: try { if (rs != null) rs.close(); } catch {} try { if (ps != null) ps.close(); } catch () try { if (c != null && !c.isClosed()) c.close(); } catch {} Not sure if that is it, but I don't understand your logic fo

using struts and dbcp together throws sometimes a NoSuchElementException/SQLNestedException:

2004-08-24 Thread PANTA-RHEI WOLF
Hi there, i have a very strange behaviour using DBCP. I have a small set of JSPs talking to an oracledatabase. after a while it looks if my application hang. 2 till 3 minutes later it seems to work fine again. When i have a look in my logfile, i can see the following exception. I do not know what

Re: Exception Handler Help!

2004-08-24 Thread Jitender K Chukkavenkata
Hei Keith, Could you be little detail regarding struts-config.xml...what is errors.do?? Jitender Kumar C.V.

Re: What happended to Ted Husteds Struts pages?

2004-08-24 Thread Susan Bradeen
David Evans <[EMAIL PROTECTED]> wrote on 08/23/2004 05:01:39 PM: > Anyone know what happened to the website that used to live here: > http://husted.com/struts/index.html > > there was a design patterns catalog and a tips page and alot of great > links. You should be able to get it from here ht

SV: Complicated select - option structure?

2004-08-24 Thread hermod . opstvedt
Hi Your best bet for this is to add a new method to you bean, which returns the first and last name concatenated into a single String value. Hermod -Opprinnelig melding- Fra: Janne Mattila [mailto:[EMAIL PROTECTED] Sendt: 24. august 2004 13:56 Til: [EMAIL PROTECTED] Emne: Complicated sel

Complicated select - option structure?

2004-08-24 Thread Janne Mattila
I am toying around with a simple test application. In one page user creates a new record, and picks the artist for that record with a select pulldown. My artist object has a first name and a last name separately. Initially I displayed only last name: Quite nice and compact.

Re: Validating Dynamically Creating Rows

2004-08-24 Thread DGraham
Return Receipt Your Re: Validating Dynamically Creating Rows document :

Re: What happended to Ted Husteds Struts pages?

2004-08-24 Thread James Mitchell
Didn't you here? Everyone is moving to .Net, if you are not, your are missing the boat. Get your ticket quick! http://www.microsoft.com/titanic.Net/purchase.aspx;) -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message

HTML:TEXT tag and Internationalization

2004-08-24 Thread hermod . opstvedt
Hi Is there any reasonable argument as to why the html:text tag uses default (value.toString()) formating, while the bean:write uses a formatter that is I18N aware. This is really anoying for locales that normally use comma as a decimal seperator. If you output the value with bean:write it will lo

RE: Exception Handler Help!

2004-08-24 Thread Paul McCulloch
Is using forward as an exception handler's path valid? I didn't know you could do that. Anyway, I'd reduce the complexity of what you are doing: Start by using an html page as your path, then try a JSP, then an action. Paul > -Original Message- > From: Keith Bottner [mailto:[EMAIL PROTEC

Re: DTD not found

2004-08-24 Thread Ron McNulty
Thanks Erik Not the best solution maybe, but it works a treat and gets our first build up and running. Thanks again Ron - Original Message - From: "Erik Weber" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Tuesday, August 24, 2004 5:58 AM Subject: Re: DTD

Exception Handler Help!

2004-08-24 Thread Keith Bottner
Configuration of global exceptions looks very simple. So I cannot understand why the configuration of my global-exception refuses to pick up any exceptions. If an error occurs I just get the blank white page. Here is my global-exception configuration section. Then I have a global-forward

Re: Emulate a modal screen (Struts newbie)

2004-08-24 Thread Erik Weber
Perhaps the J2EE pattern "Use a Synchronizer Token" could be of use or even be a complete solution. Struts has built-in support for this in the form of several Action methods (such as isTokenValid(HttpServletRequest) -- which checks to see if the value of a "timestamp" stored as a session attri

Tiles and well formed html

2004-08-24 Thread andy wix
Hi, I have a trypical layout and each tile has its own style sheet and is well formed html. My problem is that only 1 style sheet is being used for the whole page. I saw in the mail archives that someone suggested using tags but this doesn't seem to work for me (I've tried both in the tiles an