Hi,
I have already tested it but without success :/
when I use
<INPUT TYPE="text" NAME="payment_method" VALUE="<jsp:getProperty
name="contract" property="payment_method" />" >
it displays nothing in my textedit
but when I use directly contract.payment_method, it works !!!
Any ideas ? ;)
Thierry
-----Message d'origine-----
De : Rishabh Agarwal [mailto:[EMAIL PROTECTED]]
Envoy� : jeudi 26 avril 2001 8:51
� : [EMAIL PROTECTED]
Objet : Re: Difference between bean.field and <jsp:getProperty
name="bean " property="field" />
U have the method as getPayment_method(). U have to use:
<INPUT TYPE="text" NAME="payment_method" VALUE=
"<jsp:getProperty
name="contract" property="Payment_method" />" >
to get the correct value. Lemme know if it doesn't work.
Rishabh.
-----Original Message-----
From: BERWART Thierry
[mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 26, 2001 2:27 PM
To: [EMAIL PROTECTED]
Subject: Difference between bean.field and
<jsp:getProperty name="bean" property="field" />
Hello,
I have a JSP page and a bean.
When I want to display some fields of this bean for
editing,
I used this :
<INPUT TYPE="text" NAME="payment_method" VALUE=
"<jsp:getProperty
name="contract" property="payment_method" />" >
but it display nothing as if "payment_method" is null or
is
"".
I change this code with this :
<INPUT TYPE="text" NAME="payment_method" VALUE= "<%=
(contract.payment_method != null) ?
contract.payment_method
: "" %>"
SIZE=30 MAXLENGTH=40>
and it's working !!! it displays the value of the
"payment_method" field
Do you have an idea ?
What is better to use ? bean.field or <jsp:getProperty
....
???
Thanks you
Thierry
PS :
A part of my bean :
public class Contract {
//attributes
private StringBuffer error_message = null;
public Integer contract_id;
.....
public String payment_method;
.....
public String getPayment_method()
{
return payment_method;
}
public void setPayment_method(String
newPayment_method)
{
payment_method = newPayment_method;
}
========================================================================
===
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