You need to sign in to do that
Don't have an account?
command button not displaying in inline edit mode for page block table
Hi,
I have a requirement where a pageblock table is being rendered based on the picklist value. And the values in the page block table are inline edited. Now my problem is when I try to do inline edit command buttons SAVE and CANCEL are not displaying . If I remove the pageblock rendering then i can see the command buttons. Please see below code
Visualforce Page:
<apex:actionRegion >
<apex:selectList value="{!selectedList}" size="1">
<apex:selectOptions value="{!listoptions}"/>
<apex:actionSupport event="onchange" reRender="Panel"/>
</apex:selectList>
</apex:actionRegion>
<apex:outputpanel id="Panel">
<apex:pageBlock rendered="{!selectedList == 'All Contacts'}">
<apex:pageBlockButtons >
<apex:commandButton action="{!saveme}" id="saveButton" value="Save" style="display: none;"/>
<apex:commandButton id="cancelButton" value="Cancel" style="display: none;"/>
</apex:pageBlockButtons>
<apex:pageBlockTable value="{!contact}" var="c" rows="50">
<apex:column headerValue="Job Title">
<apex:actionRegion >
<apex:outputField value="{!c.Title}">
<apex:inlineEditSupport event="ondblClick" showOnEdit="saveButton,cancelButton" />
</apex:outputField>
</apex:actionRegion>
</apex:column>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:outputpanel>
I am not sure hwre I am missing out. I have gone through many blogs but couldnt find a case for inline editing
Please help me out with this
Hi,
You should use rendered with a boolean variable and not any text value,
<apex:pageBlock rendered="{!selectedList == 'All Contacts'}"> your statement uses picklist value which isnt a boolaean(true false)
Try something like this,
IF(selectedList == 'All contacrt'), true,false
Thanks,
Well to add using rendered="{!selectedList == 'All Contacts'}" is perfectly ok. It will return boolean only
Try adding mode="inlineEdit " in your pageBlock. Check if this helps
Hi,
I tried adding inline edit to the page block even that is not working. I have no problem with page block rendering, but the save button not displaying in Inline edit mode.
If i remove style="display: none;" button display even when a field is not edited.
Thanks
Lavanya
I think style="display:none" is not requireds
Hi,
Thanks for your reply, I copy pasted the code which is in the URL link, even that code displays SAVE and Cancel button before inline-editing.
I could able to hide the save and cancel buttons (when I dint implement page rendering om my page). I donno where I am missing