Popup Generation Issue in Groups Tab

20 views
Skip to first unread message

VIPUL jain

unread,
Jun 26, 2014, 7:31:48 AM6/26/14
to open...@googlegroups.com

Hi Team,

 

I am facing an issue regaring POP UP message.

Scenario is :

 

1. Login to admin, navigate to Groups Tab and click on coach link.

2. Select any group and after that from Left panel click on admininstrator link, then clik on members tab.

3. While trying add member/add members I am facing the issue:

                a. If we add any new member then it will add sucessfully.

                b. And when I try to add existing member (One or many), application will not allow us to do that, but no error message (either pop-up or in form of message) is there for the same.

               

                I found the exact location where validation in given i.e. in class BusinessGroupServiceImpl.java (line number 915), but not able to generate the popup

                code is:

 

private boolean addParticipant(Identity ureqIdentity, Roles ureqRoles, Identity identityToAdd, BusinessGroup group,

                     MailPackage mailing, List<BusinessGroupModifiedEvent.Deferred> events) {

             

              if(!securityManager.isIdentityInSecurityGroup(identityToAdd, group.getPartipiciantGroup())) {

                     boolean mustAccept = true;

                     if(ureqIdentity != null && ureqIdentity.equals(identityToAdd)) {

                           mustAccept = false;//adding itself, we hope that he knows what he makes

                     } else if(ureqRoles == null || ureqIdentity == null) {

                           mustAccept = false;//administrative task

                     } else {

                           mustAccept = groupModule.isAcceptMembership(ureqRoles);

                     }

                    

                     if(mustAccept) {

                           ResourceReservation olderReservation = reservationDao.loadReservation(identityToAdd, group.getResource());

                           if(olderReservation == null) {

                                  Calendar cal = Calendar.getInstance();

                                  cal.add(Calendar.MONTH, 6);

                                  Date expiration = cal.getTime();

                                  ResourceReservation reservation =

                                                reservationDao.createReservation(identityToAdd, "group_participant", expiration, group.getResource());

                                  if(reservation != null) {

                                         BusinessGroupMailing.sendEmail(ureqIdentity, identityToAdd, group, MailType.addParticipant, mailing);

                                  }

                           }

                     } else {

                           internalAddParticipant(ureqIdentity, identityToAdd, group, events);

                           BusinessGroupMailing.sendEmail(ureqIdentity, identityToAdd, group, MailType.addParticipant, mailing);

                     }

                     return true;

              }

              return false;

       }

 

 

From this I came to know that if member is new it will return True else False, but no error message when it return False.

Could you please let me know what needs to be done to obtain the desired pop-up message.

 

 

Regards,

Vipul Jain

Florian Gnägi

unread,
Jul 1, 2014, 2:38:13 AM7/1/14
to open...@googlegroups.com
Hi Vipul

Sorry, at this point in the code you don’t have access to the methods to show a popup. You can do this only in a controller where you have the window control object: 

getWindowControl().setError(string);

You can also use the setInfo or setWarning method accordingly. 

To show the popup you have to follow the code hierarchy up to the controller that calls this method and add the popup there. 

Cheers
Florian


--
--
Sie erhalten diese Nachricht, weil Sie Mitglied sind von Google
Groups-Gruppe "OpenOLAT".
Für das Erstellen von Beiträgen in dieser Gruppe senden Sie eine E-Mail
an open...@googlegroups.com
Um sich von dieser Gruppe abzumelden, senden Sie eine E-Mail an
openolat+u...@googlegroups.com
Weitere Optionen finden Sie in dieser Gruppe unter
http://groups.google.com/group/openolat?hl=de
-------------------------------------------------------------------------------------------------------------------
OpenOLAT - infinite learning - http://www.openolat.org

---
You received this message because you are subscribed to the Google Groups "OpenOLAT" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openolat+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--------------------------------------------------------------------
professional services for the e-learning system OpenOLAT and OLATpro
 hosting - operating - support - development - mobile - consulting
--------------------------------------------------------------------

frentix  GmbH
Florian Gnägi, Geschäftsführer
Hardturmstrasse 76
CH-8005 Zürich, Switzerland

skype:gnaegi  twitter:gnaegi  xing:Florian_Gnaegi 
--------------------------------------------------------------------















Reply all
Reply to author
Forward
0 new messages