Using UI Fields From MemDataBook Object
3 posts
• Page 1 of 1
Using UI Fields From MemDataBook Object
Hi everyone,
We are trying to create a form that is not associated to a database, following the example in "http://doc.sibvisions.com/jvx/client/model/data/memory"
We are defining a MemDataBook object like so:
private void createMemDataBook() throws Throwable
{
//--------------------------------
// Data
//--------------------------------
MemDataBook mdbData = new MemDataBook();
mdbData.setName("person");
mdbData.getRowDefinition().addColumnDefinition(new ColumnDefinition("FIRSTNAME"));
mdbData.getRowDefinition().addColumnDefinition(new ColumnDefinition("LASTNAME"));
mdbData.getRowDefinition().addColumnDefinition(new ColumnDefinition("PHONE"));
mdbData.open();
}
VisionX recognizes the table like shown bellow:
But when we try to add the field to the form, we get the following error:
Can anyone help me to solve this problem?
Thanks in advance!
We are trying to create a form that is not associated to a database, following the example in "http://doc.sibvisions.com/jvx/client/model/data/memory"
We are defining a MemDataBook object like so:
private void createMemDataBook() throws Throwable
{
//--------------------------------
// Data
//--------------------------------
MemDataBook mdbData = new MemDataBook();
mdbData.setName("person");
mdbData.getRowDefinition().addColumnDefinition(new ColumnDefinition("FIRSTNAME"));
mdbData.getRowDefinition().addColumnDefinition(new ColumnDefinition("LASTNAME"));
mdbData.getRowDefinition().addColumnDefinition(new ColumnDefinition("PHONE"));
mdbData.open();
}
VisionX recognizes the table like shown bellow:
But when we try to add the field to the form, we get the following error:
Can anyone help me to solve this problem?
Thanks in advance!
- reversedr
- Posts: 35
- Joined: Tue Oct 23, 2018 11:03 am
Re: Using UI Fields From MemDataBook Object
This is clear, because VisionX creates an Editor instance for the unused editors and tries to set the column name and the databook (in your case, the mem databook).
But the mem databook is not in the field list, it's declared in your create method only.
So, if you move:
MemDataBook mdbData = new MemDataBook();
to the fields, it should work.
But the mem databook is not in the field list, it's declared in your create method only.
So, if you move:
MemDataBook mdbData = new MemDataBook();
to the fields, it should work.
-
Support@SIB - Posts: 353
- Joined: Mon Sep 28, 2009 1:56 pm
Re: Using UI Fields From MemDataBook Object
Thank you , that was it!
- reversedr
- Posts: 35
- Joined: Tue Oct 23, 2018 11:03 am
3 posts
• Page 1 of 1