Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » Html field in standard outline (tree)(Html field global for all pages)
Html field in standard outline (tree) [message #1084838] Mon, 12 August 2013 06:09 Go to next message
Shweta Tiwari is currently offline Shweta TiwariFriend
Messages: 10
Registered: February 2013
Junior Member
Hi,

I am working on a scout project. I want to insert a Html field in the standard outline so that it will be global for all pages(child pages), same as tabs.

Please help me in getting the solution.

Thanks in advance.

Thanks and regards,
Shweta Tiwari
Re: Html field in standard outline (tree) [message #1084868 is a reply to message #1084838] Mon, 12 August 2013 06:53 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1252
Registered: October 2011
Senior Member
I am not sure to understand what you want to do.

Here an example:
I have extended the MiniCRM Demo application a Form that is displayed on the left. The form is independent from the selected page. The Form (named InfoForm) containing an HTML Field. It contains a simple FormHandler (DisplayHandler). The Form has following properties:
* DisplayHint = DISPLAY_HINT_VIEW
* DisplayViewId = VIEW_ID_E (east)
Here the code:
public class InfoForm extends AbstractForm {

  public InfoForm() throws ProcessingException {
    super();
  }

  @Override
  protected int getConfiguredDisplayHint() {
    return DISPLAY_HINT_VIEW;
  }

  @Override
  protected String getConfiguredDisplayViewId() {
    return VIEW_ID_E;
  }

  public void startView() throws ProcessingException {
    startInternal(new ViewHandler());
  }

  public InfoField getInfoField() {
    return getFieldByClass(InfoField.class);
  }

  public MainBox getMainBox() {
    return getFieldByClass(MainBox.class);
  }

  @Order(10.0)
  public class MainBox extends AbstractGroupBox {

    @Order(10.0)
    public class InfoField extends AbstractHtmlField {

      @Override
      protected int getConfiguredGridH() {
        return 2;
      }

      @Override
      protected boolean getConfiguredLabelVisible() {
        return false;
      }
    }
  }

  public class ViewHandler extends AbstractFormHandler {

    @Override
    protected void execLoad() throws ProcessingException {
      // This is only for demonstration purpose:
      getInfoField().setValue("<html><b>Lorem ipsum dolor</b> sit amet, consectetur adipiscing elit. <i>Suspendisse sit amet nunc sit amet lorem eleifend condimentum in sit amet dolor.</i><br> Nulla at tortor id libero fringilla imperdiet. Nam justo justo, sollicitudin id condimentum eget, suscipit nec erat. Quisque sagittis, mauris sed luctus mollis, mi nibh cursus lectus, ac hendrerit erat erat ac nibh. Nullam commodo ullamcorper rutrum. Quisque ut blandit enim, vitae rutrum metus. Phasellus commodo nisl nulla, non sodales odio mattis id. Vestibulum enim erat, iaculis et arcu iaculis, tristique vestibulum felis. Vivamus lacinia nec ante ut auctor. Morbi vitae quam in ligula rhoncus iaculis. Mauris iaculis metus vel libero volutpat, vel ullamcorper augue commodo. Etiam nec ullamcorper diam. Praesent consectetur, dui a tempus accumsan, libero dui suscipit risus, sed feugiat lorem nibh at tellus. </html>");
    }
  }
}

In the Desktop, I start my form in execOpened
@Override
protected void execOpened() throws ProcessingException {
  // ... (generated code: no changes). Here the new lines:

  InfoForm infoForm = new InfoForm();
  infoForm.startView();
}


index.php/fa/15890/0/

If you want to do something else, please post more information (for example a little sketch).
Re: Html field in standard outline (tree) [message #1085653 is a reply to message #1084868] Tue, 13 August 2013 07:22 Go to previous message
Shweta Tiwari is currently offline Shweta TiwariFriend
Messages: 10
Registered: February 2013
Junior Member
Thanks a lot for the quick reply.......it worked
Previous Topic:Scout default translations
Next Topic:SmartField autoselection if only one choice is available
Goto Forum:
  


Current Time: Sat Apr 20 00:27:38 GMT 2024

Powered by FUDForum. Page generated in 0.02838 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top