load data from db into form

2003-08-31 Thread Jiri Chaloupka
Hallo, what is the correct way to load data from db into form? I have some form: html:form action=/FinishRegister method=post focus=registerFull table border=0 tr tdbean:message key=register.name.Fullname /:/td tdhtml:text property=fullname //td /tr tr

Re: load data from db into form

2003-08-31 Thread Jiri Chaloupka
Yes, nested tags, I must look at ... so now I have it without nested, form definition is now without it. but still I got java.lang.IllegalArgumentException: No destination bean specified at org.apache.commons.beanutils.BeanUtils.copyProperties(BeanUtils.java:220) at

Re: Handling Exceptions

2003-08-31 Thread Yann Cébron
However, when a ServletException occurs, it does not go to the path defined in struts-config.xml. Somehow, the error is still showing in the application page and not in any one of the error pages defined. My guess is, the ServletException is happening someplace where Struts' ExceptionHandler

Re: dinamically add href into html:link

2003-08-31 Thread Jiri Chaloupka
Thanks, I used html-el and it works. what is the better to use, use c:url or html-el:link? Or it is equivalent here? And one more queestion: I have object with application persistency (over all sessions), and for session I call some method to set some parameter and get another object (array

Re: dinamically add href into html:link

2003-08-31 Thread Mark Lowe
opps... c:url value=${menuItem.link} c:out value=${menuItem.name} / /c:url is better On Sunday, August 31, 2003, at 05:02 PM, Mark Lowe wrote: The ideal way would be something like this. c:url url=${menuItem.link} c:out var=${menuItem.name}/ /c:url Cheers Mark On Sunday,

page field on DynaValidatorForm class

2003-08-31 Thread Erez Efrati
Hi, Do I need to include the declaration of a form-property name=page ... in a form of type DynaValidatorForm in the struts-config.xml? Thanks in advance, Erez - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: load data from db into form

2003-08-31 Thread Mark Lowe
Your from bean definition is the most useful thing you can provide to answer this.. if in your formBean definition or in the actionForm class you've got type form-property name=myprop type=com.whatever.ComplRegisterDTO / Then you're on the right lines.. But you're nesting so you jsp needs to

struts / tiles forward problems

2003-08-31 Thread Johannes Plachy
Hi, I am new to struts tiles and have several questions/problems That I am currently dealing with: 1) although a page ( say tiles.page ) is defined in my tiles-def.xml and referenced in my struts-config.xml like forward name=struts.page path=tiles.page / and action

Re: load data from db into form

2003-08-31 Thread Jiri Chaloupka
Thanks Mark I do not know if I understnad well. No I have in struts config: form-bean name=registerFull type=org.apache.struts.validator.DynaValidatorForm form-property name=prop type=cz.chalu.struts.modules.completeregister.ComplRegisterDTO / form-property name=id

Re: load data from db into form

2003-08-31 Thread Mark Lowe
Okay assuming the following.. form-bean name=registerFull type=org.apache.struts.validator.DynaValidatorForm form-property name=id type=java.lang.Integer / form-property name=fullname type=java.lang.String / form-property name=notify type=java.lang.Integer /

Re: getting at public static class constant field values in EL script

2003-08-31 Thread Adam Hardy
On 08/30/2003 06:42 PM James Mitchell wrote: You can take advantage of the Unstandard tags. This doesn't directly answer your question, but I'm sure you are smart enough to derive your answer from the following archived post on taglib-users from July: Unsure if JSTL 1.1 will allow this, but using

Re: dinamically add href into html:link

2003-08-31 Thread Mark Lowe
The ideal way would be something like this. c:url url=${menuItem.link} c:out var=${menuItem.name}/ /c:url Cheers Mark On Sunday, August 31, 2003, at 04:27 PM, Yann Cébron wrote: how I can do something as this: html:link action=${menuItem.link} c:out value=${menuItem.name} / ? Use the

dinamically add href into html:link

