Login
Register

Home

Trainings

Fusion Blog

EBS Blog

Authors

Contact Us

Senthilkumar Shanmugam
  • Register

Oracle Gold Partners, our very popular training packages, training schedule is listed here
Designed by Five Star Rated Oracle Press Authors & Oracle ACE's.

webinar new Click here to raise Support Ticket. Get reply within 48 hours.

Search Courses

×

Warning

JUser: :_load: Unable to load user with ID: 881

User Rating: 5 / 5

Star ActiveStar ActiveStar ActiveStar ActiveStar Active
 

MSCA/MWA Java API Documentation – Part2 - FieldBeans 

 

In this article we will discuss more about the FieldBean. Filed Beans are the beans which are displayed in the Mobile Forms on which the user performs operations.

 

The type of fields supported are:

  •      Text

  •      LOV

  •      List

  •      Button

  •      Heading1

  •      Heading2

  •      Line Separator

  •      Space Separator

 

Class Diagram

 

 

1)InputableFieldBean

 

 

InputableFieldBean is the base class for all user developed field beans which has a value property to be inputable during "runtime".

This class is the super class for Text field, Read only Text field, LOV field.

 

The Commonly used APIs:

 


public void setEditable(boolean)

Set whether the filed is read only or not.


public void setRequired(boolean Required)

Mandatory or not.    

public void setAlter(java.lang.String)    

This is used to alter the case of the values entered by the user. For eg setAlter("U") makes the user input to Upper Case after the user types in the value.   


public java.lang.String getValue()

Get the value entered by the user

public void setValue(java.lang.String)

 

Set the value in the field

public void setBarcodeDelimiter(char)

 

Set data stream delimiter


public int getBarcodeDelimiter()

Get data stream delimiter

public void setDFIs(java.lang.String[] )

 

Set The DFI - Data Field Indicator


public java.lang.String[] getDFIs()

Get the DFI


public void setDFIRequired(boolean)

Set the DFI required flag

 

 

 

 

As indicated in the  class diagram, Inputable beans have Text Field Bean and LOV field Bean as most commonly used subclasses.

 

We will now get into the details of each of them.

 

 

LOVFieldBean

 

LOV is commonly used component in Oracle Applications. It provides the user with list of values and user has to choose one of them.

 

The common requirements which are required for constructing a LOV are:

 

  1. Source for List of values (mostly an SQL query or an PLSQL procedure which returns the query result as REF CURSOR)

  2. The various values associated with each selection(eg,Emp Id, Emp Name, Department, Description)

  3. The values displayed in the UI and values used in background(eg  Usually Emp Name is displayed in the screen, not the Emp Id. But we get the Emp Id of selected Emp Name and use it for further processing)

  4. Data types of each parameters passed to SQL Query or PLSQL procedure and their values(if we use bind parameters or IN parameters)

  5. An array to get the values associated with the selected value by the user.

  6. Criteria for validation check to be performed, if the user manually enters the value in the LOV field rather than selecting one by clicking "torch lite" icon, we can either validate it via an API or accept is just like that.

 

The various API used to achieve the above is as follows:

 

public java.lang.String getlovStatement()

get SQL query or PL/SQL procedure with a reference cursor output parameter.

public void setlovStatement(java.lang.String)

set SQL query or PL/SQL procedure with a reference cursor output parameter.

public java.lang.String[] getSubfieldNames()

get unique names of subfields of each value

public void setSubfieldNames(java.lang.String[])

set key names of subfields.

public java.lang.String[] getSubfieldPrompts()    

get prompts of subfields.

public void setSubfieldPrompts(java.lang.String[])

set prompts of subfields.

public boolean[] getSubfieldDisplays()

get display properties of subfields.

public void setSubfieldDisplays(boolean[])

set display properties of subfields.(This controls which values are displyed in UI. For eg, Empid is usullay not displayed in UI though it is a part of the LOV)    

public java.lang.String[] getInputParameterTypes()

get parameter data type list.

publicvoid setInputParameterTypes(java.lang.String[])

set parameter data type list.

public java.lang.String[] getInputParameters()

get input parameter list.                                

public void setInputParameters(java.lang.String[])

set input parameter list.

public void setSelectedValues(java.util.Vector)

sets the return vector

public java.util.Vector getSelectedValues()

obtain a vector of String values for the chosen LOV

public void setValue(java.lang.String)

when we setValue we also have to clear the subfield values for this bean.

public void setValidateFromLOV(boolean)

set the validateFromLOV property. (Default is true)

 

 

For code snippet of how to create an LOV, one can refer my previous article "Hello World in Mobile Applications"

 

TextFieldBean

 

