You need to sign in to do that
Don't have an account?
docbill
DetailsEdit component
The following series of posts is an implementation of the idea:
https://sites.secure.force.com/success/ideaView?c=09a30000000D9xt&id=08730000000BrQtAAK
When viewing the text, the linewrap looks mangled, but it appears the code will cut & paste correctly back into eclipse. At some point in the future I'll probably offer this on the app exchange.
The following is an example of a visual force page for editing accounts with locked fields.
<apex:page standardController="Account">
<c:DetailsEdit value="{!account}" helpURL="/help/doc/user_ed.jsp?loc=help&target=account_edit.htm§ion=Accounts" save="{!save}" cancel="{!cancel}">
<apex:pageBlockSection columns="1">
<apex:repeat value="{!$ObjectType.Account.FieldSets.EditFields}" var="f">
<apex:inputField value="{!account[f]}" />
</apex:repeat>
<apex:repeat value="{!$ObjectType.Account.FieldSets.LockedFields}" var="f">
<apex:outputField value="{!account[f]}"/>
</apex:repeat>
</apex:pageBlockSection>
</c:DetailsEdit>
</apex:page>
DetailsEdit.component:
DetailsEditPageBodySections.component:
DetailEdit.resource:
DetailsEditController.cls:
DetailsEditControllerTest.cls:
Daniel
Looks like you are right. Here is the correct for for the DetailsEditControllerTest.cls:
Note: We decided not to use this in our organization, because we are worried what happens if salesforce changes the page format so that the javascript that formats the page suddenly stops working.