Drop down population question

2004-04-30 Thread Basu, Abhijit (Abhi)
I am new to Struts and am having problems populating drop-downs from the database. I am actually getting a little frustrated with these tags, seems like no coding in java anymore. :) 1. ActionClass code excerpt: mBean.makeConnection(); //get country list vector

RE: Drop down population question

2004-04-30 Thread Basu, Abhijit (Abhi)
Sorry, this is the exception I get: javax.servlet.ServletException: Cannot find bean c in any scope -Original Message- From: Basu, Abhijit (Abhi) Sent: Friday, April 30, 2004 9:58 AM To: '[EMAIL PROTECTED]' Subject: Drop down population question I am new to

Action mapping mismatch

2004-04-30 Thread Samuel Rochas
Hello there, The link: http://project:8080/start.do shows me the page configured in struts-config.xml: forward name=success path=/foo_form.jsp/ This form contains a html:form tag which looks like that in the generated html page: form name=fooForm method=post action=/myAction.do onsubmit=return

Indexed properties working formbean-htmlform, not working htmlform-formbean

2004-04-30 Thread Berke, Wayne [IT]
I've been tearing my hair out trying to get indexed properties to work. Apparently, there is some correspondence between the HTML fields and the ActionForm indexed properties because when the ActionForm is initialized, it does correctly populate the default HTML form fields. However, when I

Re: How to create a custom tag which returns struts tag ?

2004-04-30 Thread Ludovic Bailly
Hi, Thanks for your response. I'm agree with you there must be a better approach :-) What I want to do is really simple. In a jsp page I want to display a collection of products. I've created a custom tag that takes a product object as parameter and display it using a velocity template. Each

RE: How to create a custom tag which returns struts tag ?

2004-04-30 Thread Marco Mistroni
Hi, Won\t logic:iterate help somewhere, along with tiles? Regards marco -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Ludovic Bailly Sent: 30 April 2004 15:54 To: [EMAIL PROTECTED] Subject: Re: How to create a custom tag which returns struts tag ?

Re: Hibernate and smart search

2004-04-30 Thread snpe
You don't understand me ( probably) I don't want set criteria for every class - I want features btw search, like load, find, save etc session.search(PermanentClass.class,BeanClass.class) for any PermanentClass and any BeanClass method search find properties in BeanClass like properties in

RE: Indexed properties working formbean-htmlform, not working ht mlform-formbean

