Re: Using struts forms as Value Objects: your opinion?

2005-07-12 Thread Borislav Sabev
Frank W. Zammetti wrote: It's ironic to me that I had this same discussion with someone at work just last week :) I *was* in the "Maps are better" camp until a few months back when I changed my mind, and it comes down to one thing: Self-documenting code is better. A bean is self-documentin

How to display a Java format string 'as is' in a Struts web app page?

2005-07-12 Thread Ian Hayes
In one part of my Struts web app I want to display and then edit a Java format string, like... This is a Java\tformat string\nthat will be used by {0} to {1} In my web app page I want to see all the '\' format text entries, but when I display this type of string in a Struts text area cont

How to display a Java format string 'as is' in a Struts web app page?

2005-07-12 Thread Ian Hayes
In one part of my Struts web app I want to display and then edit a Java format string, like... This is a Java\tformat string\nthat will be used by {0} to {1} In my web app page I want to see all the '\' format text entries, but when I display this type of string in a Struts text area cont

How to display a Java format string 'as is' in a Struts web app page?

2005-07-12 Thread Ian Hayes
In one part of my Struts web app I want to display and then edit a Java format string, like... This is a Java\tformat string\nthat will be used by {0} to {1} In my web app page I want to see all the '\' format text entries, but when I display this type of string in a Struts text area cont

Re: Excel download

2005-07-12 Thread Borislav Sabev
Senthilrajan VS wrote: Hi all, Is there any way in struts to download the page (view part) in Excel format. Thanks & Regards, SenthilRajan VS Take a look at POI http://jakarta.apache.org/poi/ Regards Borislav - To uns

RE: Excel download