2003-08-31 Thread Jiri Chaloupka
Hallo, how I can do something as this: html:link action=${menuItem.link} c:out value=${menuItem.name} / ? I tried page (in manual I read that it canbe created dynamicaly, but it does not), action, href... it is still generated as a href=/apl/${menuItem.doHome/a instead of /apl/Index.do I

Re: [OT] jstl forEach problem

2003-08-31 Thread Johan
Solved. I added instead of a workDocument the collection workDocuments to my Arraylist. Just a typo Johan Johan wrote: Hi, I have a JSTL question and the answers in the archives don't solve the problem. So maybe one of you run into the problem ones I have an ArrayList containing Objects.

best practices for ActionForm flow control

2003-08-31 Thread Seyhan BASMACI (Internet Yazilimlari Yetkilisi)
When the actionForm validate method returns errors, struts direct the control to the jsp page specified in the input parameter of form mapping. is it possible to direct control to the action class in case of error inside the actionForm validate method without making extra coding effort, or

Re: dinamically add href into html:link

2003-08-31 Thread Vic Cekvenich
Are you able to use JSTL? I use JSTL for that. Jiri Chaloupka wrote: Hallo, how I can do something as this: html:link action=${menuItem.link} c:out value=${menuItem.name} / ? I tried page (in manual I read that it canbe created dynamicaly, but it does not), action, href... it is still generated

Handling Exceptions

2003-08-31 Thread Mohd Amin Mohd Din
Hi, In struts-config, I have defined few global-exceptions such as these exception type=com.enc.edu.pg.bo.common.DataAccessException key=exception.common.dataaccessexception path=/action/main/dataAccessExceptionSetup scope=session

Re: dinamically add href into html:link

2003-08-31 Thread Yann Cébron
how I can do something as this: html:link action=${menuItem.link} c:out value=${menuItem.name} / ? Use the EL-tags (look in the contrib/struts-el directory of the Struts 1.1 distribution), e.g. html-el:link action=${menuItem.link} .. .. /html-el:link HTH, Yann

Re: [OT] sslext java.lang.IllegalStateException: sendError() failed- data has already been sent to client

2003-08-31 Thread Adam Hardy
Hi Robert you seem to be fairly confident of the circumstances so I would suggest, barring any other response on this list (I'm sorry but I don't know enough to help any further), that you log this in bugzilla and / or post it to the struts-dev list. Good luck, Adam On 08/30/2003 07:03 PM

Re: load data from db into form

2003-08-31 Thread Adam Hardy
Hi guys, could be many whys, but it looks like your form bean is null. have you configured your struts-config mapping correctly to reference this form? You should also cast the form bean into the type of form class you have specified, since it is passed into the action as the super class

RE: dinamically add href into html:link

2003-08-31 Thread Carlos Sánchez
c:url is a standard tag from JSTL, so I think it's better to follow standards Maybe html:link will be deprecated in a near future. -Mensaje original- De: Jiri Chaloupka [mailto:[EMAIL PROTECTED] Enviado el: domingo, 31 de agosto de 2003 18:36 Para: Struts Users Mailing List Asunto:

Re: dinamically add href into html:link

2003-08-31 Thread Mark Lowe
If you've the choice use JSTL.. If you're using the expression language then use that. I like using the standard struts tags but that because there's no el. and after reading the faces stuff, i'm sold on using jstl. Although I'm not JSTL's biggest fan it does have a certain elegance of its

RE: load data from db into form

2003-08-31 Thread David Friedman
Jiri, Your error message explains the problem properly: No destination bean specified. This means that BeanUtils.copyProperties is trying to copy the registerDTO to a bean named 'form', which is null. This makes complete sense since your previous emails never tell us you've fixed your action.../

Re: load data from db into form

2003-08-31 Thread Mark Lowe
Okay forget the beanutils... form-property name=fullname type=java.lang.String / theForm.set(fullname,registerDTO.getFullname()); ..or form-property name=mybean type=cz.chalu.struts.modules.completeregister.ComplRegisterDTO / theForm.set(mybean, registerDTO); Hope this gets you there..

Getting IllegalStateException when URL is wrong struts can't finda mapping

2003-08-31 Thread Adam Hardy
When I type in the URL myself and make a spelling mistake, shouldn't I get a 404 error message saying this resource isn't available? At the moment I am getting the following 500 error java.lang.IllegalStateException at

Re: J2EE IDE

2003-08-31 Thread Michael Wever
This is nonsense. I use NetBeans 3.5.1 with j2sdk1.4.2, and I rarely restart it (manually or through a crash) more than one a week. Right now it has been running for over three weeks fine. The speed issue is relative, what is slow? NetBeans 3.5.x version was primarily improvements to performance

force caching staticJavascript.jsp

2003-08-31 Thread Adolfo Miguelez
Hi, as validator framework suggest, is possible to avoid downloading static functions for validation for every JSP, by creating the page: %@ page contentType=application/x-javascript % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % html:javascript dynamicJavascript=false

displaying collections after a validate() error

2003-08-31 Thread Graham Stark
Hi, could someone suggest what I'm doing wrong here? I've got a form with an associated ActionForm, several members of which are collections. I display them like this: logic:iterate property=domainRoles name=myForm id=domain tr class=dataTableHeader td align=leftc:out

Re: load data from db into form

2003-08-31 Thread Jiri Chaloupka
Thanks David, it looks bettre, you've right, this was a clear mistake :( this exception is not shown now, but now it is displayed blank page, only htmlbody/body/html Maybe, when action class is finished I must set some forward. now I have LoadDataService service = new LoadDataService();

RE: load data from db into form

2003-08-31 Thread David Friedman
Jiri, What action class does your action extend? If it is org.apache.struts.action.Action, then the parameter field, which you appear to have filled in with what seems to be a tiles definition, is ignored. The parameter field does nothing unless it is a subclass of Action, such as

Re: dinamically add href into html:link

2003-08-31 Thread Jiri Chaloupka
OK, thanks for your view. Maybe it will be better to rewrite it, until there is not much code... Jiri Mark Lowe wrote: If you've the choice use JSTL.. If you're using the expression language then use that. I like using the standard struts tags but that because there's no el. and after