Sunday, 4 September 2016

ADF Jdeveloper Installing on Server and Local Machine

How-To Install & Configure WebLogic Server to Run ADF 11g Applications in Production 

To Install the ADF on server, follow below links :

http://www.oracle.com/webfolder/technetwork/jdeveloper/howto/11114/managedserver/wlsadfms.html




Software

The JDeveloper software can be obtained from here ... then selecting the Downloads tab -> Archived Downloads -> Oracle JDeveloper 11g 11.1.1.7.0 -> Accept License Agreement ->  jdevstudio11117install.exe (that constitutes the Studio Edition for Windows including JDK 6.

Prerequisites

Disable virus scanners - to make your life easier, disable any virus scanners during the installation as this will slow the install process down if the virus scanner scans each Java archive. This has from experience been a particular problem with McAfee's products, and I recommend an alternative virus scanner.

Administrative access – you'll require privileges to install software onto the local PC.

Installation

1) On the local Windows PC execute the jdevstudio11117.install.exe. This will display the Oracle Installer Welcome dialog:





2) Selecting Next presents the Choose Middleware Home Directory dialog where you can select an existing Fusion Middleware Home directory or create a new one. It's recommended you always install each JDeveloper installation in it's own directory, so create a new directory either by typing the directory in the text box or using the Browse button.

  




If you have multiple developers setting up JDeveloper on their local PCs, it's recommended you standardize the installation directories, and cater for multiple JDeveloper versions. In the picture above C:\Oracle\Middleware reflects a separate directory for Middleware. As alternative a later version Middleware_11.1.1.3.0 build 5560 could be installed under C:\Oracle\Middleware\JDev11gBuild5560. Note to avoid cross-platform issues in the future it's recommended you standardize the capitalization of the directories too.

3) Selecting Next presents the Choose Install Type dialog, allowing you a choice between installing the full package or customizing the install and dropping off components:

   



As it's unknown what future parts of JDeveloper will be required for development purposes it's recommended the Complete installation option is chosen. If you do choose the Custom option you'll be presented with the Choose Products and Components dialog:




.....where you need to make you're own informed choices.

4) Next presents the Confirm Product Installation Directories dialog. Of note are the base Middleware Home Directory, and the two separate directories for the actual JDeveloper software and the separate integrated WebLogic Server:

 


5) The Choose Shortcut Location dialog displayed next gives you options to create the JDeveloper Windows group either for the current user or all users on the local PC. As multiple developers may use the same PC, giving access to all users may be the preferred option:

 


If you do choose to create the JDeveloper Windows group in all users accounts, assuming you have administrative rights on the local PC for installing JDeveloper, install at the end of this process that the installed JDeveloper files can also be run by other users on the same PC.

6) The Installation Summary dialog on selecting Next displays what will be installed, how much disk space will be consumed: 



Select Next starts the installation process:

 


7) On successful completion the Installation Complete dialog will show:

  


Leaving the Run Quickstart checkbox checked and selecting the Done button will close the installer and open the Quickstart program (explained in the next section). We'll assume you uncheck the checkbox and start JDeveloper separately below.

Your JDeveloper installation is now complete.

What was Installed

Post installation JDeveloper will have installed the following:

1) Under the specified installation directory the JDeveloper and integrated WebLogic Server files will exist:

 


2) A new directory C:\bea will have been created if this is your first Fusion Middleware install with the file beahomelist. This text file when open reveals the installation home directory for each product installed.

3) Within the Windows Start menu a new group Oracle Fusion Middleware 11.1.1.7.0 will exist:

  


4) When you run JDeveloper for the first time it will create two sets of files under the Windows user directories for the current user. Where these are found depends on which version of Windows you're using. Older versions including Windows XP stores the files under:

a) C:\Documents and Settings\<username>\Application Data\jdevhome\jdev