2005-07-12 Thread MATHOT Jacques
Hello all, I agree, look at POI. It worked perfectly for me for upload and download. I put hereunder an example of code for download to an excel file. Regards, Jacques public static void exportExcel(String file_name) { ArrayList states = OperatorsQ1.query(); HSSFWorkbo

Re: Using struts forms as Value Objects: your opinion?

2005-07-12 Thread Borislav Sabev
Craig McClanahan wrote: Blame backwards compatibility. By the time this issue was raised, there were huge numbers of applications already dependent on the previous behavior, which would have been broken by a change. However, this shouldn't have *any* impact on "incorrect values in forms". If

Re: Validation problem

2005-07-12 Thread Borislav Sabev
Rick Reumann wrote: if ( errors != null && !errors.isEmpty ) <-- this part can probably be shortened, I was too lazy to figure out what really gets returned if validation passes.. a null or empty ActionErrors? here is part of the code of RequestProcessor, so in both cases the form is con

Re: Excel download

2005-07-12 Thread Senthilrajan VS
Hi, I know this POI project well, thanks for your code. But my need is to download the part of the output page(view) as Excel file i.e.., part of html. Thanks and Regards, Senthilrajan VS - Original Message - From: "MATHOT Jacques" <[EMAIL PROTECTED]> To: "'Struts Users Mailing List'"

Re: Validation problem

2005-07-12 Thread Borislav Sabev
Rafael Taboada wrote: Hi folks, I'm doing my validation for my form fields... I use validation framework, so I don't use validate method in my form bean. The problem I have is the validate is called when I use for first time the module. I mean, when I see for frst ime the HTML form, validation

How to unsubscribe from mailing list

2005-07-12 Thread Nitin Mandolkar
I have unsubscribe from struts mailing list. But still I am getting mails from struts mailing list. Please let me what to do for this one. Thanks in Advance. Nitin Mandolkar.

Re: Excel download

2005-07-12 Thread Lionel
Senthilrajan VS wrote: > Hi all, > > Is there any way in struts to download the page (view part) in Excel > format. in your jsp, put: <[EMAIL PROTECTED] contentType="application/vnd.ms-excel"%> - To unsubscribe, e-mail: [EMAIL

RE: Excel download

2005-07-12 Thread MATHOT Jacques
Hi, Sorry, my mistake, The last bit of the code was for fat client. Hereunder is the bit for html (it replaces the last part of the previous code). I hope it can be of any use. Regards, Jacques try { FileOutputStream fileOut = new FileOutputStream("operator_list_of_states.xls");

Re: How to display a Java format string 'as is' in a Struts web app page?

2005-07-12 Thread Ext . Ilitia2
I think that you want to use the escape character... you have to use '\' like this: This is a Java\\tformat string\\nthat will be used by {0} to {1} |-+> | | "Ian Hayes" | | | <[EMAIL PROTECTED]| | |

synchronization strategies

2005-07-12 Thread Yaroslav Novytskyy
Hello! OK, first try failed :) Am I allowed to start it over? :) Would you like (in your web application) to add a value to a list (eg a row to a table in a DB)? If yes, then.. Your create a Page and an Action. Page contains a html:form with a field - html:text. Action takes this field a

Re: [OT] Re: Unacceptable Behaviour of Mark Galbreath

2005-07-12 Thread Access Denied
I read the same story on struts-interest and j2ee-interest; it seems to me unlikely that he would go to such efforts if (a) it were not true or (b) he really has an axe to grind with you mates. buddy On 7/11/05, Mark Benussi <[EMAIL PROTECTED]> wrote: > Or a duck? > > -Original Message-

Re: How to unsubscribe from mailing list

2005-07-12 Thread Adam Hardy
Nitin Mandolkar on 12/07/05 08:39, wrote: I have unsubscribe from struts mailing list. But still I am getting mails from struts mailing list. Please let me what to do for this one. Thanks in Advance. Nitin Mandolkar. You need to reply to the email that the mailing list server sen

Re: Using struts forms as Value Objects: your opinion?

2005-07-12 Thread netsql
Rivka Shisman wrote: Is it crucial for the Action Form to have String properties? Yes. Http/html is a String protocol. A user types in a string in your forms (unless it's a callendar tag for dates) rambles on: Only exception is if you have R/O, only getters, that you would not even nee

form elements

2005-07-12 Thread syed abrar
Hello all I have a problem .I have a form containing multiple elements like check boxes,radio buttons,text boxes.The type of element is not fixed and is picked from the the database and displayed in the form. I mananged to display all the form elements but my problem is p

Re: Using struts forms as Value Objects: your opinion?

2005-07-12 Thread Yaroslav Novytskyy
In JDNC, it's all native... (collections in my case) ...and what JDNC is? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: form elements

2005-07-12 Thread Vijay K Anand
syed abrar wrote: Hello all I have a problem .I have a form containing multiple elements like check boxes,radio buttons,text boxes.The type of element is not fixed and is picked from the the database and displayed in the form. I mananged to display all the form elements but

Loosing my form bean instance...

2005-07-12 Thread Brett
Hi I have a problem that is driving me crazy. I have a fairly simple struts web app with a jsp form that submits to a form bean, with an action set up and a display page. I have built a few struts apps and never had such a basic problem: The jsp submits the data and the form bean recieves it

Re: Using struts forms as Value Objects: your opinion?

2005-07-12 Thread Ted Husted
In my experience, maps can be better when the database is driving. When the purpose of the application is to expose the database, then most of the map attributes can correspond directly to database fields. You can also use the same tokens. If the database calls the fact birth_date, then the fact

Re: Using struts forms as Value Objects: your opinion?

2005-07-12 Thread Ted Husted
On 7/11/05, netsql <[EMAIL PROTECTED]> wrote: > Good theory that I used to beleive. > In practice, that is why I went from Beans to Maps. 10% of get/sets on a > project tend to be deprecated either becuase of model changes or becuase > of view changes. > W/ a Map: > - you don't have VO/DTO classes,

Re: Loosing my form bean instance...

2005-07-12 Thread Martin Gainty
Brett- Can we see the code for your Bean com.ftid.mis.form.apache_connection_stats ? specifically the getSql_stmt() method ? Martin- - Original Message - From: "Brett" <[EMAIL PROTECTED]> To: ; <[EMAIL PROTECTED]> Sent: Tuesday, July 12, 2005 7:23 AM Subject: Loosing my form bean insta

Re: Loosing my form bean instance...

2005-07-12 Thread Brett
Sure: /** * Getter for property sql_stmt. * @return Value of property sql_stmt. */ public String getSql_stmt() { return this.sql_stmt; } However this is not the problem. I have tried many different getters and indeed in the debugger I have looked at the variab

Re: Using struts forms as Value Objects: your opinion?

2005-07-12 Thread Borislav Sabev
Ted Husted wrote: In my experience, there's at least two best practices for every problem. Sometimes you waterfall, and sometimes you agile. Sometimes you hibernate, sometimes you ibatis. Sometimes, you property, and sometimes you map. One-size-fits-all is the pointy-hair grail :) Excellen

Re: Loosing my form bean instance...

2005-07-12 Thread Wendy Smoak
From: "Brett" <[EMAIL PROTECTED]> What should happen next is that my display page is shown and accesses my form bean using the getters to retrieve the appropriate data values. However when the action calls findforward, and the display page is called, it seems to create a new instance of my form

Re: Loosing my form bean instance...

2005-07-12 Thread Hubert Rabago
The form you're populating in your action is not the same instance you're accessing in your JSP. Your JSP is looking for the form in session scope, but you've configured your action to receive its form in request scope, so you're actually using two forms. Remove the 'scope="request"' in the "/apa

Re: Loosing my form bean instance...

2005-07-12 Thread Brett
Apologies The session and request scope discrepency was in there by mistake - that was me debugging. Originally all was set to request. Unfortunatley it makes no difference whether it is all set to request or session. So it's something else! Brett Hubert Rabago wrote: The form you're popul

Re: Loosing my form bean instance...

2005-07-12 Thread Hubert Rabago
In that case, it'd be the case mismatch between what your JSP is looking for and how your form is configured in struts-config.xml: Hubert On 7/12/05, Brett <[EMAIL PROTECTED]> wrote: > Apologies > > The session and request scope discrepency was in there by mistake - that > was me debugging.

Re: Loosing my form bean instance...

2005-07-12 Thread Martin Gainty
Is there a reason why you are creating a temporary form object in your execute instead of using the original? M- - Original Message - From: "Hubert Rabago" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Tuesday, July 12, 2005 8:59 AM Subject: Re: Loosing my form bean instanc

RE: Putting execute() in ActionForm

2005-07-12 Thread Schaub, Stephen
Michael Jouravlev wrote: > Also, Struts > is based on idea of subclassing, thus if you already subclassing > something like ValidateForm, you cannot subclass another form, which > you would want to because it has needed event handlers. Good point. > > What if it were a solid dispatching Actio

html:select Problem !!

2005-07-12 Thread EROL TEZCAN
Hi all, I want to set records come from database into a html:select tag. I found some example like below When I set th options as static , the list comes without any problem. But when I create a html:select dynamicly from DB , I get error. In my Action class, it has a method called getSi

Re: Loosing my form bean instance...

2005-07-12 Thread Brett
Problem solved. The issue was, as Hubert pointed out, the mismatch in naming between my JSP useBean and my struts-config formbean tags. I actually never realised they need be the same, i thought the id in useBean simply gave a name of an instance to use for the rest of the jsp. The reason i

Re: html:select Problem !!

2005-07-12 Thread BHansard
you have the html:options set correctly in the first example   in the second example you changed to: try: EROL TEZCAN <[EMAIL PROTECTED]> EROL TEZCAN <[EMAIL PROTECTED]> 07/12/2005 09:38 AM Please respond to "Struts Users Mailing List" To sturts_apache_user s

Re: form elements

2005-07-12 Thread Wendy Smoak
From: "syed abrar" <[EMAIL PROTECTED]> > I have a problem .I have a form containing multiple elements like check boxes,radio buttons,text boxes. > The type of element is not fixed and is picked from the the database and displayed in the form. > I mananged to display all the form elements but my pro

Re: html:select Problem !!

2005-07-12 Thread Martin Gainty
Erol Assuming you have your own MyBean which contains 2 string fields SIKAYET_KODU and ACIKLAMA try this in your jsp <% List sikayetler = new ArrayList(); sikayetler.add( new MyBean( "SIKAYET_KODU1", "ACIKLAMA1" )); sikayetler.add( new MyBean( "SIKAYET_KODU2", "ACIKLAMA2" )); %> labelProperty

Re: html:select Problem !!

2005-07-12 Thread EROL TEZCAN
Oh, I think there are two ways to define html:select Anyway, Best way to fill the html:select ? Erol [EMAIL PROTECTED] wrote: you have the html:options set correctly in the first example in the second example you changed to: try: " src="cid:10__=0ABBFAAFDFD86F@powersyst

RE: Using struts forms as Value Objects: your opinion?

2005-07-12 Thread Durham David R Jr Ctr 805 CSPTS/SCE
> > Is it crucial for the Action Form to have String properties? > > > > Five years of history with Struts (and I should know, since I > created it originally) says "yes" :-) I think it's reasonable to have a numeric type for select-box. - Dave

New to Struts

2005-07-12 Thread Traore Djeneba
Hi All, I am just starting to use struts and also xml programming. I am building a project that will read xml data(oracle XMLTYPE) from the database and convert the xml to html for display. I am looking for 2 things: 1) can someone recommend me a good struts book and/or online tutorial to hel

