javascript event
Hi all If i have a text field (html:text) and a button submit(html:submit disabled="true") How can I make if i onfocus html:text, my html:submit disabled=false = == thx, a Java Student __ Do you Yahoo!? Yahoo! Tax Center - File online by April 15th http://taxes.yahoo.com/filing.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: javax.servlet.jsp.JspException: No getter method for property id of bean driver
Check all input object names (textfield, checkbox, select).. those names should be as your form bean attribute --- as as <[EMAIL PROTECTED]> wrote: > > HI > > I get the error belw: > > javax.servlet.jsp.JspException: No getter method for > property id of bean driver > > while the only variable "id" taht i am using is in > the line below in my jsp.. > > > > any clue why his error is coming > > Thanks a lot for the help, > > Sam > > > > > > > > - > Do you Yahoo!? > Yahoo! Tax Center - File online by April 15th = == thx, a Java Student __ Do you Yahoo!? Yahoo! Photos: High-quality 4x6 digital prints for 25¢ http://photos.yahoo.com/ph/print_splash - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:form
2 forms i assumed you use 2 diffrent actions. It wouldn't matter how many form you have as long as you set the action in your struts-config correctly. If you use 2 forms just imagine you have 2 diffrent pages, how you deal with it ? so its supposed to be same as you handle your multiform. --- as as <[EMAIL PROTECTED]> wrote: > > Hi > > Has anyone implemented two html:form in a same jsp.. > > I wish to do this to implement two tables.each table > displaying values in a row, of a bean... > > so there are two beans... > > for some reason, it gives me error saying it cnat > find getter for my second bean...though I did add > getters and setters for all attributes in my struts > form class. > > thanks in advance for the help, > > Sam > > > > - > Do you Yahoo!? > Yahoo! Tax Center - File online by April 15th = == thx, a Java Student __ Do you Yahoo!? Yahoo! Photos: High-quality 4x6 digital prints for 25¢ http://photos.yahoo.com/ph/print_splash - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: No getter method for property p of bean b - getP is public in b's super class
private attribute doesnt inherit to any child. Use protected or higher level. --- [EMAIL PROTECTED] wrote: > I have a bean class B, whose super class is A. > dealNumber is defined as private String in A, and it > has the following > getter/setter > public String getDealNumber() { > return dealNumber; > } > > public void setDealNumber(String dealNumber) { > this.dealNumber = dealNumber; > } > > Can this property be seen in if I use > it to write properties > of an object b of class B? > > In my JSP I set an instance of b to page context: > pageContext.setAttribute("CURR_TXN", b); > > Then I do: > scope="page"/> > > But I got this error: No getter method for property > dealNumber of bean > CURR_TXN > > I then tried to add this into B: > public String getDealNumber() { > return super.getDealNumber(); > } > > And then the error is gone... can anyone help to > explain why? > > Thanks. > > XU CHENG > > > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > = == thx, a Java Student __ Do you Yahoo!? Yahoo! Photos: High-quality 4x6 digital prints for 25¢ http://photos.yahoo.com/ph/print_splash - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem of ClassCastException when ArrayList to My own Class
Check if your Array list.size in actionForm isnt 0. And i suggest dont instantiate a new Array object in Form bean becoz when your setter method failed for some reason, when you do get you wont get any error becoz you create an empty ArrayList and it will be returned. Its better if you only declare or set it to null, so you will get exception when it return null. --- ganesh g <[EMAIL PROTECTED]> wrote: > Hi Friends, > ThanQ very much 4ur non-stop help towards me. > Here is a problem with Typecasting,throws > ClassCastException. > I'm not able get why it's getting.Bcoz i spent on > this problem around 2weeks. > i'm very thankful to u for ur solution. > > Problem of Area is as Follows: > > i've myown class called "FileProperties" > > Step:1 > > public class FileProperties > { > private long fileSize; > private Date fileDate; > private String filename; > private String filepath; > private String clientid; > ...some other > properties.. > > public FileProperties() > { > } > public String getFilename() > { > return filename; > } > public void setFilename(String filename) > { > this.filename = filename; > } > > public String getFilepath() > { > return filepath; > } > public void setFilepath(String filepath) > { >this.filepath = filepath; > } > ...some other getter/setter > methods. > } > > Step:2 > > In actionForm called mtActionForm i declared as > follows: > > public class MtActionForm extends ActionForm > { > private FileProperties singleFile; > private Collection mtJobsList=new ArrayList(); > ...some other > properties.. > > public Collection getMtJobsList() { > return mtJobsList; > } > public void setMtJobsList(Collection mtJobsList) { > this.mtJobsList = mtJobsList; > } > public FileProperties getSingleFile() > { > return singleFile; > } > public void setSingleFile(FileProperties > singleFile) > { > this.singleFile = singleFile; > } > > > > } > Now i'm showing u exact problem of Area > > Step:3 > > MtActionForm mtForm = (MtActionForm)actionForm; > String tempStr = > httpServletRequest.getParameter("fileIndex"); > int index = Integer.parseInt(tempStr); > ArrayList aList = > (ArrayList)mtForm.getMtJobsList();//No exception > Here > > FileProperties sFile =(FileProperties > )aList.get(index);//This is where > ClassCastException thrown > > mtForm.setSingleFile(sFile); > > Step:4 > > In Jsp i'm going to use as follows > > property="singleFile.filename"/> > > I'm eagerly awaiting your reply as soon as possible. > > Thanks & Regards > Ganesh > > > > - > Do you Yahoo!? > Yahoo! Photos: High-quality 4x6 digital prints for 25¢ = == thx, a Java Student __ Do you Yahoo!? Yahoo! Photos: High-quality 4x6 digital prints for 25¢ http://photos.yahoo.com/ph/print_splash - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem of ClassCastException .No doubt ArrayList has some size
If the size isnt 0, your ActionForm looks fine for me. I wonder your code in Action or any class when you put each FileProperties into a collection and set it to your form bean. --- ganesh g <[EMAIL PROTECTED]> wrote: > Hi Friends, > ThanQ very much 4ur non-stop help towards me. > Here is a problem with Typecasting,throws > ClassCastException. > I'm not able get why it's getting.Bcoz i spent on > this problem around > 2weeks. > i'm very thankful to u for ur solution. > > Problem of Area is as Follows: > > i've myown class called "FileProperties" > > Step:1 > > public class FileProperties > { > private long fileSize; > private Date fileDate; > private String filename; > private String filepath; > private String clientid; > ...some other > properties.. > > public FileProperties() > { > } > public String getFilename() > { > return filename; > } > public void setFilename(String filename) > { > this.filename = filename; > } > > public String getFilepath() > { > return filepath; > } > public void setFilepath(String filepath) > { >this.filepath = filepath; > } > ...some other getter/setter > methods. > } > > Step:2 > > In actionForm called mtActionForm i declared as > follows: > > public class MtActionForm extends ActionForm > { > private FileProperties singleFile; > private Collection mtJobsList=new ArrayList(); > ...some other > properties.. > > public Collection getMtJobsList() { > return mtJobsList; > } > public void setMtJobsList(Collection mtJobsList) { > this.mtJobsList = mtJobsList; > } > public FileProperties getSingleFile() > { > return singleFile; > } > public void setSingleFile(FileProperties > singleFile) > { > this.singleFile = singleFile; > } > > > > } > Now i'm showing u exact problem of Area > > Step:3 > > MtActionForm mtForm = (MtActionForm)actionForm; > String tempStr = > httpServletRequest.getParameter("fileIndex"); > int index = Integer.parseInt(tempStr); > ArrayList aList = > (ArrayList)mtForm.getMtJobsList();//No exception > Here > //aList is not null.It definitely some size > FileProperties sFile =(FileProperties > )(aList.get(index));//This is where > ClassCastException thrown > > mtForm.setSingleFile(sFile); > > Step:4 > > In Jsp i'm going to use as follows > > property="singleFile.filename"/> > > I'm eagerly awaiting your reply as soon as possible. > > Thanks & Regards > Ganesh > > > > > - > Do you Yahoo!? > Yahoo! Photos: High-quality 4x6 digital prints for 25¢ = == thx, a Java Student __ Do you Yahoo!? Yahoo! Photos: High-quality 4x6 digital prints for 25¢ http://photos.yahoo.com/ph/print_splash - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: No getter method for property p of bean b - getP is public in b's super class
I am sorry i read your question wrong.. i thought you directly accessed the parent attribute. *duh* Check if you have getter that return something in the parent. --- [EMAIL PROTECTED] wrote: > > Thanks. Just to confirm - you mean use a public > getter method does not > help? This is due to reflection? or Java Beans > property? > > XU CHENG > EXT: 8476 > DID: (65) 68898476 > > > > > > > JavaSoft > > > <[EMAIL PROTECTED]To: > Struts Users Mailing List > <[EMAIL PROTECTED]> > .com>cc: > > > > Subject: Re: No getter method for property p of > bean b - getP is public in b's super > 04/22/2004 05:52 > class > > PM > > > Please respond to > > > "Struts Users > > > Mailing List" > > > > > > > > > > > > > private attribute doesnt inherit to any child. Use > protected or higher level. > > --- [EMAIL PROTECTED] wrote: > > I have a bean class B, whose super class is A. > > dealNumber is defined as private String in A, and > it > > has the following > > getter/setter > > public String getDealNumber() { > > return dealNumber; > > } > > > > public void setDealNumber(String dealNumber) { > > this.dealNumber = dealNumber; > > } > > > > Can this property be seen in if I use > > it to write properties > > of an object b of class B? > > > > In my JSP I set an instance of b to page context: > > pageContext.setAttribute("CURR_TXN", b); > > > > Then I do: > > > scope="page"/> > > > > But I got this error: No getter method for > property > > dealNumber of bean > > CURR_TXN > > > > I then tried to add this into B: > > public String getDealNumber() { > > return super.getDealNumber(); > > } > > > > And then the error is gone... can anyone help to > > explain why? > > > > Thanks. > > > > XU CHENG > > > > > > > > > > > - > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > > > > = > == > thx, > a Java Student > > > > > __ > Do you Yahoo!? > Yahoo! Photos: High-quality 4x6 digital prints for > 25¢ > http://photos.yahoo.com/ph/print_splash > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > = == thx, a Java Student __ Do you Yahoo!? Yahoo! Photos: High-quality 4x6 digital prints for 25¢ http://photos.yahoo.com/ph/print_splash - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: No getter method for property p of bean b - getP is public in b's super class
After i checked the taglib class i found this: ** START // Call the indexed getter method if there is one if (descriptor instanceof IndexedPropertyDescriptor) { Method readMethod =((IndexedPropertyDescriptor) descriptor). getIndexedReadMethod(); if (readMethod != null) { Object subscript[] = new Object[1]; subscript[0] = new Integer(index); return (readMethod.invoke(bean, subscript)); } } // Otherwise, the underlying property must be an array Method readMethod = getReadMethod(descriptor); if (readMethod == null) throw new NoSuchMethodException("Property '" + name + "' has no getter method"); // Call the property getter and return the value Object value = readMethod.invoke(bean, new Object[0]); if (!value.getClass().isArray()) throw new IllegalArgumentException("Property '" + name + "' is not indexed"); return (Array.get(value, index)); * END*** It shows that the taglib will read the property of and check set/get method in your related ActionForm. If not it will check if its an Array, if still not it throws NoSuchMethodException("Property '" + name + "' has no getter method"); I didnt see it checks if your ActionForm has parent or not. it just check the ActionForm itself. But still i am not 100% sure coz the code line is too long for a late night. You may check by your self. = == thx, a Java Student __ Do you Yahoo!? Yahoo! Photos: High-quality 4x6 digital prints for 25¢ http://photos.yahoo.com/ph/print_splash - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]