|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.internet2.middleware.grouper.ui.tags.GrouperUiFunctions
public class GrouperUiFunctions
EL functions
Constructor Summary | |
---|---|
GrouperUiFunctions()
|
Method Summary | |
---|---|
static String |
escapeJavascript(String input)
Escapes XML ( ampersand, lessthan, greater than, double quote), and single quote with slash |
static String |
hideShowButtonText(String hideShowName)
print out the button text for a hide show Each hide show has a name, and it should be unique in the app, so be explicit, below you see "hideShowName", that means whatever name you pick First add this css class to elements which should show when the state is show: shows_hideShowName Then add this to things which are in the opposite toggle state: hides_hideShowName Then add this to the button(s): buttons_hideShowName In the business logic, you must init the hide show before the JSP draws (this has name, text when shown, hidden, if show initially, and if store in session): GuiHideShow.init("simpleMembershipUpdateAdvanced", false, GrouperUiUtils.message("simpleMembershipUpdate.hideAdvancedOptionsButton"), GrouperUiUtils.message("simpleMembershipUpdate.showAdvancedOptionsButton"), true); Finally, use these EL functions to display the state correctly in JSP: Something that is hidden/shown style="${grouper:hideShowStyle('hideShowName', true)} Button text: ${grouper:hideShowButtonText('hideShowName')} In the button, use this onclick: onclick="return guiHideShow(event, 'hideShowName');" |
static String |
hideShowStyle(String hideShowName,
boolean showWhenShowing)
print out the style value for a hide show Each hide show has a name, and it should be unique in the app, so be explicit, below you see "hideShowName", that means whatever name you pick First add this css class to elements which should show when the state is show: shows_hideShowName Then add this to things which are in the opposite toggle state: hides_hideShowName Then add this to the button(s): buttons_hideShowName In the business logic, you must init the hide show before the JSP draws (this has name, text when shown, hidden, if show initially, and if store in session): GuiHideShow.init("simpleMembershipUpdateAdvanced", false, GrouperUiUtils.message("simpleMembershipUpdate.hideAdvancedOptionsButton"), GrouperUiUtils.message("simpleMembershipUpdate.showAdvancedOptionsButton"), true); Finally, use these EL functions to display the state correctly in JSP: Something that is hidden/shown style="${grouper:hideShowStyle('hideShowName', true)} Button text: ${grouper:hideShowButtonText('hideShowName')} In the button, use this onclick: onclick="return guiHideShow(event, 'hideShowName');" |
static String |
message(String key,
boolean escapeHtml,
boolean escapeSingleQuotes)
prints out a message, assumes it is there |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GrouperUiFunctions()
Method Detail |
---|
public static String escapeJavascript(String input)
input
-
public static String message(String key, boolean escapeHtml, boolean escapeSingleQuotes)
key
- escapeHtml
- (true to escape html)escapeSingleQuotes
- if escaping html, should we also escape single quotes?
public static String hideShowStyle(String hideShowName, boolean showWhenShowing)
print out the style value for a hide show Each hide show has a name, and it should be unique in the app, so be explicit, below you see "hideShowName", that means whatever name you pick First add this css class to elements which should show when the state is show: shows_hideShowName Then add this to things which are in the opposite toggle state: hides_hideShowName Then add this to the button(s): buttons_hideShowName In the business logic, you must init the hide show before the JSP draws (this has name, text when shown, hidden, if show initially, and if store in session): GuiHideShow.init("simpleMembershipUpdateAdvanced", false, GrouperUiUtils.message("simpleMembershipUpdate.hideAdvancedOptionsButton"), GrouperUiUtils.message("simpleMembershipUpdate.showAdvancedOptionsButton"), true); Finally, use these EL functions to display the state correctly in JSP: Something that is hidden/shown style="${grouper:hideShowStyle('hideShowName', true)} Button text: ${grouper:hideShowButtonText('hideShowName')} In the button, use this onclick: onclick="return guiHideShow(event, 'hideShowName');"
hideShowName
- showWhenShowing
- true if the section should show when the hide show is showing
public static String hideShowButtonText(String hideShowName)
print out the button text for a hide show Each hide show has a name, and it should be unique in the app, so be explicit, below you see "hideShowName", that means whatever name you pick First add this css class to elements which should show when the state is show: shows_hideShowName Then add this to things which are in the opposite toggle state: hides_hideShowName Then add this to the button(s): buttons_hideShowName In the business logic, you must init the hide show before the JSP draws (this has name, text when shown, hidden, if show initially, and if store in session): GuiHideShow.init("simpleMembershipUpdateAdvanced", false, GrouperUiUtils.message("simpleMembershipUpdate.hideAdvancedOptionsButton"), GrouperUiUtils.message("simpleMembershipUpdate.showAdvancedOptionsButton"), true); Finally, use these EL functions to display the state correctly in JSP: Something that is hidden/shown style="${grouper:hideShowStyle('hideShowName', true)} Button text: ${grouper:hideShowButtonText('hideShowName')} In the button, use this onclick: onclick="return guiHideShow(event, 'hideShowName');"
hideShowName
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |