You need to sign in to do that
Don't have an account?

value binding with fields
Hi there,
i need a table with 4 columns and 3 rows with manual entry of data and i wrote a code like this
<apex:pageBlockSection title="EDUCATION">
<table border="1">
<tr>
<td>College/University</td>
<td>Year Granted</td>
<td>Degree Granted</td>
<td>Major</td>
</tr>
<tr>
<td><input type="text" value="{!e.College_University__c}"/></td>
<td><input type="text" value="{!e.Year_Granted__c}"/></td>
<td><input type="text" value="{!e.Degree_Granted__c}"/></td>
<td><input type="text" value="{!e.Major__c}"/></td>
</tr>
<tr>
<td><input type="text" value="{!e.College_University1__c}"/></td>
<td><input type="text" value="{!e.Year_Granted1__c}"/></td>
<td><input type="text" value="{!e.Degree_Granted1__c}"/></td>
<td><input type="text" value="{!e.Major1__c}"/></td>
</tr>
<tr>
<td><input type="text" value="{!e.College_University2__c}"/></td>
<td><input type="text" value="{!e.Year_Granted2__c}"/></td>
<td><input type="text" value="{!e.Degree_Granted2__c}"/></td>
<td><input type="text" value="{!e.Major2__c}"/></td>
</tr>
</table>
</apex:pageBlockSection>
i got a table with 3 empty rows,
now i need to bind these row values to fields in object,how can i do that can any one suggest me.
This is probably because you are inside a pageblocksection - try closing that before your table markup.
All Answers
Hi,
You can use <apex:inputField> instead of <apex:inputText> if you need to bind the values.
Let me know if it works for you!
Rather than using <input type="text" ..., use <apex:input> components - that will bind the input to the field in the sobject from the controller
E.g.
You'll also need to wrap all of the input elements in an <apex:form> component to allow postback of the values.
if am using inputfield i am again getting lable and textbox in a table row table structure is damaging.
This is probably because you are inside a pageblocksection - try closing that before your table markup.
No i have already tried inputfield its not working ...if possible suggest me anyother way of dng that.
Input field is the preferred way, as it will handle different types of input for you.
You do have the option to use <apex:inputText> components in the same way, but that will only allow you to input into a small text field:
Thanks for your co-operation my problem is solved its with pageblocksection only.
Thank you Very Much.