function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
L037242283804838405L037242283804838405 

add text field

how to add a column to my table on a text field the user will fill the text field isnt bounded to any object and i want to transfer its data to controller
Phillip SouthernPhillip Southern
Hi, sounds like you want a text field to add to a table in visualforce for data input, but that text field is only relevant to the VF page and doesnt live on any object?

If thats the case, you need to create a wrapper class, which will be a class containing an object and then custom parameters with it like a boolean field for selecting it or text field for data input.  Here is a great reference and example regarding  wrapper classes:

http://wiki.developerforce.com/page/Wrapper_Class


Vamsi KrishnaVamsi Krishna
you can use the apex:inputText tag for this..
usually inputField is used to map to an object field thats stored in salesforce and inputText is used to map to a controller variable which is not persisted in an object..

check this link for more details on apex:inputText
https://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_inputText.htm
Chandra PrakashChandra Prakash
Hi ,
 please check below code if this code help full for you..

<apex:page standardController="Employe_bisp__c" sidebar="false">
<apex:form >
<apex:pageblock >
<apex:dataTable value="{!Employe_bisp__c}" var="emp1" border="2">
<apex:column >
  <apex:facet name="header">Name</apex:facet>
  <apex:inputField value="{!emp1.name}"  id="a1"/>
</apex:column>
<apex:column >
  <apex:facet name="header">Employee Salary</apex:facet>
     <apex:inputField value="{!emp1.Salary__c}" id="a2"/>
</apex:column>
<apex:column >
<apex:commandButton action="{!save}" value="Save"/>
</apex:column>
</apex:dataTable>
</apex:pageblock>
</apex:form>
</apex:page>

thanks..