...in that directory you'll notice a subdirectory like "system11.1.1.7.40.64.93" where the system directory numbering scheme references the version of JDeveloper and build number (e.g. version 11.1.1.7.0 and build 5536 from the example above) you've installed. Multiple versions of JDeveloper will see additional system directories created here.

b) C:\Documents and Settings\<username>\Oracle\oradiag_

....I'm not entirely sure what this directory is used for presumably capturing diagnostic information. Maybe it's enabled by selecting the "Allow automated usage reporting to Oracle" option in the following section.

If you're using a modern version of Windows the likely location for these files are:

a) C:\Users\<username>\AppData\Roaming\JDeveloper
b) C:\Users\<username>\Oracle

Running JDeveloper

You can open JDeveloper via the Windows group Oracle Fusion Middleware 11.1.1.7.0 – JDeveloper Studio 11.1.1.7.0 option. The first dialog you'll see is the loading window:

  
 
At certain points during the load JDeveloper will prompt you for more information, including:

1) The Select Role dialog will display:

  

This allows you to select different developer modes for the IDE which influence which features run. As typically it's unknown what the developer will be doing in thee future, selecting the Default Role option and unselecting the Always prompt for role selection on startup checkbox are recommended.

If you wish to turn this dialog back on at a later date, it's preference is accessible via the JDeveloper menu option Tools -> Preferences -> Roles, then selecting the Always prompt for role selection on startup checkbox.

2) The first time you run a newly installed JDeveloper version, if you have previous versions of JDeveloper installed on the same machine, the installer will prompt you to migrate the user's settings from the previous JDeveloper install into the new JDeveloper install:

 



3) On the IDE opening for the first time it will prompt you to associate certain file types under Windows with the IDE:

  

This is a personal preference left up to the reader.

4) On the IDE opening for the first time it will prompt you to report back IDE errors and crashes to Oracle Corporation:

  

Assuming Oracle is actually gathering and using these statistics, this can be useful for improving the quality of the IDE in the future. However it may be against your organization's security policy to enable this. In addition if JDeveloper has connectivity problems in reaching Oracle's website this could also slow JDeveloper down.

5) On the IDE opening for the first time it will display a Tip of the Day:

     

Enabling or disabling this is a personal preference left up to the reader.

JDeveloper is now running for the first time.

After sometime you might see the  "Updates are available" blue popup in the bottom right of the IDE:

   
JDeveloper periodically scans external plug in servers to see if there are updates available to various parts of the JDeveloper install. Blindly accepting the choices provided can result in developers having inconsistent installations, and code that will work on one developer's PC but not anothers as the wrong updates are installed. Thought needs to be given on standardizing the patches installed and if the update feature should be used at all.

Priming the Integrated WebLogic Server (WLS)

To speed up further development in JDeveloper it's useful to run and stop the integrated WebLogic Server (WLS) such that it is initialized for the first time. To do this:

1) Select the Run -> Start Server Instance (IntegratedWebLogicServer) option:

 



2) As a result in the Log window under the Running: IntegratedWebLogicServer child tab, you'll see the WLS server initialize and start for the first time:

   



Of particular note you're looking for the <Server started in RUNNING mode> message that shows a successful initialization.

3) To stop the WLS server, in the Log window select the red box icon, then the IntegratedWebLogicServer option:

  



4) In the resulting Log window under the Running: IntegratedWebLogicServer child tab, you'll the WLS messages as it shuts down:

  


This completes the initialization of the integrated WebLogic Server.


Ref : http://one-size-doesnt-fit-all.blogspot.ae/2010/08/installing-jdeveloper-11g-v111120-under.html



Sunday, 7 August 2016

Preventing user Actions on a ADF page when the other process is running

Using the java Script we can restrict the user action when the other action is running
just by calling event.preventUserInput();

Calling this method prevents all user input while the event is being processed, including while the event is propagated to the server. The UI is automatically unblocked when processing for this event is complete. Ignores request for events that do not propagate to the server.