Text Field is a common means of data input to mobile applications either via scanning a value or by manually typing in to it.This can also be used to display some values by making this field as read only so that user cant edit or enter any value into this field.

 

The Commonly used API used specific to Text filed is

 

public void setIsPassword(boolean IsPassword)

indicate the field to store a password.

 

Most other common APIs are available in the super class "InputableFieldBean"

 

 

2)HeadingFieldBean 

 

HeadingFieldBean is the base class for all user developed heading field beans.

This class is the bean class for two types of headings: HEADING1 and HEADING2.

Default heading type is HEADING1.

 

Heading Field is mainly used to set Titles for each regions of a Mobile page.

 

The Commonly used APIs:

 

public void setHeadingType(short)

set the type of headings.

value of this property is either FieldBean.HEADING1 or FieldBean.HEADING2.

public short getAlignment()

return the heading alignment

public void setAlignment(short)

set the heading alignment

value of this property is either HeadingFieldBean.LEFT or HeadingFieldBean.CENTER

 

 

3)ListFieldBean 

 

 ListfieldBean is bean which holds a fixed list of values. In OAF, it is called as poplist. Please see the image below for a List Bean.

 

The Commonly used APIs:

 

public java.lang.String getValue()

get field value.

public void setValue(java.lang.String Value)

set field value.

public java.lang.String getListSource()

get list of options with each option separated by comma.

public void setListSource(java.lang.String)

set list of options with each option separated by comma.

public void setListSource(java.util.Vector)

set list of options via a vector

 

Fig : List Filed Bean in Mobile Applications

 

 

 

 

4) ButtonFieldBean 

 

ButtonFieldBean is the base class for all user developed button field beans.

This class is the bean class for button.

 

The Commonly used APIs:

 

public java.lang.String getNextPageName()

get block name of the block to be navigated after button is pressed.

public void setNextPageName(java.lang.String)

set block name of the block to be navigated after button is pressed.

 *For those who are familiar with OAF, setNextPageName is something like SetForwardURL()

 

 

5)SeparatorFieldBean

 

SeparatorFieldBean is the base class for all user developed separator field beans.

 

This class is the bean class for two types of separators: line separator and space separator.

Default type is space separator.

 

The commonly used API is

public void setSeparatorType(short SEPARATOR) which sets the type of separator.

The value of this property is either FieldBean.LINESEPARATOR or FieldBean.SPACESEPARATOR.

*This is similar to OASpacer Bean in OAF.

 

 

We will see more in forth coming articles.

 


Comments   

0 #1 Siddhi Dwivedi 2009-05-16 04:43
Hi Senthil,

I am getting 'Unsuccessful row construction' error while creating a LOV.
Below is my code:

PROCEDURE XXBR_VOLUME_TYP E(x_vol_type_lo v OUTNOCOPY t_genref)IS


BEGIN

OPEN x_vol_type_lov FOR
SELECT LOOKUP_CODE
FROM FND_LOOKUP_VALU ES
WHERE LOOKUP_TYPE = 'BRA-EMBALAGEM- EXPORTACAO'
AND LANGUAGE = USERENV('LANG')
AND NVL(END_DATE_AC TIVE, SYSDATE) >= SYSDATE
AND ENABLED_FLAG = 'Y';
EXCEPTION
WHEN OTHERS THEN
null;
--OP EN x_vol_type_lov FOR
-- SELECT null,null
--fro m dual;
END XXBR_VOLUME_TYP E;
------------ --------------- --------------- --------------- --------------- --------------- -------
public XXVolumeTypeLOV ()
{
try{
UtilFns.log("Si ddhi3 in XXVolumeTypeLOV ");
mLOVType = "DeliveryInfo.V olumeType";
setName("Delive ryInfo.VolumeTy pe");
UtilFns.log("Si ddhi33 in XXVolumeTypeLOV ");
setRequired(fal se);
setValidateFrom LOV(true);
setHidden(true) ;
UtilFns.log("Si ddhi333 in XXVolumeTypeLOV ");
setlovStatement ("XXBR8234_VOL_ INF_ENTRY.XXBR_ VOLUME_TYPE");
UtilFns.log("Si ddhi3333 in XXVolumeTypeLOV "+setlovStateme nt("XXBR8234_VO L_INF_ENTRY.XXB R_VOLUME_TYPE") );
String as[] = {
"C", "S"
};
boolean aflag[] = {
true
};
setInputParamet erTypes(as);
String as1[] = {
"a"
};
setSubfieldProm pts(as1);
setSubfieldDisp lays(aflag);
addListener(thi s);
UtilFns.log("Si ddhi33333 in XXVolumeTypeLOV ");
}catch(Exceptio n e){

UtilFns.error(" Siddhi Error in calling Volume Type LOV" + e);
}
Please help me to fix the issue.Thanks in advance....
Reg ards,
Siddhi
Quote
+1 #2 Rohini 2009-05-17 16:23
Hi,

Can you please check why are passing 2 parameter types

String as[] = {
"C", "S"
};
setInputPara meterTypes(as);

when your PLSQL proc has only one parameter.

Tha nks and Regards,
Senthi l
Quote
0 #3 Siddhi Dwivedi 2009-07-02 06:51
Hi Senthil,

I am trying to create a new WMS screen which will be accessible to only three orgs.
I am able to populate LOV for three orgs at 'Select Organization' screen but not able to pass organization value to load the next page.

Please help me to implement this change.

Thnaks & Regards,
Siddhi
Quote
0 #4 Rohini 2009-07-02 07:04
Hi Siddi,

How are try to trying to pass the value for selected organization to the second page?

Kindly Clarify.

Thank s and Regards,
Senthi l
Quote
0 #5 Siddhi Dwivedi 2009-07-02 07:42
Hi Senthil,

Below are the steps which I am implementing to develop the new org specific screen.
1)Menu calls function 'XX2LoadTruckFu nction.class' which inturn calls a 'XXValidOrgPage .class' to load select organization screen.

public XX2LoadTruckFun ction()
{
setFirstPageNam e("oracle.apps. inv.wshtxn.serv er.XXValidOrgPa ge");
//addListener(t his);
}

2) XXValidOrgPage populates org LOV which selects organization code and after selecting org code 'XXValidOrgFLis tener.class' class
should load next page 'XX2LoadTruckPa ge.class' for that particular organization code.

public class XXValidOrgFList ener
implements MWAFieldListene r
{

public XXValidOrgFList ener(XXValidOrg Page validorgpage)
{
mParentPage = validorgpage;
}

public void fieldEntered(MW AEvent mwaevent)
throws AbortHandlerExc eption, InterruptedHand lerException, DefaultOnlyHand lerException
{
}

public void fieldExited(MWA Event mwaevent)
throws AbortHandlerExc eption, InterruptedHand lerException, DefaultOnlyHand lerException
{
UtilFns.log("Si ddhi into Valid Org Listener class");
Session session = mwaevent.getSes sion();
session.getConn ection();
if(((FieldBean) mwaevent.getSou rce()).getName( ).equals("OrgIn fo.ORGID"))
{
if ((mParentPage.g etValidOrg().ge tValue() != null) ) {
mParentPage.m OrgCodeFld.setN extPageName("or acle.apps.inv.w shtxn.server.XX 2LoadTruckPage" );
}
}

}


public static final String RCS_ID = "$Header: XXValidOrgFList ener.java 115.5 2003/01/29 15:53:15 sansari ship $";
public static final boolean RCS_ID_RECORDED = VersionInfo.rec ordClassVersion ("$Header: XXValidOrgFList ener.java 115.5 2003/01/29 15:53:15 sansari ship $", "oracle.apps.in v.wshtxn.server ");
XXValidOrgPage mParentPage;

}
But I am not able to set parameter for ORG Code in next page and getting 'Unsuccessful row construction' error and not able to load the next page
mDockDoorF ld = new DockDoorLOV();
mDockDoorFld.se tName("LoadTruc k.DockDoor");
mDockDoorFld.se tValidateFromLO V(true);
mDockDoorFld.se tRequired(true) ;
String as[] = {
" ", " ", "ORGID", "oracle.apps.in v.wshtxn.server .XX2LoadTruckPa ge.LoadTruck.Do ckDoor"
};
mDockDoorFld.se tInputParameter s(as);
mDockDoorFld.ad dListener(fList ener);

Please let me know in case you want more info.
Thnaks & Regards,
Siddhi
Quote
0 #6 Rohini 2009-07-02 08:25
Hi siddi,

I am not sure what you are trying to do in this line of code:
"mParentP age.mOrgCodeFld .setNextPageNam e("oracle.apps. inv.wshtxn.serv er.XX2LoadTruck Page");"

is mOrgCodeFld is a button?

Also,

In the java file where you have the following code:

"
mDockD oorFld = new DockDoorLOV();
mDockDoorFld.se tName("LoadTruc k.DockDoor");
mDockDoorFld.se tValidateFromLO V(true);
mDockDoorFld.se tRequired(true) ;
String as[] = {
" ", " ", "ORGID", "oracle.apps.in v.wshtxn.server .XX2LoadTruckPa ge.LoadTruck.Do ckDoor"
};
mDockDoorFld.se tInputParameter s(as);
mDockDoorFld.ad dListener(fList ener);

"

Are you able to printand see the selected Org ID?

