use of com.servoy.j2db.FormController in project servoy-client by Servoy.
the class WebTabPanel method showFoundSet.
protected void showFoundSet(WebTabFormLookup flp, IRecordInternal parentState, List<SortColumn> sort) {
deregisterSelectionListeners();
if (!flp.isReady())
return;
FormController fp = flp.getWebForm().getController();
if (fp != null && flp.getRelationName() != null) {
IFoundSetInternal relatedFoundset = parentState == null ? null : parentState.getRelatedFoundSet(flp.getRelationName(), sort);
registerSelectionListeners(parentState, flp.getRelationName());
fp.loadData(relatedFoundset, null);
}
ITagResolver resolver = getTagResolver(parentState);
// refresh tab text
for (int i = 0; i < allTabs.size(); i++) {
WebTabHolder element = allTabs.get(i);
if (element.getPanel() == flp) {
element.refreshTagStrings(resolver);
break;
}
}
}
use of com.servoy.j2db.FormController in project servoy-client by Servoy.
the class WebTabPanel method recomputeTabSequence.
public void recomputeTabSequence() {
FormController fc = currentForm.getWebForm().getController();
fc.recomputeTabSequence(tabSequenceIndex);
}
use of com.servoy.j2db.FormController in project servoy-client by Servoy.
the class WebTabPanel method notifyResized.
public void notifyResized() {
if (currentForm != null && currentForm.isReady()) {
WebForm webForm = currentForm.getWebForm();
FormController controller = webForm.getController();
if (controller != null && webForm.isFormWidthHeightChanged()) {
controller.notifyResized();
webForm.clearFormWidthHeightChangedFlag();
}
}
}
use of com.servoy.j2db.FormController in project servoy-client by Servoy.
the class BaseEventExecutor method fireEventCommand.
public Object fireEventCommand(EventType type, String cmd, Object[] args, Object[] persistArgs, boolean saveData, Object display, boolean focusEvent, int modifiers, String formName, boolean executeWhenFieldValidationFailed, Point mouseLocation, Point absoluteMouseLocation) {
if (actionListener == null)
return null;
FormController fc = actionListener.getFormController();
// won't be able to execute - form is already destroyed
if (fc == null)
return null;
// also fire when cmd is null (may trigger field validation)
if (modifiers != MODIFIERS_UNSPECIFIED)
actionListener.setLastKeyModifiers(modifiers);
String name = getElementName(display);
String fName = formName;
if (fName == null)
fName = getFormName(display);
if (fName == null)
fName = this.formName;
if (fName == null)
fName = getFormName();
// TODO can't this be the only one used and formName/display args as well as formName member removed?
if (fName == null)
fName = fc.getName();
if (this.formName == null && fName != null)
setFormName(fName);
// TODO can't an abstract Object getComponent() be created for this and display be removed as arg ? all subclasses have such a reference
Object source = getSource(display);
JSEvent event = new JSEvent();
event.setType(type);
event.setSource(source);
event.setFormName(fName);
event.setElementName(name);
event.setModifiers(modifiers == MODIFIERS_UNSPECIFIED ? 0 : modifiers);
if (mouseLocation != null)
event.setLocation(mouseLocation);
if (absoluteMouseLocation != null)
event.setAbsoluteLocation(absoluteMouseLocation);
return actionListener.executeFunction(cmd, Utils.arrayMerge(Utils.arrayJoin(args, new Object[] { event }), persistArgs), saveData, source, focusEvent, null, executeWhenFieldValidationFailed);
}
use of com.servoy.j2db.FormController in project servoy-client by Servoy.
the class J2DBClient method setTitle.
public void setTitle(String name) {
// $NON-NLS-1$
String title = "";
String solutionTitle = getSolution().getTitleText();
if (solutionTitle == null) {
title = getSolution().getName();
} else if (// $NON-NLS-1$
!solutionTitle.equals("<empty>")) {
title = solutionTitle;
}
title = getI18NMessageIfPrefixed(title);
if (// $NON-NLS-1$ //$NON-NLS-2$
name != null && !name.trim().equals("") && !"<empty>".equals(name)) {
String i18nName = getI18NMessageIfPrefixed(name);
FormController formController = (FormController) getFormManager().getCurrentForm();
if (formController != null) {
String name2 = Text.processTags(i18nName, formController.getTagResolver());
if (name2 != null)
i18nName = name2;
} else {
String name2 = Text.processTags(i18nName, TagResolver.createResolver(new PrototypeState(null)));
if (name2 != null)
i18nName = name2;
}
if (// $NON-NLS-1$
!i18nName.trim().equals("")) {
if (// $NON-NLS-1$
"".equals(title)) {
title += i18nName;
} else {
// $NON-NLS-1$
title += " - " + i18nName;
}
}
}
String appName = getDisplayApplicationName();
if (// $NON-NLS-1$
appName.endsWith("Developer")) {
// $NON-NLS-1$
title = appName + " - " + title;
} else {
if (// $NON-NLS-1$
title.equals("")) {
title = appName;
} else {
// $NON-NLS-1$
title += " - " + appName;
}
}
frame.setTitle(title);
}
Aggregations