2004-04-30 Thread Glenn, Scott
I think the id attribute on the iterate tag must match the getter on the get row (index) method of your form bean. For example I have:- logic:iterate id=rows name=RCF property=rows indexId=counter and my form bean is:- private List rows = null; public FormRow getRows (int

Re: Drop down population question

2004-04-30 Thread Samuel Rochas
Hello Abhi, request.setAttribute(lstCountry, v) So the bean with you list is lstCountry. JSP: html:select name=storeToBean property=storeToProperty html:options collection=lstCountry property=id labelProperty=name/ /html:select Explanation: -storeTo is the bean where to

RE: Drop down population question

2004-04-30 Thread Basu, Abhijit (Abhi)
Samuel: I am sorry, which one is the storeToBean and storeToProperty with reference to my example? The vector lstCountry contains CountryObject beans that have getters and setters for country_id and name. bean:define id=c name=c type=com.whatever.CountryObject/

Re: html:img define src dynamicly

2004-04-30 Thread Samuel Rochas
Hello there, I'vesolved it like this, using the bean tag inside the html src tag: img src=bean:write name='myBean' property='myProperty'/ width=100 height=74 Sincerly Samuel --- andinasoft SA - Software y Consulting --- Mariano Aguilera 276 y Almagro - Quito, Ecuador Tel. +593 2 290 55 18

[OT] log per session

2004-04-30 Thread Chiming Huang
Hi, Is it practical to have a log file created per sessoin? I am using log4j 1.2.8. It logs all messages to one log file. What is your suggestion? Thanks, Chiming __ Do you Yahoo!? Win a $20,000 Career Makeover at Yahoo! HotJobs

Re: Drop down population question

2004-04-30 Thread Samuel Rochas
Hello Abhi, I am sorry, which one is the storeToBean and storeToProperty with reference to my example? I can't say, cause your example show me only the code in the JSP. Think about where do you want to store the object selected in your option. I assume it is in a bean in which you'll store the

How to iterate a bean's list of String in a JSP

2004-04-30 Thread Francois Boccou
Hello, I have a problem displaying on my jsp pages a list of String that is part of my bean. Here is my bean: myBean { ArrayList toto; //of type String } here is my JSP: nested:iterate name=myBean property=toto + bean:write property=this/ /br /nested:iterate This doesn't work, I miss

RE: ArrayList and DynaActionForm--ISSUE TRACKED DOWN--NEED HELP

2004-04-30 Thread Mathew, Manoj
Little more input to the issue.It's working when i have this . So that mean that the lazyList trick is not working for some reason.see the commented codes public class myTestForm extends DynaActionForm { public void reset(ActionMapping mapping, HttpServletRequest request) {

RE: Indexed properties working formbean-htmlform, not working htmlform-formbean

2004-04-30 Thread Berke, Wayne [IT]
Scott, That was it. Thanks a bunch. One thing I don't understand though. If the setProperty for the BeanUtils couldn't find an appropriate setter (which it couldn't until I declared setIsf() in the form), shouldn't it have squawked about it with TRACE level logging? Wayne -Original

Re: How to iterate a bean's list of String in a JSP

2004-04-30 Thread Irfandhy Franciscus
Hi try adding this method in your ActionForm: public String getToto(int i) { return (String)toto.get(i); } The struts logic:iterate will automatically pass in an index value to the method in order to get the object inside the Array. Hope this works Francois Boccou wrote: Hello, I have

Can I specify DynaFormProperties at Run Time

2004-04-30 Thread Steve Lewis
Given that the Dynaform is dynamic I am wondering why I need to declare a dynaform and list its properties in struts-config. I would prefer to have my action populate a form adding properties that it knows without having to declare the form in struts-config. 1) Is this possible 2) If so how do

Re: [SOLVED] Indexed Properties Validation - SF/SV Struts presntation next week

2004-04-30 Thread Vic Cekvenich
://jroller.com/page/netsql2/20040430#more_struts_sites This way I spam the list less. Also, I will post my trainings on here: http://groups.yahoo.com/group/RIA_CMS/links .V Amin Lalji wrote: For anybody who might be interested in a solution: After some considerable research and wheel spinning, I

null shows in html:errors tag

2004-04-30 Thread Billy Ng
I am using the html:errors / for displaying the error messages. In the properties file, I have the following entry ApplicationResources.properties == error.emptyUserid=#8226; Please enter a username.br/ In the HTML, it shows the null in the beginning and end. Why? Please

Re: Array Validation

2004-04-30 Thread Niall Pemberton
To make this kind of feature useful there needs to be some way of indicating which occurance of the indexed property is in error. So, for example, if you had a bunch of order beans and were validating the order value I would want to be able to output a message along the lines of... Order

Re: Array (or List, or Map) Validation

2004-04-30 Thread Domingo A. Rodriguez S.
my problem.. I have a list-backed actionform... That list can have more than one locationObject javabean... The locationObject javabean has some fields, including an errorFormat field.. That errorFormat field can be set using a mutator method from the javabean called

Re: Array (or List, or Map) Validation

2004-04-30 Thread Niall Pemberton
My solution to highlight error fields was to create a custom html:text tag which checks if the property associated with the tag has an error in the ActionErrors object - other than the tag I use the standard struts validation - nothing extra required in the Actions. Source code is here:

Re: Remembering form values across requests

2004-04-30 Thread Riyad Kalla
Hmmm I would think that html:reset would tie into the Form.reset() method, but you said you are using a DynaForm so I'm not sure how that would work (I hard code all my forms because I like wasting time :) Michael Weaver wrote: I am new to Struts and have tried to used a DynaActionForm to hold