Please use our forum http://apps2fusion.com/forums/viewforum.php?f=145 for MSCA where you option to uplaod files.

Please upload source files and log files for more quick resolution

Tha nks and Regards,
Senthi l
Quote
0 #7 Anju 2009-09-24 08:41
Hi Senthil,

Requi rement is to add a new LOV field in a Page.
LOV field is created successfully.
The List of values get displayed when we hit enter and CTRL L on the LOV field.

Please guide me on how to prevent displaying the LOV when Enter button is hit.

Thanks,
A nju.
Quote
0 #8 Rohini 2009-09-24 08:47
Hi Anju,

Can you please post this into our forum for wider audience?

http://apps2fusion.com/forums/viewforum.php?f=145

Thanks and Regards,
Senthi l
Quote
0 #9 Phil Woods 2010-04-14 11:10
This must be a really simple thing i'm missing but I'm stuck. I can't see how to pass the user back to the menu after my page has processed the field exit code on my Submit button.

I've used your guide pages to help me and they have been really helpful - in fact just about the only help found anywhere.

Any ideas?

Phil
Quote
0 #10 Rohini 2010-04-14 19:11
hi Phil,

I guess the following code snipped might help you.

public void exitExited(MWAE vent mwaevent) throws AbortHandlerExc eption,
InterruptedHand lerException,
DefaultOnlyHand lerException {
UtilFns.trace(" Summary Exit Pressed");
if (mwaevent.getAc tion().equals(" MWA_SUBMIT")) {
try {

mwaevent.getSes sion().setStatu sMessage(UtilFn s.getMessage(mw aevent.getSessi on(),
"WMS",
"WMS_TXN_CANCEL "));
pg.getExitBtn() .setNextPageNam e("|END_OF_TRAN SACTION|");
}
catch (Exception e) {
UtilFns.error(" Error !!" + e.toString());
}

}

Thanks and Regards,
Senthi l
Quote
0 #11 Raj2012 2010-05-18 18:04
Hello Senthil,

Your articles are soo useful. Very nice. I am very much thankful to you.

I am really new to this Oracle Apps area, though I have lots of experience in Java and J2EE.

Can you please help me to deploy the custom application into MWA?

please provide us a simple steps to follow and deploy.

I have created function, page and listener classes, compiled and everything is ready to be deployed. But I really dont know, what is the procedure and where can I find the information.

P lease help me.

Thanks,
Raj
Quote
0 #12 Rohini 2010-05-19 04:22
Hi Raj,

Please refer to "Development and Deployment" section of my article http://www.apps2fusion.com/at/ss/225-mwa-setup-testing-error-logging-and-debugging

Feel free to post any queries.

Thank s and Regards,
senthi l
Quote
0 #13 Prabhakar K 2011-05-16 08:57
Senthil,
The customer wants to default certain field on entering the screen. There are certail fields like the Drop Door LOV which they want to be populated the moment they enter the field. Even certain LPN they want to generate the moment they enter the field (Simulate Ctrl + G). Is there a way to do this in MWA ?

Thanks for your help!!

Regards,
prabhakar
Quote
0 #14 Nitin K 2011-06-08 08:42
Senthil,
Are there any differences in MSCA in Release 12.1.1.3 compared to 12.1.1.1? I need to get 12.1.1.3 MSCA installed on my local apps server. My current version of Apps on my local server is 12.1.1. 1.


Regards,
N itin.
Quote
0 #15 Aggarwal 2011-06-22 08:49
Hi,

I am facing an issue in MWA for setting up the field values on SubInv Transfer page,the requirement is we scan the barcode value on the QTY field and we need to trim the QTY,LOT and LOTQTY field from the scanned barcode and populate the QTY,LOT and LOTQTY values in the appropriate fields, I am able to successfully populate for the QTY field not for the LOT and LOTQTY fields (below is the piece of code which I am using to set the values).

Code
++++++
if (lotQtyFieldNam e!= null && lotQtyFieldName .equals("INV.LO TQTY"))
{
FileLogger.getS ystemLogger().t race("CTM: Inside IF Fields Name :LOT Qty"+lotQtyFiel dName);
FieldBe an LOTQTYField = ((FieldBean) (fieldBeanList. elementAt (lotQtyFieldInd ex)));
((Inputa bleFieldBean)LO TQTYField).setV alue(lotQtyValu e2);
}

++++++++

Pl ease let me know whether do I missing anything before I set the values or is there any setup needs to be done for this.

Thanks
Quote
0 #16 Rohini 2011-06-23 09:13
Hi,

In the above code, I am not able to see how you decode the information and set the values to all 3 fields?

Can you please explain in more detail?

Thanks and Regards,
Senthi l
Quote
0 #17 Phu Tri Nguyen 2011-09-13 22:23
Hello,
What is a method to move cursor from one field to next? I follow the HelloWorld example and able to make it work and a call to PLSQL procedure for update/insert data into a database. Now I want the cursor to move back to the text field for more inputs but I cannot do this so far. I could not find any documents anywhere (let me know if you know where).
Thank you
PhuTri
Quote
0 #18 Phu Tri Nguyen 2011-09-13 23:52
Hi,
This method seems doing the tricks
mwaevent .getSession().s etNextFieldName ("TEST.HELLO")
Thank you.
PhuTri
Quote
0 #19 Phu Tri Nguyen 2011-09-21 02:11
I'm using ListFieldBean but when call getValue(), it always return the second value in the list (B in this case). What happens? Also, the list always also resets to first item in the list when fieldExited is called. Please help.
Thank
Quote
0 #20 Phu Tri Nguyen 2011-09-21 05:31
Hi,
All my field validations are in fieldExited function. My listbean is at the bottom of all beans, so when I click or choose anyting from the listbean, all above fields get validated firs. I think this causes the problem. I want to seperate the validation field by field, not using the common function (fieldExited) which causes too much problem for me. How do I do this?
Thank
Quote
0 #21 Rohini 2011-09-21 05:40
You can easily achieve this. Can you please cut-paste your source code? so that we can have a look of what you have done in fieldExited()

Thanks and Regards,
Senthi l
Quote
0 #22 Phu Tri Nguyen 2011-09-22 04:26
public void fieldExited(MWA Event mwaevent) throws AbortHandlerExc eption, InterruptedHand lerException, DefaultOnlyHand lerException {
String sStatus, sValue, sOrgCode, sPickList, sLot, sQty;
String sAll, sItem, sSQty, sMsg, sDoc;
String sFldName;
Vector oFieldBeanList;
Connection oConn;
CallableStateme nt oCStmt = null;

sFldName = ((FieldBean)mwa event.getSource ()).getName();

// Prints the Current Bean's ID
if (UtilFns.isTrac eOn)
UtilFns.trace(" CustomFListener :fieldExited:fl dName = " + sFldName);

// Get handle to session and page
oSes = mwaevent.getSes sion();
oPage = (PickQCPage)oSe s.getCurrentPag e();

// get additional field values
oFieldBeanList = oPage.getFieldB eanList();
sOrgCode = ((TextFieldBean )(oFieldBeanLis t.elementAt(0)) ).getValue(); // org code
sPickList = ((TextFieldBean )(oFieldBeanLis t.elementAt(1)) ).getValue(); // picking list
sLot = ((TextFieldBean )(oFieldBeanLis t.elementAt(2)) ).getValue(); // lot code
sDoc = ((ListFieldBean )(oFieldBeanLis t.elementAt(7)) ).getValue(); // doc
UtilFns.trace(" sOrgCode " + sOrgCode);
UtilFns.trace(" sPickList " + sPickList);
UtilFns.trace(" sLot " + sLot);
UtilFns.trace(" sDoc " + sDoc);

// cancel button
UtilFns.trace(" At Cancel");
UtilFns.trace(s FldName);
if (sFldName.equal s("XXC.PICKQC.C ANCEL")) {
UtilFns.trace(" In Cancel");
try {
oConn = oSes.getConnect ion();
oCStmt = oConn.prepareCa ll("{call XXC_MOB_QUICKQC _PKG.CANCEL_VAL IDATE(?,?,?)}") ;
oCStmt.setStrin g(1,sOrgCode);
oCStmt.setStrin g(2,sPickList);
oCStmt.register OutParameter(3, java.sql.Types. VARCHAR);
oCStmt.execute( );
sStatus = oCStmt.getStrin g(3); // get output parameter
UtilFns.trace(" Status " + sStatus);
oCStmt.close();
if (sStatus.equals ("S")) {
oSes.setNextFie ldName("XXC.PIC KQC.PICKLISTNO" );
}
else {
((TextFieldBean )(oFieldBeanLis t.elementAt(6)) ).setValue("Can not cancel Quick QC"); // message

// beep to alert user
NegativeSound(o Ses);

// stay at current field
oSes.setNextFie ldName(sFldName );
}
} catch (Exception e) {
NegativeSound(o Ses);
if (UtilFns.isTrac eOn)
UtilFns.trace(e .toString());
}
return;
}

// validate doc
if (sFldName.equal s("XXC.PICKQC.D OC")) {
return;
}

// get current field value
sValue = ((TextFieldBean )mwaevent.getSo urce()).getValu e();
UtilFns.trace(" Value " + sValue);

// validate Org Code
if (sFldName.equal s("XXC.PICKQC.O RGCODE")) {
try {
oConn = oSes.getConnect ion();
oCStmt = oConn.prepareCa ll("{call XXC_MOB_QUICKQC _PKG.ORG_VALIDA TE(?,?)}");
oCStmt.setStrin g(1,sValue);
oCStmt.register OutParameter(2, java.sql.Types. VARCHAR);
oCStmt.execute( );
sStatus = oCStmt.getStrin g(2); // get output parameter
UtilFns.trace(" Status " + sStatus);
oCStmt.close();
((TextFieldBean )(oFieldBeanLis t.elementAt(6)) ).setValue(""); // message

if (sStatus.equals ("S")) {
// do nothing
//mTextBean.set Value("");
}
else {
((TextFieldBean )(oFieldBeanLis t.elementAt(6)) ).setValue("Inv alid Org"); // message

// beep to alert user
NegativeSound(o Ses);

// stay at current field
oSes.setNextFie ldName(sFldName );
}
} catch (Exception e) {
NegativeSound(o Ses);
oSes.setNextFie ldName(sFldName );
if (UtilFns.isTrac eOn)
UtilFns.trace(e .toString());
}
return;
}
Quote
0 #23 Phu Tri Nguyen 2011-09-22 04:30
// validate Picking List
if (sFldName.equal s("XXC.PICKQC.P ICKLISTNO")) {
try {
oConn = oSes.getConnect ion();
oCStmt = oConn.prepareCa ll("{call XXC_MOB_QUICKQC _PKG.PICKLIST_V ALIDATE(?,?,?)} ");
oCStmt.setStrin g(1,sOrgCode);
oCStmt.setStrin g(2,sValue);
oCStmt.register OutParameter(3, java.sql.Types. VARCHAR); // status
oCStmt.execute( );
sStatus = oCStmt.getStrin g(3); // get output parameter
UtilFns.trace(" Status " + sStatus);
oCStmt.close();
if (sStatus.equals ("S")) {
// do nothing
//mTextBean.set Value("");
}
else {
((TextFieldBean )(oFieldBeanLis t.elementAt(6)) ).setValue("Inv alid Picklist"); // message

// beep to alert user
NegativeSound(o Ses);

// stay at current field
oSes.setNextFie ldName(sFldName );
}
} catch (Exception e) {
NegativeSound(o Ses);
oSes.setNextFie ldName(sFldName );
if (UtilFns.isTrac eOn)
UtilFns.trace(e .toString());
}
return;
}

// validate Lot
if (sFldName.equal s("XXC.PICKQC.L OTNO") && sValue != "") {
UtilFns.trace(" Inside Lot");
try {
oConn = oSes.getConnect ion();
oCStmt = oConn.prepareCa ll("{call XXC_MOB_QUICKQC _PKG.LOT_VALIDA TE(?,?,?,?,?,?, ?,?,?,?)}");
oCStmt.setStrin g(1,sOrgCode);
oCStmt.setStrin g(2,sPickList);
oCStmt.setStrin g(3,sValue);
oCStmt.register OutParameter(4, java.sql.Types. VARCHAR); // lot number
oCStmt.register OutParameter(5, java.sql.Types. VARCHAR); // lot quantity
oCStmt.register OutParameter(6, java.sql.Types. VARCHAR); // All scanned
oCStmt.register OutParameter(7, java.sql.Types. VARCHAR); // status
oCStmt.register OutParameter(8, java.sql.Types. VARCHAR); // last scan - Item
oCStmt.register OutParameter(9, java.sql.Types. VARCHAR); // last scan - Quantity
oCStmt.register OutParameter(10 ,java.sql.Types .VARCHAR); // message
oCStmt.execute( );
sLot = oCStmt.getStrin g(4); // lot number
sQty = oCStmt.getStrin g(5); // lot quantity
sAll = oCStmt.getStrin g(6); // All scanned
sStatus = oCStmt.getStrin g(7); // status
sItem = oCStmt.getStrin g(8); // last scan - Item
sSQty = oCStmt.getStrin g(9); // last scan - Quantity
sMsg = oCStmt.getStrin g(10); // message
UtilFns.trace(" Status " + sStatus);
UtilFns.trace(" Lot " + sLot);
UtilFns.trace(" Qty " + sQty);
UtilFns.trace(" Item " + sItem);
UtilFns.trace(" SQty " + sSQty);
UtilFns.trace(" sMsg " + sMsg);
UtilFns.trace(" sAll " + sAll);
oCStmt.close();
((TextFieldBean )(oFieldBeanLis t.elementAt(6)) ).setValue(sMsg ); // message
if (sStatus.equals ("S")) {
// set lot and scanned values
((TextFieldBean )mwaevent.getSo urce()).setValu e(sLot); // lot number
if (sQty.equals("0 ")) {
// do nothing, cusor will move to next field
}
else {
// if the picklist is fully scan, then clear everything and return picklist field
if (sAll.equals("Y ")) {
oSes.setNextFie ldName("XXC.PIC KQC.PICKLISTNO" );
return;
}
// if the lot is processed along with quantity, then clear quantity and return to lot field
if (sAll.equals("N ")) {
oSes.setNextFie ldName(sFldName );
return;
}
}
}
else {
// beep to alert user
NegativeSound(o Ses);

// stay at current field
oSes.setNextFie ldName(sFldName );
}
} catch (Exception e) {
NegativeSound(o Ses);
oSes.setNextFie ldName(sFldName );
if (UtilFns.isTrac eOn)
UtilFns.trace(e .toString());
}
return;
}
Quote
0 #24 Phu Tri Nguyen 2011-09-22 04:34
// validate Quantity
if (sFldName.equal s("XXC.PICKQC.L OTQTY") && sValue != "") {
try {
oConn = oSes.getConnect ion();
oCStmt = oConn.prepareCa ll("{call XXC_MOB_QUICKQC _PKG.QTY_VALIDA TE(?,?,?,?,?,?, ?,?,?)}");
oCStmt.setStrin g(1,sOrgCode);
oCStmt.setStrin g(2,sPickList);
oCStmt.setStrin g(3,sLot);
oCStmt.setStrin g(4,sValue);
oCStmt.register OutParameter(5, java.sql.Types. VARCHAR); // All scanned
oCStmt.register OutParameter(6, java.sql.Types. VARCHAR); // status
oCStmt.register OutParameter(7, java.sql.Types. VARCHAR); // last scan - Item
oCStmt.register OutParameter(8, java.sql.Types. VARCHAR); // last scan - Quantity
oCStmt.register OutParameter(9, java.sql.Types. VARCHAR); // message
oCStmt.execute( );
sAll = oCStmt.getStrin g(5); // All scanned
sStatus = oCStmt.getStrin g(6); // status
sItem = oCStmt.getStrin g(7); // last scan - Item
sSQty = oCStmt.getStrin g(8); // last scan - Quantity
sMsg = oCStmt.getStrin g(9); // message
UtilFns.trace(" Status " + sStatus);
UtilFns.trace(" Item " + sItem);
UtilFns.trace(" SQty " + sSQty);
UtilFns.trace(" sMsg " + sMsg);
UtilFns.trace(" sAll " + sAll);
oCStmt.close();
((TextFieldBean )(oFieldBeanLis t.elementAt(6)) ).setValue(sMsg ); // message
if (sStatus.equals ("S")) {
// if the picklist is fully scan, then clear everything and return picklist field
if (sAll.equals("Y ")) {
oSes.setNextFie ldName("XXC.PIC KQC.PICKLISTNO" );
return;
}
// if the lot is processed along with quantity, then clear quantity and return to lot field
if (sAll.equals("N ")) {
oSes.setNextFie ldName("XXC.PIC KQC.LOTNO");
return;
}
}
else {
// beep to alert user
NegativeSound(o Ses);

// stay at current field
oSes.setNextFie ldName("XXC.PIC KQC.LOTNO");
}
} catch (Exception e) {
NegativeSound(o Ses);
oSes.setNextFie ldName(sFldName );
if (UtilFns.isTrac eOn)
UtilFns.trace(e .toString());
}
return;
}

return;
}
Quote
0 #25 Rohini 2011-09-22 04:41
Hi,

You code looks fine for me. Can you explain your problem in a brief manner so that I can take a deep look?

Thanks and Regards,
Senthi l
Quote
0 #26 Phu Tri Nguyen 2011-09-22 06:37
Hi,
I cannot move the cursor to the last field without haivng the code to perform fieldExited for all the fields above it. In the form, I have fields Org Code, Pick List, Lot, Quantity, Doc, Cancel button. If I select something from Doc field while my cursor is at Pick List field, I can see that the system perform fieldExited for Pick List, Lot, Quantity field. The system should only perform the filedExited function only for Pick List field.
Now I add another button before Cancel. Now I have Transact and Cancel buttons. When I click on Cancel button, again, the system execute fieldExited for Transact button first, then Cancel button.
How do I control the flow?
Thank
Quote
0 #27 Rohini 2011-09-22 06:44
Hi,

Do you want to skip the fields in all scenarios or only in particular scenario? Did you try setting the focus of the cursor to the last field programatically ? what is the behaviour?

Kin dly clarify.

Thank s and Regards,
Senthi l
Quote
0 #28 Phu Tri Nguyen 2011-09-22 23:49
During the data entry process, the cursor lands in the Lot Code field. When user click on the Cancel button, I want the Cancel button to be execute. Here is the layout sequence for the fields in the form
Org Code
Pick List
Lot Code
Quantity
T ransact Button
Cancel Button
So when I click the Cancel button while the cursor is at Lot Code filed, the validation (or fieldExited function) is executed for Lot Code, then Quantity, then Transact Button, then Cancel Button. By the time, the fledExited function is executed for Cancel Button, it's too late.
Also, how do I disable and enable the ButtonFieldBean ?
Thank
Quote
0 #29 Rohini 2011-09-23 03:53
Hi,

In the mobile device how does the user jump from Lot code field to Cancel button?

There are APIs for enabling and disabling Button beans. setHidden(Boole an) should work i guess.

Thanks and Regards,
Senthi l
Quote
0 #30 Phu Tri Nguyen 2011-09-23 12:11
Hi,
Does it mean the fields are sequentially processed in Mobile? And yes, setHidden method works. Curently, I have to to toggle Transact and Cancel button and one can only be present at a time. Is there anyway to disable a button?
Thank you for help.
PhuTri
Quote
0 #31 Rohini 2011-09-26 04:35
As far as I know, fields are sequentially processed unless if you scan the barcode and populate the fields.

Yes you can use setHidden API to enable any of the buttons based on your condition.

Tha nks and Regards,
Senthi l
Quote
0 #32 Kranthi Kiran 2012-02-12 14:38
Hi Senthil,

Thank s for the great articles. I have a question. We have a requirement of removing some fields in Lot Page which gets invoked on pressing enter key of Lot LOV field after generating a lot by using ctrl+G(PO Page). We are not able to get the connection between these two pages. How can we invoke a page on fieldExit/Enter button? I am not able to find a method like setNextPageName . Quite puzzling as I am very new to MSCA.

Thanks a lot in advance.

-Kran thi
Quote
0 #33 mkrupun 2012-03-15 06:37
Hi

My custom page how to display the Instance name or dabase name or site name .
String username= (session.getObj ect("USERNAME") ).toString();
this.setPrompt ("ABCR-Entry :- " +username);
Currently i'm able to display Page name and user name.

Please help
Quote
0 #34 Harman 2012-04-10 13:22
Hi,

I tried to create a login on your forums to post this message but I am not receiving any email for activation of the account, so I am posting this message here.

I have created a new mobile form and everything is working fine so far, thanks to your wonderful tutorials. Just one thing has me stumped:

1. If a user clicks the "Cancel" button, how do I cancel the transaction and make the user go back to the Main Menu ?
OR
2. If the user clicks the "Start Over" button, how do I reload the mobile form in its initial state?

I would appreciate it if anyone can help me with this.

Thanks!
H
Quote
0 #35 Mohankumar Nagalinga 2014-09-25 08:20
Hi Senthi,

Business wanted the confirm subinventory and confirm locator disable for some specific items in Oracle mobile putaway page.Is there any anyway with out modifying the java code and MWA personalization framework? Kindly let me know the same.

Thanks
Mohan N
Quote
0 #36 Mohankumar N 2014-09-25 09:32
Hi Senthil,

Business wanted to disable the confirm subinventory and confirm locator for some specific items during receiving,since its a WMS enabled org,they use mobile gun for receiving (Move any LPN page),Is there any anyway to accomplish this with out modifying the java code and MWA personalization framework?

Kindly let me know the same.

Thanks
Mohan N
Quote
0 #37 ganapati 2015-06-10 10:00
suppose

LPN.setValue("83810.1.A1")
LPN.setValue("83810.1.A2")
LPN.setValue("83810.1.A3")

Could you please tell how to clear the subfield values for this bean when we use setValue for LPN we also have to

after quering lov.. I need only 83810.1.A3

Please help.
Quote
0 #38 Mohankumar N 2015-11-02 09:02
How to disable a buttion in MSCA?
Quote
0 #39 apivekzeso 2021-06-11 13:52
http://slkjfdf.net/ - Irukeoquv Ikufaqo bcp.pvab.apps2f usion.com.faj.e x http://slkjfdf.net/
Quote

Add comment


Security code
Refresh

Search Trainings

Fully verifiable testimonials

Apps2Fusion - Event List

<<  Jun 2021  >>
 Mon  Tue  Wed  Thu  Fri  Sat  Sun 
   1  2  3  4  5  6
  7  8  910111213
14151617181920
21222324252627
282930    

Enquire For Training

Related Items

Fusion Training Packages

Get Email Updates


Powered by Google FeedBurner