use of org.entirej.framework.core.internal.EJInternalForm in project rap by entirej.
the class EJRWTQueryAction method run.
@Override
public void run() {
if (_currentBlock == null) {
EJInternalForm form = _toolbar.getForm();
EJInternalEditableBlock focusedBlock = form.getFocusedBlock();
if (form != null && focusedBlock != null) {
try {
focusedBlock.enterQuery();
focusedBlock.getManagedRenderer().gainFocus();
} catch (Exception e) {
form.getFrameworkManager().getApplicationManager().handleException(e);
}
_toolbar.synchronize(form.getFocusedBlock().getBlockController());
}
} else {
try {
_currentBlock.enterQuery();
_currentBlock.getBlock().getManagedRenderer().gainFocus();
} catch (Exception e) {
_currentBlock.getFrameworkManager().getApplicationManager().handleException(e);
}
_toolbar.synchronize(_currentBlock);
}
}
use of org.entirej.framework.core.internal.EJInternalForm in project rap by entirej.
the class EJRWTStackedPaneFormContainer method addForm.
@Override
public EJInternalForm addForm(EJInternalForm form) {
final String name = form.getFormController().getEJForm().getName();
final EJInternalForm formByPage = getFormByPage(name);
if (formByPage != null) {
_stackPane.showPane(name);
EJRWTFormRenderer renderer = (EJRWTFormRenderer) formByPage.getRenderer();
renderer.gainInitialFocus();
Display.getDefault().asyncExec(new Runnable() {
@Override
public void run() {
formByPage.focusGained();
for (EJRWTFormSelectedListener listener : _formSelectedListeners) {
listener.fireFormSelected(formByPage);
}
}
});
return formByPage;
}
_stackedPages.put(form, name);
final EJRWTFormRenderer renderer = (EJRWTFormRenderer) form.getRenderer();
renderer.createControl(_stackPane);
_stackPane.add(name, new EJRWTEntireJStackedPane.StackedPage() {
@Override
public String getKey() {
return name;
}
public Control getControl() {
return renderer.getGuiComponent();
}
});
_stackPane.showPane(name);
renderer.gainInitialFocus();
form.focusGained();
for (EJRWTFormSelectedListener listener : _formSelectedListeners) {
listener.fireFormSelected(form);
}
return form;
}
use of org.entirej.framework.core.internal.EJInternalForm in project rap by entirej.
the class EJRWTStackedPaneFormContainer method switchToForm.
@Override
public EJInternalForm switchToForm(String key) {
for (EJInternalForm form : _stackedPages.keySet()) {
if (form.getProperties().getName().equalsIgnoreCase(key)) {
EJRWTFormRenderer renderer = (EJRWTFormRenderer) form.getRenderer();
_stackPane.showPane(_stackedPages.get(form));
EJ_RWT.setAttribute(_stackPane, "ej-item-selection", form.getProperties().getName());
renderer.gainInitialFocus();
form.focusGained();
for (EJRWTFormSelectedListener listener : _formSelectedListeners) {
listener.fireFormSelected(form);
}
return form;
}
}
return null;
}
Aggregations