<af:resource type="JavaScript">
 function showGlasspane(event){
    event.preventUserInput(); 
  }
 </af:resource>

<af:commandButton actionListener="#{xxTestBean.SelectAll}"
      text="Select All" clientComponent="true"
      id="cb1" partialTriggers="t1">
    <af:clientListener method="showGlasspane" type="action"/>
</af:commandButton>

Steps to use:

Create jsff view based on any VO

Add the resource to the jsff





Create a button and add the clientListener  to  button and call the javascript



Create the taskflow with jsff view and place it on jsf page as region and test. you can verify,
This action in turn triggers the client side JavaScript method first, and then calls "SelectAll" action on server. You may notice the change in the mouse cursor at this stage - mouse cursor to an hourglass. And changes back to normal mode, when processing for this event is complete.






Monday, 18 January 2016

Inventory Item Details


Item with its template name.

SELECT msi.segment1, mit.template_name
  FROM mtl_item_templ_attributes mita,
       mtl_system_items_b msi,
       mtl_item_templates mit
 WHERE     mita.attribute_value IS NOT NULL
       AND mita.attribute_name = 'MTL_SYSTEM_ITEMS.ITEM_TYPE'
       AND mit.template_id = mita.template_id
       AND mita.attribute_value = msi.item_type
       AND msi.organization_id = 103


================================================


  SELECT it.template_name, ita.attribute_name, ita.attribute_value
    FROM mtl_item_templates it, mtl_item_templ_attributes ita
   WHERE     it.template_name LIKE 'xxx%'
         AND it.template_id = ita.template_id
         AND ita.attribute_value IS NOT NULL

ORDER BY 1, 2



Monday, 2 November 2015

On Hand as of the Date

SELECT ITEM_CODE,
       ORGANIZATION_CODE,
       TRANSACTION_QUANTITY,
       cost,
       LCM_Value,
       PO_Price,
       PO_Value,
       (SELECT PERIOD_NAME
          FROM GL_PERIODS
         WHERE     PERIOD_SET_NAME = 'Accounting'
               AND ADJUSTMENT_PERIOD_FLAG = 'N'
               AND TRUNC (TRANSACTION_DATE) BETWEEN START_DATE AND END_DATE)
          PERIOD_NAME
  FROM (  SELECT inventory_item_id,
                 ITEM_CODE,
                 ORGANIZATION_CODE,
                 SUM (TRANSACTION_QUANTITY) TRANSACTION_QUANTITY,
                 MAX (ROUND (COST, 2)) cost,
                 SUM (ROUND (COST * TRANSACTION_QUANTITY, 2)) LCM_Value,
                 MAX (PO_Price) PO_Price,
                 SUM (ROUND (PO_Price * TRANSACTION_QUANTITY, 2)) PO_Value,
                 MAX (TRANSACTION_DATE) TRANSACTION_DATE
            FROM (SELECT msib.inventory_item_id,
                         '''' || msib.segment1 || '''' item_code,
                         mp.ORGANIZATION_CODE,
                         mmt.TRANSACTION_QUANTITY TRANSACTION_QUANTITY,
                         cst_cost_api.get_item_cost (1,
                                                     msib.inventory_item_id,
                                                     mp.organization_id,
                                                     NULL,
                                                     NULL)
                            COST,
                         MMT.ACTUAL_COST PO_Price,
                         mmt.TRANSACTION_DATE TRANSACTION_DATE
                    FROM apps.mtl_material_transactions mmt,
                         apps.mtl_system_items_b msib,
                         apps.mtl_parameters mp,
                         apps.mtl_transaction_types mtt
                   WHERE     1 = 1
                         AND mtt.transaction_type_id = mmt.transaction_type_id
                         AND mmt.inventory_item_id = msib.inventory_item_id
                         AND mmt.organization_id = msib.organization_id
                         AND mp.organization_id = mmt.organization_id
                         AND mmt.transaction_type_id = mtt.transaction_type_id
                         AND transaction_type_name NOT IN
                                ('Layer Cost Update', 'COGS Recognition')
                         -- AND msib.segment1 = 'M000000420279-1'
                         AND (:P_ORGANIZATION_ID IS NULL
                              OR :P_ORGANIZATION_ID = mmt.organization_id)
                         AND NVL (mmt.TRANSACTION_QUANTITY, 0) <> 0
                         AND TRUNC (mmt.transaction_date) <=    -- :p_trx_date
                                TO_DATE (:p_trx_date, 'YYYY/MM/DD HH24:MI:SS'))
        GROUP BY inventory_item_id, item_code, ORGANIZATION_CODE --        HAVING SUM ( TRANSACTION_QUANTITY ) <> 0
                                                                )
 WHERE TRANSACTION_QUANTITY <> 0

