Yes it does.  Thank you VERY much!

"Nuno Canas" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi Joshua,
> I've done this in my Classes like this...
> I'm not using %Pesistent because I'm extending from another class, but
> for a test case this should help you.
>
> Class Package.Customer Extends %Pesistent [ ClassType = persistent,
> ProcedureBlock ]
> {
> ...
> Relationship CustomerType As Package.CustomerType [ Cardinality = one,
> Inverse = Customers];
> ...
> }
>
> Class Package.CustomerType Extends %Persistent [ ClassType = persistent,
> ProcedureBlock ]
> {
> ...
> Relationship Customers As Package.Customer [ Cardinality = many, Inverse
> = CustomerType ];
> Property Description As %String [ Required ];
> Query ByName(nome As %String = "") As %SQLQuery(CONTAINID = 1)
> {
> SELECT %Id, Description FROM Package.CustomerType
> ORDER BY Description
> }
>
> ...
> }
>
> Remember that I'm Writing Package because I don't know your Package Name
!!
>
> So Let's go to CSP ;-)
>
> Interface to Add/Change/Search for Customer Types
> <!-- use CSP:OBJECT tag to create a reference to an instance of the
> class -->
> <CSP:OBJECT NAME="objForm" CLASSNAME="Package.CustomerType"
> OBJID=#(%request.Get("OBJID"))#>
>
> <!-- use CSP:SEARCH tag to create a javascript function to invoke a
> search page -->
> <CSP:SEARCH NAME="form_search" CLASSNAME="Package.CustomerType"
> WHERE="Description" OPTIONS="popup,clearbtn,nopredicates"
ONSELECT="update">
>
> <FORM NAME="form" CSPBIND="objForm" CSPJS="All" ONSUBMIT='return
> form_validate();'>
> <TABLE CELLPADDING="3">
>    <TR>
>      <TD class="Label"><B><DIV ALIGN="RIGHT">*Descricao:</DIV></B></TD>
>      <TD><INPUT TYPE="TEXT" NAME="Description" CSPBIND="Description"
> SIZE="50" CSPREQUIRED></TD>
>    </TR>
>    <TR>
> ....
> </FORM>
>
> Now The Customer Page
> <!-- use CSP:OBJECT tag to create a reference to an instance of the
> class -->
> <CSP:OBJECT NAME="objForm" CLASSNAME="Package.Customer"
> OBJID=#(%request.Get("OBJID"))#>
>
> <!-- use CSP:SEARCH tag to create a javascript function to invoke a
> search page -->
> <FORM NAME="form" CSPBIND="objForm" CSPJS="All" ONSUBMIT='return
> form_validate();'>
> ...
>      <TD><SELECT NAME="CustomerType" CSPBIND="CustomerType"
> CLASSNAME="ECOM.CustomerType" QUERY="ByName"
> FIELD="Description"></SELECT></TD>
> ....
> </FORM>
>
> I hope this Helps You (and other !!!)
>
> ;-)
>
> Nuno
>
> Joshua M. Andrews wrote:
> > Hi All,
> >
> > I want to make a CSP page that asks our employees what account type a
> > customer is signing up under.  Example:  Individual/Business/etc..
> >
> > If I create a class in Studio called CustomerType and add a Property of
> > AccountType how can I add each item (ind/bus/etc) so that they will show
up
> > in a drop-down list in the CSP page?  The second reason for this type of
> > item is that I want to also have an admin interface where one of the
> > management might want to update this particular part of the application
to
> > say remove residential (ind) accounts and only sell to business so we
would
> > remove that option from the list using the admin interface.
> >
> > So where do I add these items in Studio to have them displayed in the
CSP
> > page?  I'm using Cache v5.0.5  Thanks!
> >
> > Joshua
> >
> >
>



Reply via email to