[ANN] Easy Struts 0.6.4 > compatible Eclipse 2.1

2003-03-15 Thread Emmanuel Boudrant
Easy Struts 0.6.4 is available, now it's working with both Eclipse 2.0 and Eclipse 2.1. Here the changes logs : - Eclipse 2.1 Compatible (build with Eclipse 2.1 RC-1) - Improve XSLT errors management - Improve add Struts support operation - Struts config tree is now sorted - XML elements mes

BeanUtils.copyProperties between from and DAO issues

2003-03-15 Thread Dan Allen
I just wanted to see if I am working an uphill battle here or this is really the reality of the situation. I think you all might find this question particularly intriguing. Assume that my DAO (Data Access Object) is storing a list of ids which matches with a relationship. For example sake, it is

[Q] struts-template - I centralized the layout file, but am I missing something?

2003-03-15 Thread Jeff Smith
I have 3 different pages in my test app: Greet Unauthenticated User, Login and Greet Authenticated User There is a PageUnauthGreet.jsp, PageAuthGreet.jsp and PageLoginUser.jsp. Each has an identical structure: <%@ taglib uri='/tags/struts-template' prefix='template' %> The only differe

Re: [Q] Hierarchy display taglib?

2003-03-15 Thread Arron Bates
No taglib itself, but nested tags will allow the recursion to happen and thus make the tree. Try this... http://keyboardmonkey.com/pilotlight ...the "JSP Recursion & Trees!" part. It should do the trick. Arron. > Is there a taglib for presenting hierarchically defined content in a > JSP

RE: include struts pages within a struts page?

2003-03-15 Thread Thomas . Rimmele
> Hello everybody, > > Is it possible to include struts pages within a struts page? > > Example: > /showPage.do?pageId=1 shows a navigation. The user of the webpage never > looks at this page directly but he could. > > /showPage.do?pageId=10 shows the home page. Instead of including something

design concern

2003-03-15 Thread santhosh
Hello Everybody, I have one design concern. In our project we have ejb's. Now in some modules i have only the some sql quries to be executed based on the user search condition. here where should i prepare the sql queries. should i create in Action class or session bean. waiting for the re

Re: [Q] struts-template - I centralized the layout file, but am I missing something?

2003-03-15 Thread Dan Allen
Jeff Smith ([EMAIL PROTECTED]) wrote: > I have 3 different pages in my test app: > Greet Unauthenticated User, Login and Greet Authenticated User > > There is a PageUnauthGreet.jsp, PageAuthGreet.jsp and PageLoginUser.jsp. > Each has an identical structure: > > <%@ taglib uri='/tags/struts-temp

Re: Validator & Indexed Properties

2003-03-15 Thread Vic Cekvenich
It works fine for my clients with 2 diferent patches offered, on dev list a long time ago: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8798 and attached sollution on May of 2002, almost a year ago, you can search the dev list on the topic. Then there is a 2nd better patch that I kind o

Re: [Q] struts-template - I centralized the layout file, but am Imissing something?

2003-03-15 Thread James CE Johnson
Hi Jeff, I generally use Tiles to handle these kinds of things. In your struts-config.xml install the Tiles plugin: In your tiles-definitions.xml define your layout and other tiles: Back in struts-config your actions forwa

Re: BeanUtils.copyProperties between from and DAO issues

2003-03-15 Thread Vic Cekvenich
Write a util function link longString in here: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/basicportal/bP/WEB-INF/src/war/org/apache/scaffoldingLib/util/BUtil.java You can just say in bean: List l = getDAOx().getResult(); And now you have a list in you bean, populated by dao. .V Dan Allen wrot

max selected options

2003-03-15 Thread Dan Allen
Is there already a validation in place the checks that only a limited amount of indexed property items are selected? Consider either a multi-select box or an indexed set of input fields. I want to prevent the user (via manipulation of the form or just regular use) from being able to populate with

Re: BeanUtils.copyProperties between from and DAO issues

2003-03-15 Thread Dan Allen
Right, but I was hoping that perhaps it should do this conversion itself. Here's why. It doesn't make sense for my DAO to be talking about ids in string format, for that would be "out of character," catering to the view. There isn't a way (that I know of) to get the form to populate itself with

DynaActionForm - html:select example?

2003-03-15 Thread Becky Norum
Does anyone have an example of how to use a DynaActionForm form-property with a in the associated form? I'm a little confused - do I have to use a Map to represent the options? So I can't just hard-code them in the page? Thanks! Becky Norum [EMAIL PROTECTED] ---

DataSource references in Business Layer

2003-03-15 Thread Guido
Two simple questions. 1. I usally define all the datasources i need in struts-config.xml file. It is very easy, but how can I obtain a datasource reference in my business logic classes? I hate the idea of passing the reference to the business methods and I don't want to include all my business lo

[HK] DynaActionForm ?

2003-03-15 Thread harish krishnaswamy
In the following .jsp code, can modelBeans be a property array in a DynaActionForm (view2SubmitForm in this case) bean? I tried the above code, I don't get an error but the values entered in the text tag never makes it to ModelBean2 bean. Also, I see from the Bea

Re: DataSource references in Business Layer

2003-03-15 Thread Dan Allen
You will inherit a method from Action called getDataSource() which I think you should look into. There is a method in action for just about every handler you would need, including getResources() saveMessages() saveErrors() getDataSource() etc.. Check out the API docs for Action. Dan -- - - -

Re: DataSource references in Business Layer

2003-03-15 Thread David Graham
You can grab the datasource out of the ServletContext. Use JNDI or pass the DataSource to some ServiceFactory that your business layer can use. David From: Guido <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: DataSource references

how to pass the value from FormBean to custom tag

2003-03-15 Thread eizo umeda
hi I am having a trouble with developing a custom tag in struts. When I try to get a value which create in the FormBean, I could not pass to the value in my custom tag when an action "/test" is run. jsp is looks like this... <%@ taglib uri="/WEB-INF/customtag.tld" prefix="MyCustom" %>

Re: DataSource references in Business Layer

2003-03-15 Thread Guido
Thank you. I was searching in ActionServlet class instead of Action. Now the Eclipse IDE warning singal has disappear and I can sleep again :P On Sat, 15 Mar 2003, Dan Allen wrote: } You will inherit a method from Action called getDataSource() which I } think you should look into. There is a m

Re: BeanUtils.copyProperties between from and DAO issues

2003-03-15 Thread Vic Cekvenich
The FormBean can easily be populated by an array. "casting" is easy, and done once in a util function. beanUtils is usefull, but ... maybe not in this case. Maybe, I am just not getting you question, so someone else jump in. .V Dan Allen wrote: Right, but I was hoping that perhaps it should do thi

Re: BeanUtils.copyProperties between from and DAO issues

2003-03-15 Thread Dan Allen
> The FormBean can easily be populated by an array. > "casting" is easy, and done once in a util function. > beanUtils is usefull, but ... maybe not in this case. > Maybe, I am just not getting you question, so someone else jump in. Let me clarify. My business object has a signature public void

Re: DataSource references in Business Layer

2003-03-15 Thread Dan Allen
Guido ([EMAIL PROTECTED]) wrote: > Thank you. I was searching in ActionServlet class instead of Action. > > Now the Eclipse IDE warning singal has disappear and I can sleep again :P Can you sleep for me too? I have no time for that. Dan -- - - - - - - - - - - - - - - - - - - - - - - - - - -

concept: optional fields -> NULL

2003-03-15 Thread Dan Allen
Assume a form has a field like so Age: [ ] The user decided he/she is too bashful (or maybe just too old) to fill in the form and bypasses it, which we allow because people are wierd like that (by the way I am 25 and proud to be whatever age I am, but I am broke as a bank that just got robbed)

