CodeCharge Studio
search Register Login  

Visual PHP Web Development

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

YesSoftware Forums -> Archive -> GotoCode Archive

 how to know i'm in which mode(add or edit)

Print topic Send  topic

Author Message
zander
Posted: 12/02/2003, 7:38 PM

I use CCS2.X with JSP
the add/edit page is the same page
how can i get something like flag in ccs to know it's in add mode or in edit mode

thanks.
Ronb
Posted: 12/03/2003, 1:51 AM

with add the record on the page is usualy empty plus the buttons says add....?? With edit the recors is usualy pre filled with info from a specific record from the database and the button says submit....... ??????

RonB
Tim
Posted: 12/04/2003, 3:46 PM

In the form class the EditMode variable will be true when in edit and false when in add mode. Just figured this out last night ;-)

Zander
Posted: 12/07/2003, 6:44 PM

i havw to know which mode it is in order to set some text box disabled. i don't know where can i judge it. Please Help Me!!
RG
Posted: 12/08/2003, 3:20 AM

Try this. It worked for me:

//Form1_BeforeShow

if (e.getRecord().isEditMode()) {
//Edit Mode
} else {
//Add Mode
}

It is from the CCS 2 documentation under "Examples and Techniques" -> "Programming" -> "Other".

RG

   


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

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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