if u want to to be able to set the value of "daysVac" in the form to that in
the bean then u will have to write a "get" and "set" methods for the same in
the bean and it will be done automatically for ya. Something like the
following :
public class MyBean {
private int m_daysVac = 0;
public void setDaysVac( int dv ) {
m_daysVac = dv;
}
public int getDaysVac() {
return m_daysVac;
}
//etc..etc
}
please not the First char of daysvac being capital the set/get methods.
Thats all that is to be done. U will not be required to setProperty.
Guru's correct me if i am wrong :)
Mayuresh
------------------------------------------------------------
Hi! Whenever I have something like this:
<input type="button" value="Calculate Workdays" onclick="daycalc();">
with the function defined below in Javascript:
function daycalc(){
document.myform.daysVac.value=document.applets[0].calcNoOfDays(document.myfo
rm.vacFrom.value,document.myform.vacTo.value);
}
Now whenever I submit, the 'daysVac' is not set in the bean although I have
a:
<jsp:setProperty name="mybean" property = "daysVac" />
It seems as if whenever I set values in my JSP, in the above way is not
captured in the request when I submit.
Can somebody out there help me?
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets