You need to sign in to do that
Don't have an account?
Sure@Dream
Literal Value is Required for attribute id in <apex:outputpanel>
Hi All,
I am having visualforce code like following:
I want to provide a dynamic id to the outputpanel and want to rerender particular outputpanel alone onclick of a commandLink as shown.
<apex:repeat value="{!listOfRecords}" var="rec">
<apex:outputpanel id="{!rec.Id}">
<apex:commandLink rerender="{!rec.Id}" ......../>
</apex:outputpanel>
</apex:repeat>
Its giving me following error, if i try to keep {!rec.Id} as the id for outputpanel:
"Literal Value is Required for attribute id in <apex:outputpanel>"
And If I give {!rec.Id} as rerender attribute for CommandLink, its giving following error:
Unknown property rec
Could you guys please help me to solve this or by providing any work arounds?
Thanks in advance:)
I am having visualforce code like following:
I want to provide a dynamic id to the outputpanel and want to rerender particular outputpanel alone onclick of a commandLink as shown.
<apex:repeat value="{!listOfRecords}" var="rec">
<apex:outputpanel id="{!rec.Id}">
<apex:commandLink rerender="{!rec.Id}" ......../>
</apex:outputpanel>
</apex:repeat>
Its giving me following error, if i try to keep {!rec.Id} as the id for outputpanel:
"Literal Value is Required for attribute id in <apex:outputpanel>"
And If I give {!rec.Id} as rerender attribute for CommandLink, its giving following error:
Unknown property rec
Could you guys please help me to solve this or by providing any work arounds?
Thanks in advance:)
I am able to solve this by doing as follows:
<apex:repeat value="{!listOfRecords}" var="rec">
<apex:outputpanel id="panelId">
<apex:commandLink rerender="panelId" ......../>
</apex:outputpanel>
</apex:repeat>
No need to use dynamic ids for this.
All Answers
I am able to solve this by doing as follows:
<apex:repeat value="{!listOfRecords}" var="rec">
<apex:outputpanel id="panelId">
<apex:commandLink rerender="panelId" ......../>
</apex:outputpanel>
</apex:repeat>
No need to use dynamic ids for this.