GL On Hand Qty

SELECT *
  FROM (  SELECT mkv.CONCATENATED_SEGMENTS category,
                 gjb.NAME batch_name,
                 gjh.NAME journal_name,
                 DECODE (:P_GROUP_BY,
                         'Item', '''' || msib.segment1 || '''',
                         'Category', NULL,
                         NULL)
                    item_code,
                 SUM (mmt.TRANSACTION_QUANTITY) TRANSACTION_QUANTITY,
                 -- DECODE ( :P_GROUP_BY , 'Item' ,SUM ( mmt.TRANSACTION_QUANTITY ) , 'Category' , NULL , NULL ) TRANSACTION_QUANTITY,
                 SUM (xal.accounted_dr) accounted_dr,
                 SUM (xal.accounted_cr) accounted_cr
            FROM apps.gl_je_headers gjh,
                 apps.gl_je_lines gjl,
                 apps.gl_je_batches gjb,
                 apps.gl_import_references gir,
                 xla.xla_ae_lines xal,
                 xla.xla_ae_headers xah,
                 xla.xla_transaction_entities xte,
                 apps.mtl_material_transactions mmt,
                 apps.mtl_system_items_b msib,
                 apps.gl_code_combinations_kfv gcc,
                 apps.mtl_parameters mp,
                 mtl_categories_kfv mkv,
                 mtl_item_categories mic,
                 apps.mtl_transaction_types mtt --, GL_JE_BATCHES_HEADERS_V gjv
           WHERE     gjh.je_header_id = gjl.je_header_id
                 AND gjh.je_header_id = gir.je_header_id
                 AND gir.je_header_id = gjl.je_header_id
                 AND gir.je_line_num = gjl.je_line_num
                 AND gjb.je_batch_id = gir.je_batch_id
                 --     AND gjl.period_name = 'AUG-12-13'
                 AND gir.gl_sl_link_id = xal.gl_sl_link_id
                 AND xal.ae_header_id = xah.ae_header_id
                 AND xal.application_id = '707'
                 AND xah.application_id = '707'
                 AND xte.application_id = '707'
                 AND xal.ACCOUNTING_CLASS_CODE = 'INVENTORY_VALUATION'
                 AND xah.entity_id = xte.entity_id
                 AND xte.source_id_int_1 = mmt.transaction_id
                 AND mtt.transaction_type_id = mmt.transaction_type_id
                 AND mmt.inventory_item_id = msib.inventory_item_id
                 AND mmt.organization_id = msib.organization_id
                 AND mp.organization_id = mmt.organization_id
                 AND mp.ORGANIZATION_CODE = 'UAE'
                 AND gcc.segment3 IN (100510)
                 AND gjl.code_combination_id = gcc.code_combination_id
                 AND gjh.JE_SOURCE = 'Cost Management'
                 AND mic.inventory_item_id = msib.inventory_item_id
                 AND mic.category_id = mkv.category_id
                 AND mic.organization_id = mmt.organization_id
                 AND TRUNC (mmt.TRANSACTION_DATE) BETWEEN              --NVL (
                                                         TO_DATE (
                                                             :P_DATE_FROM,
                                                             'YYYY/MM/DD HH24:MI:SS') -- ,TO_DATE (  '01/01/2000', 'DD/MM/YYYY' ) )
                                                      AND              --NVL (
                                                         TO_DATE (
                                                             :P_DATE_TO,
                                                             'YYYY/MM/DD HH24:MI:SS') -- ,TO_DATE ( '01/01/2050',  'DD/MM/YYYY'  ) )
        -- AND TRUNC ( mmt.TRANSACTION_DATE ) BETWEEN :P_DATE_FROM AND :P_DATE_TO
        -- AND gjh.NAME = 'Jan-15 Inventory EUR'
        -- AND gjb.NAME = 'Cost Management A 32432 3878403'
        -- AND mkv.CONCATENATED_SEGMENTS = 'Children.Accessories.Default'
        --  AND gjh.je_header_id =26
        GROUP BY gjb.NAME,
                 gjh.NAME,
                 mkv.CONCATENATED_SEGMENTS,
                 DECODE (:P_GROUP_BY,
                         'Item', '''' || msib.segment1 || '''',
                         'Category', NULL,
                         NULL))
