Menus for web client

Using Servoy to administrate the content of your website? Discuss all webrelated Servoy topics on this forum!

Menus for web client

Postby markhooper » Sat Jan 31, 2009 12:05 am

Do the built-in 'plugins' for menu work in web client ? I have a strong suspicion that they don't.

For anyone who has built a 'standard' menu like: File, Edit, View, Help, etc for web client what did you do ?

Thanks in advance
markhooper
 
Posts: 84
Joined: Fri May 30, 2008 7:28 pm
Location: Canada

Re: Menus for web client

Postby Gary R. Schaecher » Sat Jan 31, 2009 12:57 am

We strung a bunch of popup menus across the top in a form that pretends its a tool bar. Looks kind of lousy, is sluggish as hell, but its the only thing Servoy offers at this time.

If they wan t to really compete with .NET I hope they fix this deficiency some day.

Gary
Gary R. Schaecher
TMA Systems, LLC
www.tmasystems.com
Gary R. Schaecher
 
Posts: 72
Joined: Sat Jan 06, 2007 11:01 pm

Re: Menus for web client

Postby markhooper » Sat Jan 31, 2009 1:39 am

Thanks for your reply Gary.

I tried the 'popupmenu' plugin and I can get a simple popmenu to appear.
However, a couple of things don't work.
1) the createCheckboxMenuItem doesn't paint me a checkbox (no biggie cause I really don't need one at the moment)
2) the createRadioButtonMenuItem doesn't paint me a radio button (no biggie cause I really don't need one at the moment)
3) the 'enabled' property doesn't get rendered (i.e. if I set a menu item's ".setEnabled(false)" I still see the item normally in web client - it does work correctly in Smart Client... but I'm not interested in Smart Client.

Here's a snippet of code (its really ugly but this is just a test mule at this point). The popupMenuSetup() method is involved for the 'onAction' event of a label I've placed at the top of one of my forms.

Code: Select all
function popupMenuSetup()
{
  var menu = new Array(
  plugins.popupmenu.createMenuItem('A', junk1),
  plugins.popupmenu.createMenuItem('-'),
  plugins.popupmenu.createCheckboxMenuItem('B',junk2),
  plugins.popupmenu.createRadioButtonMenuItem('C',junk3), 
  plugins.popupmenu.createMenuItem('<html><b>Hello</b></html>',junk4)
  );

  menu[3].setEnabled(false);

  var elem = elements[application.getMethodTriggerElementName()];
  if (elem != null)
  {
    plugins.popupmenu.showPopupMenu(elem, menu);
  }

}

function junk1()
{
  var lv_junk1 = 0;
}

function junk2()
{
  var lv_junk2 = 0;
}

...



Any thoughts ??
Thanks in advance
markhooper
 
Posts: 84
Joined: Fri May 30, 2008 7:28 pm
Location: Canada

Re: Menus for web client

Postby grahamg » Sat Jan 31, 2009 5:51 pm

AFAIK menus & dialog boxes are amongst the very few features that do not work in Web Client.

Two options are to use FormInDialog or to show/hide Tab Panel(s) with the menu choices that you require - both can be elegant and fast with the right code :)

If you need some sample code post more info on what you want to achieve and I'll be happy to dig something out.

Regards
Graham Greensall
Worxinfo Ltd
www.worxinfo.com
grahamg
 
Posts: 752
Joined: Fri Oct 03, 2003 3:15 pm
Location: Midlands UK

Re: Menus for web client

Postby srowe » Tue Feb 03, 2009 3:57 pm

I would be interested in sample code for menus in Web Client. I have applications that require several layers of sub menus.

Thanks.
srowe
 
Posts: 74
Joined: Wed May 02, 2007 3:01 pm
Location: USA Missouri


Return to Web Development

Who is online

Users browsing this forum: No registered users and 5 guests