|
Re: Html field in standard outline (tree) [message #1084868 is a reply to message #1084838] |
Mon, 12 August 2013 06:53 |
Jeremie Bresson 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();
}
If you want to do something else, please post more information (for example a little sketch).
|
|
|
|
Powered by
FUDForum. Page generated in 0.03928 seconds