Skip to content

Instantly share code, notes, and snippets.

@esaounkine
Created April 29, 2011 08:08
Show Gist options
  • Save esaounkine/948023 to your computer and use it in GitHub Desktop.
Save esaounkine/948023 to your computer and use it in GitHub Desktop.
add showPopupBehavior to an ADF Rich Faces table column - snippet
<table varstatus="rowStat" value="#{SchedulerBean.localCollectionModel}"
fetchsize="25" contentdelivery="immediate"
rows="#{SchedulerBean.localCollectionModel.rowCount}"
emptytext="#{msg.SCHED_EMPTY_TABLE}" rowselection="single" width="100%"
var="row" rowbandinginterval="0" binding="#{SchedulerBean.schedTable}"
id="schedTable">
<column headertext="#{msg.ACTIONS}" sortable="false"
inlinestyle="background-color:#{(not empty row[SchedulerBean.columns[6].label] and row[SchedulerBean.columns[6].label] eq 'RUNNING'? '#00ff00' :'')};"
width="#{set.ACTIONS_COLUMN_WIDTH}">
<panelformlayout rows="1">
<commandlink actionlistener="#{SchedulerBean.toggleStatus}"
id="toggleStatus">
<image source="/images/start.png"
rendered="#{empty row[SchedulerBean.columns[6].label] or row[SchedulerBean.columns[6].label] eq 'KILLED'}"/>
<image source="/images/stop.png"
rendered="#{not empty row[SchedulerBean.columns[6].label] and row[SchedulerBean.columns[6].label] eq 'RUNNING' or row[SchedulerBean.columns[6].label] eq 'ACTIVE'}"/>
</commandlink>
<commandlink>
<image source="/images/delete.png"/>
<showpopupbehavior popupid="deleteRow" triggertype="action"
align="startAfter"/>
</commandlink>
<popup id="deleteRow">
<dialog title="#{msg.CONFIRM_DELETE_POPUP_TITLE}"
dialoglistener="#{SchedulerBean.onDeleteConfirmation}">
<activeoutputtext value="#{msg.CONFIRM_DELETE_POPUP_MESSAGE}"/>
</dialog>
</popup>
</panelformlayout>
</column>
</table>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment