You need to sign in to do that
Don't have an account?
werewolf
Using merge fields on id attributes of input components
Hi all,
This simple question has got me stumped. My offending snippet is:
<apex:dataTable id="itemlist" value="{!sortedChecklistItems}" var="Item">
<apex:facet name="header"><b>Checkbox</b></apex:facet>
<apex:inputCheckbox id="{!Item.Id}" value="{!Item.Checkbox__c}" disabled="{!Item.Not_Available__c}" />
</apex:column>
</apex:dataTable>
Unfortunately the id attribute is giving me trouble. When I try to save this I get:
Save error: Unknown property 'Checklist__cStandardController.Item'
But when I remove the id attribute it all works fine, showing clearly that the Item property is perfectly valid, since I'm also using it in the value attribute.
Is there something about the id attribute that acts differently from the other attributes? Can I not use a merge field in that? If not, how else can I ensure that each input item in my table gets a predictably unique ID? Thanks.
Message Edited by werewolf on 01-08-2009 10:37 AM
This simple question has got me stumped. My offending snippet is:
<apex:dataTable id="itemlist" value="{!sortedChecklistItems}" var="Item">
<apex:facet name="header"><b>Checkbox</b></apex:facet>
<apex:inputCheckbox id="{!Item.Id}" value="{!Item.Checkbox__c}" disabled="{!Item.Not_Available__c}" />
</apex:column>
</apex:dataTable>
Unfortunately the id attribute is giving me trouble. When I try to save this I get:
Save error: Unknown property 'Checklist__cStandardController.Item'
But when I remove the id attribute it all works fine, showing clearly that the Item property is perfectly valid, since I'm also using it in the value attribute.
Is there something about the id attribute that acts differently from the other attributes? Can I not use a merge field in that? If not, how else can I ensure that each input item in my table gets a predictably unique ID? Thanks.
Message Edited by werewolf on 01-08-2009 10:37 AM
Useful documentation:
http://www.salesforce.com/us/developer/docs/pages/Content/pages_access.htm
All Answers
Useful documentation:
http://www.salesforce.com/us/developer/docs/pages/Content/pages_access.htm
Can you please provide an example of your corrected code? I am new to Visualforce and am grappling with the same problem. Any help would be greatly appreciated.
Paul