Warning: session_start(): open(/var/lib/php/sessions/sess_2hivncc6h05q18163biqt5lnq0, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
static LL showForm_makeComponents(final Bool internalFrame, O... _parts) {
new LL l;
L parts = asList(_parts);
JButton submitButton = null;
for (int i = 0; i < l(parts); i++) {
final O o = parts.get(i), next = get(parts, i+1);
if (o instanceof S && next instanceof Component)
setComponentID((Component) next, (S) o);
if (o instanceof Component || o instanceof S || next instanceof Component) { // smartAdd accepts strings
l.add(mapLL wrapForSmartAdd(
o == null ? new JPanel
: o instanceof S ? humanizeFormLabel((S) o)
: o, next));
if (next instanceof JButton && submitButton == null)
submitButton = (JButton) next;
i++;
} else if (isRunnable(o))
l.add(mapLL wrapForSmartAdd(null, submitButton = jbutton(showFormSubmitButtonName(), r {
print("showForm_makeComponents: calling");
O result = call(o);
print("showForm_makeComponents: got " + result);
if (neq(Bool.FALSE, result)) {
print("showForm_makeComponents: disposing " + internalFrame + " of " + heldInstance(jbutton));
if (isTrue(internalFrame))
disposeInternalFrame(heldInstance(JButton));
else if (isFalse(internalFrame))
disposeFrame(heldInstance(JButton));
}
})));
else print("showForm: Unknown element type: " + getClassName(o));
}
if (submitButton != null) {
final JButton _submitButton = submitButton;
onEnterInAllTextFields(concatLists(l), r { clickButton(_submitButton) });
}
// massage labels
for (L row : l) {
JComponent left = first(row);
if (left instanceof JLabel) makeBold((JLabel) left).setVerticalAlignment(JLabel.TOP);
}
ret l;
}