CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> Java

 on button click perform my own insert?

Print topic Send  topic

Author Message
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();



View profile  Send private message
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
View profile  Send private message
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
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.