RE: tiles and multipart messages

2005-07-12 Thread Durham David R Jr Ctr 805 CSPTS/SCE
> No, I don't have this problem for the moment! But, I might come across > it as the project progresses. Is there anything changing then? > In any case, thanks a lot for your help. Not really. I was just trying to figure out why the form was submitting to a JSP. - Dave ---

Re: problem with pdf fonts in jasper

2005-07-12 Thread Yahzz Yan
Would you please provide some detail information on "Fonts are installed" Grzegorz Stasica <[EMAIL PROTECTED]> wrote:hi, I know this question should be asked on jasperreports http://sourceforge.net/forum but after asking it seems that this group is dead. The problem is that I'm limited to stand

Re: synchronization strategies

2005-07-12 Thread ichy
hi, Yaroslav. i don't have any sample codes to post. but this is what i usually care. webapps i build are most of the time e-commerce apps and i have the same problem when a user submit the final order ( that is the transaction i need to protect ). there are two things i care. 1. i wanna prot

Re: Validation problem

2005-07-12 Thread Rick Reumann
Rafael Taboada wrote the following on 7/11/2005 6:28 PM: Thanks, I got it!... I needed to save the errors :) Rick Thanks for ur advice about using another class to manage JDBC... I'll review that... Do u know any samples about how to do that?.. Well typically I like to use the container mana

anyone else pass their ActionForm off to another layer

2005-07-12 Thread Rick Reumann
I was just replying to a post about keeping your Actions clean and doing the business logic in other classes. One thing I didn't bring up, though, because I'm not sure how 'best practice' it is, is the concept of passing your ActionForm and sometimes the HttpServletRequest off to another class

How do you iterate within an iterate

2005-07-12 Thread Harland, David
How would I replace the following with the iterate tag <% ArrayList bookings = (ArrayList)request.getAttribute(BOOKINGS); Iterator bookingsiterator = bookings.iterator(); while(bookingsiterator.hasNext()) { Bookings bo

RE: anyone else pass their ActionForm off to another layer

2005-07-12 Thread Durham David R Jr Ctr 805 CSPTS/SCE
> So what happens is the Action looks like... > > //EmployeeAction > execute(...) or dispatchmethod() { > EmployeForm empForm = (EmployeeForm)form; > //validate form, if success proceed.. > boolean success = EmployeeActionHelper.updateEmployee( > empForm, request ); > //messages

Re: New to Struts

2005-07-12 Thread [Gmail] LunLun
Hello, 1) can someone recommend me a good struts book and/or online tutorial to help me get started quickly. I found these two books interesting: Struts in Action http://www.manning.com/books/husted (the source code is available here: http://www.manning.com/books/husted/

Re: anyone else pass their ActionForm off to another layer

2005-07-12 Thread Borislav Sabev
Rick Reumann wrote: I was just replying to a post about keeping your Actions clean and doing the business logic in other classes. One thing I didn't bring up, though, because I'm not sure how 'best practice' it is, is the concept of passing your ActionForm and sometimes the HttpServletReques

Re: anyone else pass their ActionForm off to another layer

