Dear Maxim,

As you advised regarding OM’s RPC calls, we found “hideActionsMenu” parameter in RoomWebService methods.


Below we have explained what we are trying to do, our logic and the issue we are facing. Could you please provide us a few pointers to solve them? Thank you.

------------

What we would like to achieve:
1) Reuse this "hideActions" flag to hide/show the Actions Menu on User Request (just like they ApplyForModeration). 2) Add the MathMenu as an optional via a new "hideMathMenu" parameter parallel to “hideActionsMenu”. 3) Be able to control the visibility of this new MathMenu via a flag attribute of canvas which is based on Moderator approval.

Our logic

These Web service methods:

addRoomWithModerationQuestionsAudioTypeAndHideOptions
updateRoomWithModerationQuestionsAudioTypeAndHideOptions

further call deeper back end classes as:
RoomWebServiceFacade.java  =>  RoomWebService.java  => RoomManager.java =>
 Room.java (Entity) => RoomDTO.java.

From these classes, we would add the new parameter in all these files,including getter/setter in last two.

Seeking your guidance
1. Should we create an attribute "canvas.currentRoomObj.hideMathMenu" and in which file
    (similar to "canvas.currentRoomObj.hideActionsMenu").


2. Where can it be assigned the currently desired/ approved value after moderator approves/denies a request from a specific user?

3. What is the correct way to refer to a Menu Dropdown (contained in the Menubar of Lz.canvas) from other classes of OpenLaszlo
     (or Java if possible)?

We tried to make its "visible" depend on "isAllowedToScreenShare", but it did not work:

  <class name="conferenceMathMenu" extends="view"
visible="${ canvas.currentRoomObj.hideActionsMenu ? false :

((classroot.viewType=='conference') ?

((canvas.ismoderator) ?true : canvas.isAllowedToScreenShare)) }" >


4. What is the correct file/ class whose method should update the value of this Flag to operate the hide/show of menu. Earlier we were changing moderationMiniIconsEventUserList. and participantListItem.lzx, but got errors

// Intended to affect only the current user (who applied for its use and got approved) canvas.currentRoomObj._conferencemenu._mathmenu.setAttribute( "visible", true );

It gave:
WARNING @modules/conference/participants/participantListItem.lzx˜191: reference to undefined property '_conferencemenu' ERROR @modules/conference/participants/participantListItem.lzx˜191: undefined object does not have a property '_mathmenu' WARNING @modules/conference/participants/participantListItem.lzx˜191: reference to undefined property '_mathmenu' ERROR @modules/conference/participants/participantListItem.lzx˜191: undefined object does not have a property 'setAttribute'


5. Do we need to add a parameter to ConferenceRoomLayoutOptions.xml like:
   Already existing:  hideActionsMenu
   Newly added: hideMathMenu

--

Regards,

Susheel Jalali

Web site:www.CoscendCommunications.com <http://www.CoscendCommunications.com>

-------------------------------------------------------------------

CONFIDENTIALITY NOTICE: See 'Confidentiality Notice Regarding E-mail Messages from Coscend Communications Solutions' posted at: http://www.CoscendCommunications.com/Terms_and_Conditions.html

------------------------------------------------------------------------

No virus found in this message.
Checked by AVG - www.avg.com <http://www.avg.com>
Version: 2015.0.6125 / Virus Database: 4409/10557 - Release Date: 09/01/15


On 08/31/15 14:43, Susheel Jalali wrote:

Dear Maxim,

Are you suggesting that we use RPC mechanism to moderate new menu items, and we need not modify the code in OpenLaszlo/ Java the way we have done.

Can we use your advised RPC mechanism (using Web services API ) to do the following: a. User requests moderator so as to see new menu items (e.g., Math Menu).
  b. Moderator allows / denies it.
c. User either sees the Menu appear, or gets a message it is not available to use (or greyed out). d. Moderator takes the moderation rights from the user. User cannot see the new menu item any more.

Would your suggestion / RPC method make calls into Web services methods only, or even into OpenLaszlo /Java / hibernate.

To help us learn about this method in OM context, would you point us towards the appropriate examples to review and implement?

We looked at RoomWebService and there is just one example related to menu (addRoom with hideTopBar option). The RoomWebService class (which invokes RoomManager and adds/ updates room via RoomDao calls) has methods taking booleans to enable/disable whiteboard but not the menu items. If we add such boolean for new meu item(s), which of these classes/methods should we modify.

1. Should we use one of these as an example to create a new "updateRoomInternalWithHideMenu()" ? 2. How would we refer to a Menu Dropdown (contained in the Menubar of Lz.canvas) from other classes of Java or OpenLaszlo?

For example, within LZX classes when we used:

// Intended to affect only the current user PRESENT MENU (who applied for its use and got approved) canvas.currentRoomObj._conferencemenu._present.setAttribute( "visible", true );

We get the following warnings/errors:

WARNING @modules/conference/participants/participantListItem.lzx˜191: reference to undefined property '_conferencemenu' ERROR @modules/conference/participants/participantListItem.lzx˜191: undefined object does not have a property '_present' WARNING @modules/conference/participants/participantListItem.lzx˜191: reference to undefined property '_present' ERROR @modules/conference/participants/participantListItem.lzx˜191: undefined object does not have a property 'setAttribute'

Sincerely,

Susheel Jalali

Web site:www.CoscendCommunications.com

------------------------------------------------------------------

CONFIDENTIALITY NOTICE: See 'Confidentiality Notice Regarding E-mail Messages from Coscend Communications Solutions' posted at: http://www.CoscendCommunications.com/Terms_and_Conditions.html

On 08/31/15 10:53, Maxim Solodovnik wrote:
I believe you can create your RPC method to enable/disable this feature
I would say there is no need to modify setRoomValues

On Thu, Aug 27, 2015 at 2:16 AM, Susheel Jalali <
[email protected]> wrote:

Dear Maxim,

We added a menu item (Math Tool) at the level 1 of Room Menu (same as Exit
button).  We would like moderator to moderate this menu item (make it
appear/ disappear) just like the moderator can do for Files menu.  We have
created a label ID in Application.properties.xml to serve as a tooltip for
requesting the menu item. We have created a flag attribute
"isAllowedMathMenu” that toggles appearing and disappearing of the menu
item.  We want to tie this to the visibility of the Math menu item.  When
audience requests moderator rights by clicking on our new icon resource
(mod_mathmenu.png), and is allowed by moderator (allowMathMenu), this
variable would get updated, thereby allowing the Math menu item to appear
(onisAllowedMathMenu) for the audience to use
(via conferenceMenuBar itemlist member's "visible" attribute).

(i) Do we need to define a new method in ScopeApplicationAdapter.java:
        applyForMathMenu and then call it via:
canvas.thishib.applyForMathMenu().  It may not be required.

(ii) Should we modify, the setRoomValues method?  If so, which one?
     // participants.lzx
      <netRemoteCallHib name="setRoomValues" funcname="setRoomValues"
or
      // mainMethods.lzx
      <method name="setRoomValues" args="roomTypeId,roomId,roomObj">


(iii) Should we define a method like:
canvas.thishib.applyForMathMenu.doCall();
      Accordingly, which method will run when moderator approves it, and in
that method we would do the following?

(a)  Trigger the Room / Menubar to display the new menu dropdown {{  How
?  }}

(b) Will updating its "visible" attribute trigger corresponding onvisible
method?
(c) Is it required to implement such "onvisible" method or is it
implicitly triggered?


Below are details
------------------

1.   // Application.properties.xml
  <entry key="1648">Get Math Tools</entry>

2.   In mainAttributes.lzx
     <attribute name="isAllowedMathMenu" value="false" type="boolean" />

It should update this to value TRUE when moderator approves the request
from a userwithout giving moderator rightsand also have the visibility of
the Math Menu be tied to this attribute.Should it be subordinate to
"canvas.currentRoomObj", similar to:
    canvas.currentRoomObj.hideActionsMenu ?

3.  A new icon button is created called: mod_mathmenu_btn.
     Also, define a new icon image holder called: mod_mathmenu_rsc
     Its icon image is called: mod_mathmenu.png.
     And stored in:
~/WebContent/src/modules/conference/flexibleConferenceRoom/resources

4.   Add new variable (*allowMathmenu*) to creation call of Moderation
Panel, in file:
*baseConferenceRoom.lzx

*// Near line 103
     new lz.moderationPanel(canvas._moderatormenu,{
         name:'_moderationPanel',align:'right',
*allowMathmenu*:this.roomobj.*allowMathmenu*,
         allowUserQuestions:this.roomobj.allowUserQuestions,
         roomName:this.roomobj.name
*
*5.   For canvas variable defined earlier, goto participants.lzx

<moderationMiniIconsEventUserList name="_applyAndStatusIcons" x="2" y="2" >
    <handler name="onismoderator" reference="canvas" args="m">
         this.updateIcons();
    </handler>
. . .
// Define here the “on” handler for that, so that it will be called
whenever its value changes:"onisAllowedMathMenu"

<handler name="onisAllowedMathMenu" reference="canvas" args="userObject">
           this.updateIcons();
     </handler>

6.  // moderationMiniIconsEventUserList.lzx

  <miniIconsNew name="mod_mathmenu_btn" y="6"
   innerResource="mod_mathmenu_rsc" width="16" height="16"
   visible="${ (canvas.isAllowedMathMenu) ? false : true  }"
showhandcursor="true">
   <handler name="onclick">
       // Now toggle back the state of miniIcon. Onclick would happen only
after it was visible
      this.visible=false;


        </handler>
    <labelTooltip inittwice="true" labelid="1648" />
</miniIconsNew>


7.     In conferenceMenuBar.lzx, inside the itemlist, the menu member's
"visible" attribute)


     <baseMenuMeetingsItem text="$once{ canvas.getLabelName(16XX) }"  . . .>

. . . .
                         visible="${ canvas.isAllowedMathMenu ?
((classroot.viewType=='conference') ? true : (canvas.ismoderator ? true :
false )) }"
    . . . .
</baseMenuMeetingsItem>


--

Regards,

Susheel Jalali

__

Web site:www.CoscendCommunications.com< http://www.coscendcommunications.com/>

------------------------------------------------------------------

CONFIDENTIALITY NOTICE: See 'Confidentiality Notice Regarding E-mail
Messages from Coscend Communications Solutions' posted at:
http://www.CoscendCommunications.com/Terms_and_Conditions.html  < 
http://www.coscendcommunications.com/Terms_and_Conditions.html>




Reply via email to