Mam taki problem że próbuje pobrać dane z Obiektu. Kiedy debuguje kod w obiekcie customer widać wszystkie jego pola poprawnie natomiast kiedy próbuje pobrać je pokazuje mi że mam 0 pól czy wie ktoś może w czym może być problem ??
public Object createValue() throws BasicException {
Object[] customer = new Object[25];
customer[0] = m_oId == null ? UUID.randomUUID().toString() : m_oId;
customer[1] = m_jTaxID.getText();
customer[2] = m_jSearchkey.getText();
customer[3] = m_jName.getText();
customer[4] = m_jNotes.getText();
customer[5] = m_jVisible.isSelected();
customer[6] = Formats.STRING.parseValue(jcard.getText()); // Format to manage NULL values
customer[7] = Formats.CURRENCY.parseValue(txtMaxdebt.getText(), 0.0);
customer[8] = Formats.TIMESTAMP.parseValue(txtCurdate.getText()); // not saved
customer[9] = Formats.CURRENCY.parseValue(txtCurdebt.getText()); // not saved
customer[10] = Formats.STRING.parseValue(txtFirstName.getText());
customer[11] = Formats.STRING.parseValue(txtLastName.getText());
customer[12] = Formats.STRING.parseValue(txtEmail.getText());
customer[13] = Formats.STRING.parseValue(txtPhone.getText());
customer[14] = Formats.STRING.parseValue(txtPhone2.getText());
customer[15] = Formats.STRING.parseValue(txtFax.getText());
customer[16] = Formats.STRING.parseValue(txtAddress.getText());
customer[17] = Formats.STRING.parseValue(txtAddress2.getText());
customer[18] = Formats.STRING.parseValue(txtPostal.getText());
customer[19] = Formats.STRING.parseValue(txtCity.getText());
customer[20] = Formats.STRING.parseValue(txtRegion.getText());
customer[21] = Formats.STRING.parseValue(txtCountry.getText());
customer[22] = m_CategoryModel.getSelectedKey();
// JG 3 Oct 2013 - Customer image
customer[23] = m_jImage.getImage();
return customer;
if(m_editorrecord.getClass().equals(CustomersView.class)){
Object customer = m_editorrecord.createValue();
Field[] fields = customer.getClass().getDeclaredFields();
System.out.println(fields.length);
// System.out.println(fields[1]);
for (Field field : fields) {
System.out.println("Nazwa = " + field.getName() + " wartość = " + field);
}
}
- 60ebf4c7ba.png (229 KB) - ściągnięć: 96
- 63fc136c8f.png (29 KB) - ściągnięć: 88