Lookup

When ComboTextEdit button is clicked in any form, it is the browser screen that opens.

A specific data list can be displayed on this screen. For this, you need to define the parameters in the query as well.

Let's examine this through an example. Let's do our example through the course project.

1 - We first define the definition under the browser's query folder, where we define the parameters;

2 -

  • In the Parameters field, we set ourselves a parameter name to "Name"

  • In the example, we write "P_Name"

  •  In the "Column Alias" area, we select the field from which we want to define the parameter from the ComboBox.

3 -

  • In the Restriction Terms screen, we specify which field of the table will be terminated with the parameter entered.
  •  When we insert, we enter the definitions on the Query term pop-up screen that comes up. "Name" will enter a Term name that ourselves specify.
  • The Enable field is used to indicate whether this parameter operation should be run every time the browser is opened, we specify false and only want to run when the lookup is turned on.
  • In the "Term Condition" field, we need to enter the field in the table with parameters and get the class names equal to the parameter field defined above.

4 -  The above-defined parameters are appended when making lookups.

       The lookup action, like the following, adds the term field we defined in the "Query Terms" field to the description field, then press the next button and go to the page

.

     


5 - Next we define the Parameters in the Query Parameters definition field on the page,

After we define the parameter name "Name" part we defined on the query screen, we enter the value that will take the parameter to "Value" part.

Since we define the parameter for the class name, we will list the matching data lies in the value part.


6 - In the same way, we can do parameter definitions in code;

   The following method calls ComboTextEdit event,


The parameter is where the operation is performed;

JLbsXUILookupInfo info = new JLbsXUILookupInfo(); 
info.setQueryParamValue("P_CLASSNAME", "MAT%"); info.setQueryTerms(new String[] {"T_CLASSNAME"});
info.setParamValue("P_Name","isimdeğişkeni") 

burada parametre alanına kendi belirttiğim isim değişkenini atıyoruz.   


info.setQueryTerms(new String[]{"T_NAME"}) 


where the term we define in the query is also defined.

public void ClassonLookup(JLbsXUIControlEvent event) {
                              
CustomBusinessObject data = (CustomBusinessObject) event.getData();
JLbsXUIPane container = event.getContainer();
JLbsXUILookupInfo info = new JLbsXUILookupInfo();
info.setQueryParamValue("P_CLASSNAME", "MAT%");
info.setQueryTerms(new String[] {"T_CLASSNAME"});
                             
boolean ok =container.openChild("Forms/CFClassBrowser.lfrm", info,                                                              
true, JLbsXUITypes.XUIMODE_DBSELECT);
                              
if ((!ok) || (info.getResult() <= 0))
 return;

int classLRef = info.getIntegerData("LOGICALREF");     
int classCapacity =info.getIntegerData("CAPACITY");     
String className = info.getStringData("CLASSNAME");
                            
ProjectUtil.setMemberValue(data, "ClassReference", classLRef);
ProjectUtil.setMemberValue(data, "ClassLink.Capacity",classCapacity);
ProjectUtil.setMemberValue(data, "ClassLink.ClassName",className);
                                                     
container.resetValueByTag(2000006);                              
container.resetValueByTag(2000012);             
}


Telif HakkıKullanım KoşullarıGizlilik
Copyright © 2018 Logo Yazılım