Skip to Content.
Sympa Menu

grouper-dev - RE: [grouper-dev] https://spaces.at.internet2.edu/display/Grouper/Grouper+hook+which+adds+link+to+UI

Subject: Grouper Developers Forum

List archive

RE: [grouper-dev] https://spaces.at.internet2.edu/display/Grouper/Grouper+hook+which+adds+link+to+UI


Chronological Thread 
  • From: "Black, Carey M." <>
  • To: "Hyzer, Chris" <>, "" <>
  • Subject: RE: [grouper-dev] https://spaces.at.internet2.edu/display/Grouper/Grouper+hook+which+adds+link+to+UI
  • Date: Mon, 15 Apr 2019 20:19:06 +0000

Chris,

 

As usual, ( your magic ) > ( my magic ) .

                I tested your changes, and they work for me. 😊

                Thank you. I now have message that follow the rest of the UI message pattern!

 

 

And I am starting to think that I might want my "auto removing messages" and other "sticky messages" too. [ "Cake and eat it too" problem. ]  So I might be injecting a custom div somewhere else in the UI to append message to as well. 😊   ( You know that you are creating a monster right? 😊  )

 

 

 

I plan on using my own custom GrouperUiHookShim class.

                Is it your intention for deployers to use that specific class name or make up their own?

 

 

FWIW: I am planning on adding more features in my version.

                                Support for different message types:

                                                AlertPrimary¸

                                                AlertSuccess,

                                                AlertError,

                                                AlertInfo ( to start with.)

                                I added an enum "MessageTypes" in the class to support mapping to methods to produce the output by type.

 

                Then I enhanced the signature of the method in my hook class to "public static void addMessageToScreen(MessageTypes type, String message)" and the reflection used the enum to get the method name to call based on the MessageTypes value.  ( GrouperUtil.callMethod(grouperUiHookShimClass, type.getMethodName(), GrouperUtil.toSet(String.class), GrouperUtil.toSet(message)); )

 

I might even get "crazy enough" to support more dynamic HTML control from the hook too. ( Time will tell.)

 

Thank you again. This is a good start on what I am after.

 

 

 

I would love to see a "sample/simple base class" included in the UI and the JS changes added to the UI as a minimum. ( a patch in 2.4 would be fine. ) Just to avoid "patching issue" on the JS side. 😊

 

--

Carey Matthew

 

-----Original Message-----
From: Hyzer, Chris <>
Sent: Monday, April 15, 2019 10:52 AM
To: Black, Carey M. <>;
Subject: RE: https://spaces.at.internet2.edu/display/Grouper/Grouper+hook+which+adds+link+to+UI

 

You said you wanted a message to display, you didn’t mention you wanted it to go away 😊

 

The only thing I can think of involves a small tweak to Grouper... and a tweak to the wiki (see that).  Want to try it and let me know if you want me to make a 2.4 patch for that 😊

 

Thanks

Chris

 

grouperUi.js:

 

FROM:

function guiV2link(url, options) {

 

  if (typeof options == 'undefined') {

 

TO:

function guiV2link(url, options) {

 

  $('.messaging').hide().empty();

 

  if (typeof options == 'undefined') {

 

#################################################

 

FROM:

function guiProcessUrlForAjax(url) {

 

  //clear the error div...

  $('#messaging').hide().empty();

 

TO:

function guiProcessUrlForAjax(url) {

 

  //clear the error div(2)...

  $('#messaging').hide().empty();

  $('.messaging').hide().empty();

 

 

 

 

-----Original Message-----

From: <> On Behalf Of Black, Carey M.

Sent: Monday, April 15, 2019 12:58 AM

To:

Subject: RE: [grouper-dev] https://spaces.at.internet2.edu/display/Grouper/Grouper+hook+which+adds+link+to+UI

 

I have the example working.

 

However, as documented any custom messages are not "removed from the page" the way the default "status message" is removed.

 

If a hook sends, 3 messages, and there is a 4th "Success" message from the system displayed. When a user navigates away to a different folder ( ... etc ) the 4th message is removed, but the other 3 remain until the user closes them.

 

Is there a way to have the removal of the "system message" also remove any additional messages?

 

I suspect this could be solved in a few ways, but I really don't know which would be more "preferred". :)

 

 

 

--

Carey Matthew Black

Office of the Chief Information Officer (OCIO)




Archive powered by MHonArc 2.6.19.

Top of Page