RE: BeanUtils.copyProperties between from and DAO issues

2003-03-15 Thread Ken & Connie
-Original Message- From: Dan Allen [mailto:[EMAIL PROTECTED] Sent: Saturday, March 15, 2003 9:14 AM To: Struts Users Mailing List Subject: Re: BeanUtils.copyProperties between from and DAO issues Right, but I was hoping that perhaps it should do this conversion itself. Here's why. It

nl2br taglib

2003-03-15 Thread Dan Allen
Are there any taglibs that have an attribute similar to filter="true" for the that would do nl2br="true" Users enter non-html text and when I display it I want to replace endline characters with html line break markups so that it preserves the whitespace. If not, I guess I will be learning how t

RE: BeanUtils.copyProperties between from and DAO issues

2003-03-15 Thread Khalid K.
If this is the case, I would think that org.apache.commons.beanutils.BeanUtils should be modified to do String[] to int[] conversion ??? Thati s my 2 cents :) Khalid -Original Message- From: Ken & Connie [mailto:[EMAIL PROTECTED] Sent: Saturday, March 15, 2003 1:03 PM To: Struts Users Ma

Re: BeanUtils.copyProperties between from and DAO issues

2003-03-15 Thread Dan Allen
Khalid K. ([EMAIL PROTECTED]) wrote: > If this is the case, I would think that > org.apache.commons.beanutils.BeanUtils should be modified to do String[] > to int[] conversion ??? > Thati s my 2 cents :) Thank you!! Me too. Okay, let's go with this! Devs? Also, when doing the conversion, any

Re: nl2br taglib

2003-03-15 Thread Anil Amarakoon
No such thing exists. May be you are already doing this on jsp. here we go.. <% myString.replace("\n",""); pageContext.setAttribute(""anyName",myString); %> .anil Dan Allen wrote: > Are there any taglibs that have an attribute similar to > filter="true" for the that would do nl2br="

Re: BeanUtils.copyProperties between from and DAO issues

2003-03-15 Thread Vic Cekvenich
I see where you were going: #1. Post a request for enhancement in bugzilla for commons.(which will CC commons-dev), not in Struts, and not in User. #2. Wait a while. #3. Give up waiting, and extend BennUtils to do what you need it to do. #4. Submit a enhancement code to BeanUtils bugzila, thu

Testing your Struts Application

2003-03-15 Thread Aaron O'Hara
Can anybody point out some good automated testing strategies for Struts-based applications? Ideally, I'd like to run automated tests that simulate an end user: 1) filling out a form and testing for success and expected failure 2) clicking on a url that brings up a result set I know I could unit t

Re: Testing your Struts Application

2003-03-15 Thread Jeff Kyser
several previous posts refer to this - might check it out: http://strutstestcase.sourceforge.net/ -jeff On Saturday, March 15, 2003, at 04:02 PM, Aaron O'Hara wrote: Can anybody point out some good automated testing strategies for Struts-based applications? Ideally, I'd like to run automated t

Re: nl2br taglib

2003-03-15 Thread Dan Allen
Anil Amarakoon ([EMAIL PROTECTED]) wrote: > No such thing exists. May be you are already doing this on jsp. here we > go.. > <% > myString.replace("\n",""); > pageContext.setAttribute(""anyName",myString); > %> > > > > .anil Fine, I'll write a custom taglib, because there is absolutel

Re: module name problem?

2003-03-15 Thread Eddie Bush
Have you tried it? It should work fine, AFAIK. I patched things some time ago now to properly process which module is being requested. The change was such that it would allow module names along the lines of what you're asking about. If in doubt; try it. If it doesn't work (and I really thin

Re: design concern

2003-03-15 Thread Dan Tran
According to Struts, every thing should go to action. It is a good habit consistent with MVC2 frameword/pattern. -Dan - Original Message - From: "santhosh" <[EMAIL PROTECTED]> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> Sent: Saturday, March 15, 2003 5:01 AM Subject: design conc

Re: design concern

2003-03-15 Thread David Graham
I have one design concern. In our project we have ejb's. Now in some modules i have only the some sql quries to be executed based on the user search condition. here where should i prepare the sql queries. should i create in Action class or session bean. Actions should never contain sql or busi

[Q] Accessing struts-tiles attribute in a bean?

2003-03-15 Thread Jeff Smith
James and Dan turned me on to tiles. I love them - as I love any tool that simplifies what I was already doing via brute force. :-) I feel I'm on the verge of a new level of understanding, but sadly, haven't quite crossed over. In my tiles structure, I want to have my pages get their titles from

Re: design concern

2003-03-15 Thread Dan Allen
David Graham ([EMAIL PROTECTED]) wrote: > >I have one design concern. In our project we have ejb's. Now in some > >modules i have only the some sql quries to be executed based on the user > >search condition. here where should i prepare the sql queries. should i > >create in Action class or

Collection-backed form properties solution

2003-03-15 Thread harish krishnaswamy
After spending quite sometime on the collection-backed form properties solution, I figured its worth mentioning the solution I dug out. I have to say that the documentation on this one is pretty sparse. Ok here we go... I have a jsp that needs to accept an order for items. This jsp has single-occu

Re: nl2br taglib

2003-03-15 Thread Dan Allen
Attached is a hacked version of WriteTag.java from the struts library to include a nl2br attribute which will convert "\n" to "" in the output. It was a pretty simple hack and you can just update your .tld file to include the java class net.creativerge.struts.taglib.bean.WriteTag and change your .

Re: nl2br taglib

2003-03-15 Thread Dan Allen
...see, I'm fading here...trial #2 Dan [WriteTag.java] package net.creativerge.struts.taglib.bean; import javax.servlet.jsp.JspException; import org.apache.struts.util.RequestUtils; import org.apache.struts.util.ResponseUtils; public class WriteTag extends org.apache.struts.taglib.bean.WriteT

Re: design concern

2003-03-15 Thread Dan Tran
oops, I misread the question. Please see the answers from both David and Dan Alen - Original Message - From: "Dan Tran" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Saturday, March 15, 2003 4:47 PM Subject: Re: design concern > According to Struts, every

Re: nl2br taglib

2003-03-15 Thread Arron Bates
Dan, I think that you may have better luck in a tag that doesn't actually extend or particularly work around the write tag, but simply filters the results of body content. That way your not just restricted to filering the content of a bean property. Markup would be like... whatever ...And in

RE:Select box in struts

2003-03-15 Thread Sreepuram, Preshanth
Hi all, I just need a help ,how to generate dynamically dropdown , when the options are in a hashtable r vector , please help me , send me the code which will be useful. help will be appreciated regards prahsanth - To unsubsc

Re: Select box in struts

2003-03-15 Thread Rick Reumann
On Sat, Mar 15,'03 (11:13 PM GMT-0500), Sreepuram, wrote: > I just need a help ,how to generate dynamically dropdown , when the > options are in a hashtable r vector , please help me , send me the > code which will be useful. There are tons of examples of this in the archives and in the documen

possible bug in html-el

2003-03-15 Thread Dan Allen
I swear I am going to lose my mind over this one. Same exact code on two different pages one using html and one using html-el taglib. If I use html-el, I get a jsp error that something is null in the page and I trace it back to the fact that it is looking running findAttribu

Re: possible bug in html-el

2003-03-15 Thread David M. Karr
> "Dan" == Dan Allen <[EMAIL PROTECTED]> writes: Dan> I swear I am going to lose my mind over this one. Same exact code Dan> on two different pages one using html and one using html-el taglib. Dan> Dan> Dan> Dan> Dan> Dan> If I use html-e