2005-07-12 Thread Hubert Rabago
To me, the presentation tier's main responsibility is to mediate between the user and business layer. Validation, forwarding, etc -- that's presentation tier logic that my business tier objects don't care about (usually). From the business tier's perspective, the meat is in the conversion between

Re: New to Struts

2005-07-12 Thread Frank W. Zammetti
O'Reilly's Programming Jakarta Struts: http://www.amazon.com/exec/obidos/tg/detail/-/0596006519/qid=1121184599/sr=1-1/ref=sr_1_1/103-6137202-1354222?v=glance&s=books Struts Survival Guide http://www.amazon.com/exec/obidos/tg/detail/-/0974848808/qid=1121184657/sr=8-1/ref=pd_bbs_ur_1/103-6137202-135

html:messages help

2005-07-12 Thread Ross Gibb
Hi, I am having trouble getting messages to display using the html:messages tag. I have tried to help myself and followed the struts docs but I can't seem to get this to work. The html:errors tag works fine. Here's what I am trying to do: I have an action that is trying to add a global me

RE: anyone else pass their ActionForm off to another layer

2005-07-12 Thread Barnett, Brian W.
Page 34 in Core J2EE Patterns 2nd Ed. talks about the problems related to exposing presentation-tier data structures to the business tier. The main problem this poses is that it increases the coupling between the tiers and reduces the reusability of the underlying services. Pages 80-83 discuss some

Re: How do you iterate within an iterate

2005-07-12 Thread Thai Dang Vu
I think it can be >>> [EMAIL PROTECTED] 7/12/2005 11:49:13 AM >>> How would I replace the following with the iterate tag <% ArrayList bookings = (ArrayList)request.getAttribute(BOOKINGS); Iterator bookingsiterator = bookings.iterator(); while(bo

Re: anyone else pass their ActionForm off to another layer

2005-07-12 Thread Hubert Rabago
I would be okay with this if I considered EmployeeActionHelper as presentation tier object. In fact, since this is getting an EmployeeForm object, I'd package it with the rest of my Struts classes (if that's how the package layout worked on the project). To me, EmployeeActionHelper wouldn't be an

packages in /WEB-INF/lib not seen by classes using reflection

2005-07-12 Thread Grzegorz Stasica
hi, In my application I use jasperreports which works fine on my computer but I've a problems to run them on production server. The problem is with compiling report definition. JasperReport uses some packages which are already in /WEB-INF/lib like (commons-collection.jar). Unfortuatelly it do

Re: problem with pdf fonts in jasper

2005-07-12 Thread Grzegorz Stasica
Grzegorz Stasica wrote: hi, I know this question should be asked on jasperreports http://sourceforge.net/forum but after asking it seems that this group is dead. The problem is that I'm limited to standard 14 fonts for PDF. Everytime I try to use different font in PDF the text is not displaye

Handling VOs

2005-07-12 Thread Brady Hegberg
Rick sent the example code below to an user earlier and I was just wondering. Would it be acceptable to generate the EmployeeVO using a constructor like: EmployeeVO emp = new EmployeeVO( eForm ); Would that be considered tying the view to the business layer? It seems like it would work nicely e

Re: Handling VOs

2005-07-12 Thread Frank W. Zammetti
I would say no, it's no more acceptable (acceptable being a relative term of course!). An EmployeeVO, presuming that is an object passed form the control layer to the model layer, still needs to know about something in the view layer, the ActionForm. Hence, it's not really any better. In reply t

Re: anyone else pass their ActionForm off to another layer

2005-07-12 Thread Michael Jouravlev
On 7/12/05, Rick Reumann <[EMAIL PROTECTED]> wrote: > I was just replying to a post about keeping your Actions clean and doing > the business logic in other classes. > > One thing I didn't bring up, though, because I'm not sure how 'best > practice' it is, is the concept of passing your ActionForm

Re: anyone else pass their ActionForm off to another layer

2005-07-12 Thread Borislav Sabev
Durham David R Jr Ctr 805 CSPTS/SCE wrote: So what happens is the Action looks like... //EmployeeAction execute(...) or dispatchmethod() { EmployeForm empForm = (EmployeeForm)form; //validate form, if success proceed.. boolean success = EmployeeActionHelper.updateEmployee( empFo

