kuhbrille
Posts: 11
|
Posted: 04/01/2008, 7:49 AM |
|
Hi,
in a record form, I need a button to perform an insert.
In php I just take the global Object i.e. myRecord and
write $myRecord->insertRow();
That's all.
I found a way to do this in java, too.
But perhaps there is an easier way to do it.
If you have any idea I would be happy.
Roland
Here is my solution:
legend:
KALENDER is the name of the record
WERK is the name of a textfield
Record model = e.getPage().getRecord("KALENDER");
Page page = e.getPage();
KALENDERDataObject ds = new KALENDERDataObject(page);
ds.setComponent( model );
KALENDERRow row = new KALENDERRow();
ds.setRow(row);
row.setWERK(Utils.convertToString(((com.codecharge.components.TextBox) model.getControl( "WERK" )).getValue()));
row.setWERKEmpty(( (com.codecharge.components.TextBox) model.getControl( "WERK" )).isEmpty() );
ds.setRow(row);
ds.insert();
|
|
|
siap
Posts: 7
|
Posted: 04/02/2008, 1:58 PM |
|
Hi
Maybe use Custom Insert on the Data tab of your record
try!
_________________
Unidad de TI
Sistemas Administrativos y Financieros
Direccion Nacional de Informática
|
|
|
kuhbrille
Posts: 11
|
Posted: 04/02/2008, 9:58 PM |
|
Hi,
thanks, but that would not work, because I need the insert button
in the edit/update mode.
In some cases I need to insert a replica of the actual row instead
of an update.
And in the edit/update node the "normal" insert button is hidden.
So, I need to perform my own insert.
Roland
|
|
|
|