UNION ALL
  SELECT 'Manual',
         gjb.NAME batch_name,
         gjh.NAME journal_name,
         NULL Item_code,
         NULL TRANSACTION_QUANTITY,
         SUM (gjl.ACCOUNTED_DR) gl_line_debit,
         SUM (gjl.ACCOUNTED_CR) gl_line_credit
    FROM apps.gl_je_headers gjh,
         apps.gl_je_lines gjl,
         apps.gl_je_batches gjb,
         apps.gl_code_combinations_kfv gcc
   WHERE     gjh.je_header_id = gjl.je_header_id
         AND gjb.je_batch_id = gjh.je_batch_id
         AND gjl.code_combination_id = gcc.code_combination_id
         AND gcc.segment3 IN (100510)
         AND gcc.segment1 IN (002)
         AND gjh.je_source = 'Manual'
         AND gjh.status = 'P'
         AND gjl.status = 'P'
         --       AND gjh.period_name = 'Jan-15'
         AND gjh.period_name IN
                (SELECT PERIOD_NAME
                   FROM GL_PERIODS gl
                  WHERE PERIOD_SET_NAME = 'Accounting'
                        AND ADJUSTMENT_PERIOD_FLAG = 'N'
                        AND PERIOD_YEAR BETWEEN (SELECT PERIOD_YEAR
                                                   FROM GL_PERIODS gl
                                                  WHERE PERIOD_SET_NAME =
                                                           'Accounting'
                                                        AND ADJUSTMENT_PERIOD_FLAG =
                                                               'N'
                                                        AND PERIOD_NAME =
                                                               :P_PERIOD_FROM)
                                            AND (SELECT PERIOD_YEAR
                                                   FROM GL_PERIODS gl
                                                  WHERE PERIOD_SET_NAME =
                                                           'Accounting'
                                                        AND ADJUSTMENT_PERIOD_FLAG =
                                                               'N'
                                                        AND PERIOD_NAME =
                                                               :P_PERIOD_TO)
                        AND PERIOD_NUM BETWEEN (SELECT PERIOD_NUM
                                                  FROM GL_PERIODS gl
                                                 WHERE PERIOD_SET_NAME =
                                                          'Accounting'
                                                       AND ADJUSTMENT_PERIOD_FLAG =
                                                              'N'
                                                       AND PERIOD_NAME =
                                                              :P_PERIOD_FROM)
                                           AND (SELECT PERIOD_NUM
                                                  FROM GL_PERIODS gl
                                                 WHERE PERIOD_SET_NAME =
                                                          'Accounting'
                                                       AND ADJUSTMENT_PERIOD_FLAG =
                                                              'N'
                                                       AND PERIOD_NAME =
                                                              :P_PERIOD_TO))
GROUP BY gjb.NAME, gjh.NAME