How to toggle popup message (Delete Record / Delete Canceled)
589508Jul 23 2007 — edited Aug 1 2007Hello,
I am using the tableDeleteColumn template listed below and it works as advertised.
What is needed though is a way to check the state of the check box so that the first time a user selects the "delete checkbox" a pop-up states "Are you sure you want to delete this record" - Then if the user deselects the checkbox it should state "Delete Canceled".
What is the best way to do this and stay within the framework?
Thanks!
tableDeleteColumn.vm
## revision_history
## 06-feb-2007 Steven Davelaar
## 1.2 Added id property to checkbox item
## 30-sep-2006 JHeadstart Team
## 1.1 Revision history added, base version is 10.1.3.0.97 (SU1)
#if ($JHS.current.group.tableDeleteAllowed)
<af:column id="${JHS.current.group.shortName}DeleteColumn" headerText="#DELETE_COLUMN_HEADER()" formatType="icon">
<af:selectBooleanCheckbox binding="#{#COLLECTION_MODEL_BEAN().deleteCheckbox}"
id="deleteRow"
## ADDED
##onclick="return confirm('${JHS.nls("Are you sure you want to delete this row?", "CONFIRM_DELETE")}');"
## make it more specific for each group while keeping it generic
onclick="return confirm('${JHS.nls("Are you sure you want to delete this ${JHS.current.group.displayTitleSingular}?", "${JHS.current.group.name}_CONFIRM_DELETE")}');"
#JHS_PROP("rendered" ${JHS.current.group.deleteAllowedExpression}) />
</af:column>
#end