Menu

Newbie Questions

Help
sriramhmco
2006-01-19
2013-04-08
  • sriramhmco

    sriramhmco - 2006-01-19

    Hi,

    I am new to Swixat. I have the following questions from my attempts at trying to use it.

    1) How do I reference a property value on 'application' from my frame definition - I'd like to set the title on my frame using the application/title property. What is the protocol for referencing beans defined in my context from a frame definition - I'd like to pass on a variable on a bean to an ActionCommand function.

    2) I am trying to build a UI composed of a JEditorPane (With toolbar, menus, etc) that has been pre-built. I declare a tag for it my context file and instantiate it successfully in a frame I define. However when I click on any menu or toolbar items from the prebuilt JeditorPane instance, I get the following error messages. These buttons and menu items aren't registered via the Swixat configuration and I would like to ignore them. How would I go about doing this?

    [ERROR,AbstractFrame] Command 'actionHandlerKey98' not declared
    [ERROR,AbstractFrame] Command 'actionHandlerKey50' not declared
    [ERROR,AbstractFrame] Command 'actionHandlerKey51' not declared
    [ERROR,AbstractFrame] Command 'actionHandlerKey50' not declared
    [ERROR,AbstractFrame] Command 'actionHandlerKey51' not declared
    [ERROR,AbstractFrame] Command 'actionHandlerKey50' not declared
    [ERROR,AbstractFrame] Command 'actionHandlerKey51' not declared

    Thanks
    Sriram

     
    • Paolo Marrone

      Paolo Marrone - 2006-01-29

      Hi,
      first of all, I apologize for the late response.

      1) In this moment you can do it only by writing script code invoked by the onOpened attribute of the WindowEvents tag. The script is the following:

      title = application.getTitle();
      currentContext.getData('idMap').get('frameID').setTitle(title);

      where 'frameID' is the id of the Frame, as declared in the corresponding xml file.
      Maybe in the future we'll implement a built-in solution.

      2) There isn't a simple solution: you should declare in the context.xml all those actions with a 'dummy' command pointing to an empty dummy.bsh file. I don't know if there is a better solution.

      Regards
      Paolo

       

Log in to post a comment.