Hi Isomorphic,
I think I found a problem with DateItem. Please see the attached screenshot (I'd expect a text field for the selected date between the field-title and the datepicker-icon). I use the object as I did before (2 month ago, so I can't tell when the bug are introduced).
See this form code:
Client Java (look for gueltigvonDI and gueltigbisDI):
ds.xml:
Could you please confirm if this is a bug?
Thank you & Best regards,
Blama
I think I found a problem with DateItem. Please see the attached screenshot (I'd expect a text field for the selected date between the field-title and the datepicker-icon). I use the object as I did before (2 month ago, so I can't tell when the bug are introduced).
See this form code:
Client Java (look for gueltigvonDI and gueltigbisDI):
Code:
package com.lmscompany.lms.client.menu.list;
import com.lmscompany.lms.client.User;
import com.lmscompany.lms.client.menu.navigation.MainArea;
import com.lmscompany.lms.client.type.DatasourceEnum;
import com.lmscompany.lms.client.type.CompanyListType;
import com.lmscompany.lms.client.util.Helper;
import com.smartgwt.client.data.DSCallback;
import com.smartgwt.client.data.DSRequest;
import com.smartgwt.client.data.DSResponse;
import com.smartgwt.client.data.DataSource;
import com.smartgwt.client.widgets.IButton;
import com.smartgwt.client.widgets.events.ClickEvent;
import com.smartgwt.client.widgets.events.ClickHandler;
import com.smartgwt.client.widgets.form.DynamicForm;
import com.smartgwt.client.widgets.form.events.SubmitValuesEvent;
import com.smartgwt.client.widgets.form.events.SubmitValuesHandler;
import com.smartgwt.client.widgets.form.fields.DateItem;
import com.smartgwt.client.widgets.form.fields.TextItem;
import com.smartgwt.client.widgets.layout.HLayout;
import com.smartgwt.client.widgets.layout.VLayout;
public class CompanyUserList extends VLayout {
final private DataSource userDS = DataSource.get(DatasourceEnum.T_USER
.getValue());
final private UserList boundList;
private DynamicForm newForm;
public CompanyUserList(final MainArea mainArea) {
super(5);
boundList = new UserList(mainArea, CompanyListType.COMPANY, null);
addMember(boundList);
HLayout newEntryLayout = new HLayout() {
{
setHeight(30);
newForm = new DynamicForm() {
@Override
public void saveData() {
super.saveData(new DSCallback() {
@Override
public void execute(DSResponse response,
Object rawData, DSRequest request) {
if (Helper.oneRow(response)) {
newForm.clearValues();
int newUserID = response
.getDataAsRecordList()
.first()
.getAttributeAsInt(
newForm.getDataSource()
.getPrimaryKeyFieldName());
// UserList.openPersonDetailTab(newUserID,
// mainArea,
// CompanyListType.COMPANY);
}
}
});
}
{
setWidth100();
setDataSource(userDS);
setNumCols(6);
setMembersMargin(5);
setIsGroup(true);
setGroupTitle("Basisdaten des neuen Benutzers (Details können im folgenden Schritt gepflegt werden)");
setSaveOnEnter(true);
setCanSubmit(false);
addSubmitValuesHandler(new SubmitValuesHandler() {
public void onSubmitValues(
final SubmitValuesEvent submitValuesEvent) {
saveData();
}
});
final TextItem anredeTI = new TextItem("ANREDE");
final TextItem vornameTI = new TextItem("GIVENNAME");
final TextItem nachnameTI = new TextItem("SURNAME");
final DateItem gueltigvonDI = new DateItem("GUELTIGVON");
final DateItem gueltigbisDI = new DateItem("GUELTIGBIS");
final TextItem emailTI = new TextItem("EMAIL");
setValue("BELONGSTO_COMPANY_ID", User.getParentID());
setFields(gueltigvonDI, gueltigbisDI, emailTI,
anredeTI, vornameTI, nachnameTI);
};
};
final IButton newBtn = new IButton("Neuen Benutzer hinzufügen",
new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
newForm.saveData();
};
}) {
{
setWidth(200); // Button
}
};
addMember(newBtn);
addMember(newForm);
}
};
addMember(newEntryLayout);
}
}
Code:
<field name="GUELTIGVON" title="Login gueltig von" type="date" required="true"></field> <field name="GUELTIGBIS" title="Login gueltig bis" type="date"></field>
Thank you & Best regards,
Blama
Comment