COMBO BOX

HI

We are migrating ND5 APPLICATION INTO IPLANET .We have method

called " populateXlatComboBox". This method should generate combox.

We are trying to generate combo box using DATA MODEL in method.

is there method like autorefill in IPLANET. could you please go through

method and if you have any sample code .could you please post it.

could you please tell me how to generate drop down box using DATA

MODELS.

Thanks

Sn

public void populateXlatComboBox(ComboBox xlatComboBox, Object

defaultForCmb, String fieldNameForLookup)

{

try {

Debug.debug("populateXlatComboBox", 2,

"populateXlatComboBox: fieldName for lookup is " + fieldNameForLookup +

": defaultforcmb is " + defaultForCmb);

com.iplanet.jatox.QueryModelBase doGetXlatFields

=(com.iplanet.jatox.QueryModelBase)

RequestManager.getRequestContext().getModelManager().getModel(DO_SEL_XLA

T_FIELDS);

doGetXlatFields.clearUserWhereCriteria();

doGetXlatFields.addUserWhereCriterion("WAND_SS_XLATTABLE_VW_FIELDNAME",

com.iplanet.jatox.QueryModelBase.EQUALS_OPERATOR, new

String(fieldNameForLookup));

xlatComboBox.setName(String)

xlatComboBox.setValue(defaultForCmb);

}

catch(Exception e)

{

onDisplayException(e);

}

}

-- Original Message --

From: "Todd Fast" <<a href="/group/SunONE-JATO/post?protectID=189233080150012190218067203043176090006 144139218183041">toddwork@c...</a>>

Date: Monday, July 9, 2001 10:42 pm

Subject: Re: [iPlanet-JATO] COULD YOU PLS HELP ME TO FIX REPEATED OBJECT

ISSUE.

> This code should generally be in the TiledView (it may appear in

> both the

> ViewBean and the TiledView after migration).

>

> > CSpRepeated repeated =(CSpRepeated) event.getSource();

>

> // Assuming the code is in the TiledView

> TiledView repeated=this;

>

> > CSpStaticText stFieldName =(CSpStaticText)

> > repeated.getDisplayField("stFieldName");

>

> StaticTextField stFieldName=

> (StaticTextField)getDisplayField("stFieldName");

>

> - or -

>

> StaticTextField stFieldName=getStFieldName();

>

> > int index = event.getRowIndex();

>

> In what event do you want to obtain the index? For the most part,

> you can

> just call TiledView.getTileIndex(). If this is a request event

> handlingmethod, the row index is part of the event signature.

>

> IMPORTANT: If the original code cached references to display

> fields as page

> instance variables for use in the class's events, you should NOT

> do the same

> in JATO. This was an ND pattern that is unnecessary and

> inefficient in

> JATO. Instead, you should just use the generated accessors or the

> getDisplayField()/getChild() methods to obtain a reference to a

> displayfield as needed. Mike Frisino has elaborated this point in

> the past; please

> refer to his emails.

>

> Todd

>

>

> <a href="/group/SunONE-JATO/post?protectID=210083235237078198050118178206047166215 146166214017110250006230056039126077176105140127082088124241215002153">iPlane t-JATO-unsubscribe@egroups.com</a>

>

>

>

>

>

>

[3682 byte] By [Guest] at [2007-11-25 9:26:48]
# 1

Sn,

Please spend some time with the MigtoolboxSampleApp.

This is intentionally included with the iMT to answer some of the questions

you are asking. There is a page in that project called AutoFillPageViewBean.

See AutoFillPageViewBean.java for examples of combo boxes that are populated

from Models and/or directly from SQL queries.

See all usage of "DataObjectFillComboBox" in that java file for example of

a combo box that is "autofilled" by a SQL Model.

The difference between ND and JATO is that the notion of "Options" is

formally separate in JATO. So the equivalent of doAutoFill is not performed

on the SelectableGroup (i.e. combobox, list) but rather on the OptionList

that is USED by the SelectableGroup. Therefore, the equivalent of doAutoFill

in JATO is OptionList.populate().

There are several resources bundled with the iMT that you should spend some

time with as they are full of example code. First there is the

MigtoolboxSampleApp, and second there is the "ramapp" (see

C:\migtoolbox-1.1.1\extra\jatoapps\ramapp )

Furthermore, if your own migration project includes comboboxes that are

autofilled by Models (ND DataObjects) then the iMT should have generated the

associated OptionList code in a fashion very similar to what you will see in

MigtoolboxSampleApp.MigtoolboxSample.AutoFillPageViewBean

-- Original Message --

From: "SNR R" <<a href="/group/SunONE-JATO/post?protectID=061071091003099219138082141024124">s nr@s...</a>>

Sent: Wednesday, July 11, 2001 11:33 PM

Subject: Re: [iPlanet-JATO] COMBO BOX

> Hi

> We are migrating ND5 APPLICATION INTO IPLANET .

> I am trying to generate combobox using data model in method but

> I couldn't do it.

> We have method

> called " populateXlatComboBox". This method should generate combox.

> We are trying to generate combo box using DATA MODEL in method.

> is there method like autorefill in IPLANET. could you please go

> throughmethod and if you have any sample code .could you please

> post it.

> could you please tell me how to generate drop down box using DATA

> MODELS.

>

>

> Thanks

> Sn

>

>

>

>

>

>

>

> <a href="/group/SunONE-JATO/post?protectID=210083235237078198050118178206047166215 146166214017110250006230056039126077176105140127082088124241215002153">iPlane t-JATO-unsubscribe@egroups.com</a>

>

>

>

>

>

>

Guest at 2007-7-1 16:31:27 > top of Java-index,Development Tools,Java Tools...