Re: html:messages help

2005-07-12 Thread Yan Hu
> > if (!messages.isEmpty()) > saveMessages(request, messages); use addMessages(). saveMessages has been deprecated. > > > > > You left out the "message" attribute. Set it to "true". ---

Re: Using struts forms as Value Objects: your opinion?

2005-07-12 Thread Laurie Harper
Michael Jouravlev wrote: /** * Flag that demo mode is on */ private boolean isDemo; public boolean getIsDemo() { ... } public setIsDemo(boolean isDemo) { ... } ... and my methods *would be commented in javadoc* too, it would be much better than current approach with lots of lines and comments

Re: Handling VOs

2005-07-12 Thread Brady Hegberg
And Rick already pointed out reasons it can be a bad idea to pass a map to a class that extracts the data because you end up with confusion about fields and lose type checking. So accepted best practice in this case is to have a method in your action that transfers the data from the form to the VO

Re: Handling VOs

2005-07-12 Thread Larry Meadors
I still do not see why putting your VO on your action form is a bad thing. 1) It gives you a super-easy way to map strings (bean.propName) 2) It gives you an easy way to perform string->type conversions 3) It does not couple your VO to your form 4) While it does couple your form to your VO, who c

Re: Handling VOs

2005-07-12 Thread Larry Meadors
On 7/12/05, Brady Hegberg <[EMAIL PROTECTED]> wrote: > So accepted best practice in this case is to have a method in your > action that transfers the data from the form to the VO, then pass the VO > off? IMO, this is sort of a waste if you can do it in the form by adding the VO to it, and handling

RE: Handling VOs

2005-07-12 Thread Nitish Kumar
well one of the reasons I can think of is that I have to change all my tags to tags, or use bean.prop as you suggested. (considering I am not using a view only JSP) Another one could be, I still need to keep the properties as String in ActionForm. VOs just acts as a nested formBean. (Read Crai

Re: Using struts forms as Value Objects: your opinion?

2005-07-12 Thread Rick Reumann
Borislav Sabev wrote the following on 7/12/2005 3:20 AM: In fact I'm a bit confused what exactly is the recommended design pattern in this case ... My conclusion is really to use Strings, Yes, you should use Strings in your ActionForms. Then you have your business object POJO with the corr

Re: Using struts forms as Value Objects: your opinion?

2005-07-12 Thread Rick Reumann
Durham David R Jr Ctr 805 CSPTS/SCE wrote the following on 7/12/2005 10:09 AM: Is it crucial for the Action Form to have String properties? Five years of history with Struts (and I should know, since I created it originally) says "yes" :-) I think it's reasonable to have a numeric type for

Re: Using struts forms as Value Objects: your opinion?

2005-07-12 Thread Rick Reumann
Rivka Shisman wrote the following on 7/12/2005 3:22 AM: I understand that you did not follow this thread from the beginning. As I mentioned before - when working with int, short, byte types - my app works fine. I don't get any runtime exception! I don't think you tried what Craig proposed. You

James Holmes

2005-07-12 Thread Access Denied
James' book, "Struts, The Complete Reference" (McGraw-Hill 2004) just arrived from Amazon. On the cover it states that he was Oracle's "Java Developer of the Year" for 2002. That's pretty cool! buddy - To unsubscribe, e-mail: [

Re: Using struts forms as Value Objects: your opinion?

2005-07-12 Thread Borislav Sabev
Rick Reumann wrote: Borislav Sabev wrote the following on 7/12/2005 3:20 AM: In fact I'm a bit confused what exactly is the recommended design pattern in this case ... My conclusion is really to use Strings, Yes, you should use Strings in your ActionForms. Then you have your business o

Re: Handling VOs

2005-07-12 Thread Dave Newton
Brady Hegberg wrote: EmployeeVO emp = new EmployeeVO( eForm ); Would that be considered tying the view to the business layer? It seems like it would work nicely especially since you could use polymorphism if you needed to generate VOs from other Forms (ie AnotherEmployeeActionForm). Yep, t

Re: Handling VOs

2005-07-12 Thread Frank W. Zammetti
On Tue, July 12, 2005 1:09 pm, Brady Hegberg said: > So accepted best practice in this case is to have a method in your > action that transfers the data from the form to the VO, then pass the VO > off? Not usually a separate method, just usually, a single line of code. But yes, that's the general

Spring on Struts

2005-07-12 Thread Access Denied
"Despite the seemingly endless barrage of Java-based MVC frameworks, Jakarta Struts is still the king of them all." Craig Walls and Ryan Breidenbach, "Spring In Action" (Manning 2005): 347. buddy :-) - To unsubscribe, e-mail: [E

Re: anyone else pass their ActionForm off to another layer

2005-07-12 Thread Rick Reumann
Durham David R Jr Ctr 805 CSPTS/SCE wrote the following on 7/12/2005 12:06 PM: Rick, I don't like it. :) Seriously, you've created a dependency on Struts in your business layer, and IMO, that's a big no-no. Well remember what really makes a "helper" a business layer component? I no longer

Re: Handling VOs

2005-07-12 Thread Dave Newton
Dave Newton wrote: Brady Hegberg wrote: EmployeeVO emp = new EmployeeVO( eForm ); Would that be considered tying the view to the business layer? It seems like it would work nicely especially since you could use polymorphism if you needed to generate VOs from other Forms (ie AnotherEmployeeAc

Re: Handling VOs

2005-07-12 Thread Frank W. Zammetti
On Tue, July 12, 2005 1:08 pm, Larry Meadors said: > I still do not see why putting your VO on your action form is a bad thing. > > 1) It gives you a super-easy way to map strings (bean.propName) I guess I'm not clear on this... are you talking about nesting the VO in the ActionForm, or are you ta

Re: anyone else pass their ActionForm off to another layer

2005-07-12 Thread Dave Newton
Rick Reumann wrote: For what it's worth, I found a way I can get around passing my ActionForm to another layer, but in theory, I'm not convinced that doing so would really mean that I'd be breaking the seperation of components. How so? If I have to include the Struts libraries to compile my

Tile question

2005-07-12 Thread john.mattucci
I'm new to tiles and I was wondering if this is possible. I have the following in my tiles definition files I would like to use definitions as ActionForwards My question would it be possible to include values to passed to ${TopMenu} and ${Footer} in of the action? T

Re: html:messages help

2005-07-12 Thread Ross Gibb
Hi, Thanks for the response, but no dice, still doesn't work. I changed the jsp to the following: I am using Struts 1.1 so I don't have access to addMessages(). Any other suggestions? Thanks, Ross Yan Hu wrote: if (!messages.isEmpty()) saveMessages(request, messa

Re: html:messages help

2005-07-12 Thread Yan Hu
Try the following... Don't forget to import struts-bean.tld <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> I think it is better to use struts-tags when possible since they were designed for Struts. - To

Re: anyone else pass their ActionForm off to another layer

2005-07-12 Thread Rick Reumann
Dave Newton wrote the following on 7/12/2005 1:57 PM: Rick Reumann wrote: For what it's worth, I found a way I can get around passing my ActionForm to another layer, but in theory, I'm not convinced that doing so would really mean that I'd be breaking the seperation of components. How so?

Re: Spring on Struts

2005-07-12 Thread Yan Hu
I believe one of the important reasons why Struts is still going strong after 5 years is that it is very efficient and has a relatively low learning curve than other component-based frameworks such as tapestry,JSF and so on. With tools such as Creator, JSF apps might be easy to start. But to wr

Re: html:messages help

2005-07-12 Thread Ross Gibb
Hi, Thanks again but still not working. I tried as you suggested. I don't think it is a problem with the tag anyway because when I look at what the browser gets I see And not Anyway, I will get the struts source and step through the html:messages code, perhaps there is som

Re: anyone else pass their ActionForm off to another layer

2005-07-12 Thread Van
On 7/12/05, Rick Reumann <[EMAIL PROTECTED]> wrote: > I was just replying to a post about keeping your Actions clean and doing > the business logic in other classes. > > One thing I didn't bring up, though, because I'm not sure how 'best > practice' it is, is the concept of passing your ActionForm

Re: anyone else pass their ActionForm off to another layer

2005-07-12 Thread Dave Newton
Rick Reumann wrote: Dave Newton wrote the following on 7/12/2005 1:57 PM: Rick Reumann wrote: For what it's worth, I found a way I can get around passing my ActionForm to another layer, but in theory, I'm not convinced that doing so would really mean that I'd be breaking the seperation of

Re: html:messages help

2005-07-12 Thread Brad Balmer
Any chance that you are missing the include for struts-html? <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> Granted I'm using 1.2, but I'm still using the saveMessages(request, messages) and using this to display messages and errors: footer="message.footer">

Re: anyone else pass their ActionForm off to another layer

2005-07-12 Thread Rick Reumann
Dave Newton wrote the following on 7/12/2005 2:50 PM: Of course not. But you just said that you're passing an ActionForm to another layer-- Yea, I just realized that was a bad choice of words- "layer" -- totally bad. I didn't really mean another layer in the sense of "view" "model", etc. I j

Re: anyone else pass their ActionForm off to another layer

2005-07-12 Thread Dave Newton
Rick Reumann wrote: Dave Newton wrote the following on 7/12/2005 2:50 PM: Of course not. But you just said that you're passing an ActionForm to another layer-- Yea, I just realized that was a bad choice of words- "layer" -- totally bad. I didn't really mean another layer in the sense of "vi

Re: anyone else pass their ActionForm off to another layer

2005-07-12 Thread Rick Reumann
Rick Reumann wrote the following on 7/12/2005 11:45 AM: One thing I didn't bring up, though, because I'm not sure how 'best practice' it is, is the concept of passing your ActionForm and sometimes the HttpServletRequest off to another class for some processing. Just realized, thanks to Dav

Re: html:messages help

2005-07-12 Thread Ross Gibb
This could be something. I do have the taglib definition but I am using the el version, so mine looks like this: <%@ taglib uri="http://jakarta.apache.org/struts/tags-html-el"; prefix="html"%> Would that make a difference? I will try it the other way. Brad Balmer wrote: Any chance tha

Parameterized messages

2005-07-12 Thread N G
Hi, Is it possible to use the resource properties for keys as well as args? For example, Properties: test.val1=hello {0} test.val2=world So, what I am trying to accomplish is to have the above statement output: hello world However, it outputs: hello test.val2 Is there a way to force it to lo

Re: Parameterized messages

2005-07-12 Thread Rick Reumann
N G wrote the following on 7/12/2005 4:14 PM: Hi, Is it possible to use the resource properties for keys as well as args? For example, Properties: test.val1=hello {0} test.val2=world So, what I am trying to accomplish is to have the above statement output: hello world However, it outputs: h

Re: html:messages help

2005-07-12 Thread Daniel Henrique Ferreira e Silva
Hi Ross, I know this maybe can't make any sense but i got this problem once due to some mistakes handling scopes. Let me explain: I had an Action instance that did some stuff and in case of errors, put them all in the request and forward to the next view. But my next view was a forward action (a

bean tag

2005-07-12 Thread temp temp
I would like to retrieve message from application Resources property file and save it into a bean in a jsp. writes to response . But I want this value to be saved in a bean in page scope can I do this. thanks & regards __

Re: Parameterized messages

2005-07-12 Thread Martin Gainty
I am unsure why you want to translate the key instead of translating the associated value.. But if your encoding scheme of the source files, destination files and the bundle files are specified I would suggest looking at ant's task at http://ant.apache.org/manual/OptionalTasks/translate.html A

Re: html:messages help

2005-07-12 Thread Ross Gibb
Hi Daniel, Ah yes, that was exactly it, thanks. It may have taken me a long time to figure that out. To save me even more time what was your solution? The global forward I am forwarding to looks like the following in struts-config.xml: I want to display a message at the top using h

Re: bean tag

2005-07-12 Thread Wendy Smoak
From: "temp temp" <[EMAIL PROTECTED]> > I would like to retrieve message from application > Resources property file and save it into a bean in a > jsp. > > writes to response . > But I want this value to be saved in a bean in page > scope can I do this. http://struts.apache.org/userGuide/strut

  1   2   >