JDeveloper 10.1.3 ADF Faces & BC: how to refactor a data control?

Hi all

Don't know if anyone else has experienced this problem, but as our application is iteratively, we ran in the case of uses of "Dialogues LOV' being required for several modules of the application. According to my experience as a swing developer, we can easily refactor a class an arch 'common' package-specific module and reduce code redundency. However, due to the nature of JSF/ADF and the mashup of technoglogies, this isn't a process in a straight line forward multiple dependencies (pageDef, viewobject/am/faces-config xml files, etc...) Does anyone have any suggestions on how to better approach question?

Thank you
Wes

Hi Wes,

I can say that things in r10.1.3.x of refactoring-based ADF BC is going to be a little painful.

[url http://technology.amis.nl/blog/2859/fear-for-renaming-refactoring-adf-bc-objects-in-jdeveloper-is-not-unfounded] This blog is particularly detailed.

Best,

John

Tags: Java

Similar Questions

  • JDeveloper 10.1.3 ADF Faces & BC: how to get the hostname of h

    Hi all

    How can I get the hostname of the server that your application is deployed via the request form?

    I know that on a javax.servlet.ServletRequest class, the method is called getLocalName(). Is there a way to access this information in the am?

    Thank you
    Wes

    Wes,

    Something like that?

    try {
            InetAddress addr = InetAddress.getLocalHost();
    
            // Get IP Address
            byte[] ipAddr = addr.getAddress();
    
            // Get hostname
            String hostname = addr.getHostName();
        } catch (UnknownHostException e) {
        }
    

    John

  • ADF Faces 10g: how to clear a < af:table > component?

    Hello

    I use JDeveloper/ADF 10.1.3.

    I have a page with 2 iterators on the same point of view (always in search mode), a search form and a table of results. As there are many rows in the view and I don't want to interrogate him without search criteria in order to avoid all the results, I put the refresh of the iterator property to ${adfFacesContext.postback == true}.

    I did a search button linking the Execute action and a reset button, forcing the find action. Now, when I hit the reset button, I also want to reset the table (query results) empty. How to do this? I couldn't find any method to empty all lines in lavel, nor to the iterator, table or view.

    Thanks in advance for your answers.

    Hello
    I don't have a declarative solution for you, but a few possible solutions or ideas to do.
    1 put a method in end of request module show the method to the client (data control). This method can either remove all the lines of the VO (call removeCurrentRowFromCollection() for each line currently in the t, but keep them in the DB).
    2. you can try to use executeEmptyRowSet() (I'm not sure that it is available in 10.1.3).) and hope that it deletes all rows of the rowset (the method is not documented, so I'm olny guess its function).
    3. run your search with parameters, you are sure that they will not return any result. This can be made from a bean to support.

    Timo

  • [Table ADF Faces component] How to save the current state?

    Hello

    the ADF faces table component is great!
    You can drag-and - drop columns, sort columns...

    Now, we have an obligation to save the State of the table for subsequent sessions.
    The return of the user wants to get the same State as last time (order requirement or sort of column), even if he comes back a few days later.
    Is this possible?

    I discovered, that this information is stored in the session cookie. But this cookie is discarded in a few minutes...

    Any tips?

    fschulze,

    If you use 11 GR 1 material - you can read about MDS in chapters 33 and 34 of the Fusion for the ADF Developer's Guide - it does exactly what you ask... an update, don't know if it will save the sort order, but the documentation specifically mentions column reorganization as being recorded.

    John

  • ADF Faces: RicheTableau - how to create a richeTableau method of bean datacontrol object that returns a list of objects

    Build JDEVADF_12.1.2.0.0_GENERIC_130608.2330.6668

    I have a data bean control method that returns a list of SearchResultRow objects. Each SearchResultRow has a list of SearchResultColumn objects. SearchResultColumn is the attribute name, value, type of data.

    The method returned data looks like:

    SearchResultRow {col1, a1, string}, {col2, a2, date}, {col4, 13, number}, {col4, a4, string}

    SearchResultRow {col1, b1, string}, {col2, b2, date}, {col4, 23, number}, {col4, b4, string}

    SearchResultRow {col1, c1, string}, {col2, c2, date}, {col4, 33, number}, {col4, c4, string}

    I try to display searchResult table depending on whether it

    col1 col2 col3 col4

    A1 a2 a4 13

    B1 b2 b4 23

    C1 c2 c4 33

    I drag my return value of method to the jsf page to create a link to the tree.

    < Tree IterBinding = "retrieveSearchResultsIterator" id = "SearchResultRow" >

    < nodeDefinition DefName = 'model. SearchResultRow"name ="SearchResultRow0">

    < AttrNames >

    < item Value = "resultType" / >

    < / AttrNames >

    < accessors >

    < item Value = "searchResultColumns" / >

    < / accessors >

    < / nodeDefinition >

    < nodeDefinition DefName = 'model. ResultColumn"name ="SearchResultRow1">

    < AttrNames >

    < item Value = "name" / >

    < item Value = 'length' / >

    < item Value = "query" / >

    < item Value = 'type' / >

    < item Value = 'value' / >

    < / AttrNames >

    < / nodeDefinition >

    < / tree >

    On my jsf page, I added a table then reused the liaison of the tree.

    < af:table value = "#{bindings." SearchResultRow.collectionModel width}"= '100% '.

    var = "row" rowBandingInterval = "0" id = "t3" binding = "#{backingBeanScope.backing_Test4.t3}" partialTriggers ="": b1 ' columnStretching 'last' = > "

    My thought is in backing bean, loop through the table variable "line" which is my SearchResultRow and then loop SearchResultColumns of the line to build the RichColumn and add it to the table.

    My question is: is this feasible? How can I get hold of the var 'line' backing bean?

    Any other suggestions how to proceed?

    Thank you.

    I thought about it the adf table creation dynamically.

    This link is useful. ORACLE ADF (Application Development Framework): creating dynamic table

  • ADF Faces: RicheTableau - how to create a richeTableau object

    Hello. How to create a richeTableau object to put in a JSF page? I need to make a method that gets a list of column names and a list of list of data. This code I wrote do not work. What was my mistake?
            public RichTable getADFTable(
            List<String> lstCols, List< List<String> > lstLstData
        ){
            RichColumn adfCol = null;
            List<RichColumn> lstRichCols = new ArrayList<RichColumn>();
            
            int cont = 0;
            for( String col : lstCols ){
                adfCol = new RichColumn();
                adfCol.setDisplayIndex(cont++);
                adfCol.setHeaderText( col );
                adfCol.setMinimumWidth( "60" );
                lstRichCols.add( adfCol );
            }
            
            
            int contCols = 0;
            RichOutputText text = null;
            RichTable AdfTab = new RichTable();
            for( List<String> lstData : lstLstData){
                for( String data : lstData ){
                    text = new RichOutputText();
                    text.setValue(data);
                    lstRichCols.get( contCols ).getChildren().add( text );
                    contCols++;
                }
                contCols = 0;
            }
            
            AdfTab.setRows(this.lstEntit.size());
            
            cont = 0;
            for( RichColumn col : lstRichCols ){
                AdfTab.getChildren().add( col );
            }
            
            return AdfTab;
        }

    I was looking for an example and I found it but the errors of the Pentecost, finally I fixed it and it works.

    Just generate the data of your Web services and 'put' in this structure.

    The java file (bean)

     
    
    package view;
    
    import java.util.ArrayList;
    import java.util.HashMap;
    import java.util.List;
    
    import java.util.Map;
    
    import org.apache.myfaces.trinidad.model.CollectionModel;
    import org.apache.myfaces.trinidad.model.SortableModel;
    
    public class DynamicTable {
        private SortableModel model;
        private List columnNames;
    
        public DynamicTable() {
            columnNames = new ArrayList();
            columnNames.add("Col-1");
            columnNames.add("Col-2");
            generateColumnModel();
        }
    
        public void generateColumnModel() {
            this.model = new SortableModel(createRows(columnNames));
        }
    
        private List createRows(List columnNames) {
            int i = 0;
            List mapListforRows = new ArrayList();
            for (String name : columnNames) {
                Map newRow = new HashMap();
                mapListforRows.add(newRow);
                for (String col : columnNames) {
                    newRow.put(col, "data");
                }
            }
            return mapListforRows;
        }
    
        // Get table model
    
        public CollectionModel getCollectionModel() {
            return model;
        }
    
        public void setColumnNames(List columnNames) {
            this.columnNames = columnNames;
        }
    
        public List getColumnNames() {
            return columnNames;
        }
    }
    

    The file jspx (page)

               
                    
                      
                        
                      
                    
                  
    
  • ADF 11 g / how to set the data source

    Hi all

    I'm trying to deploy the my application on weblogic server.
    deployment was successful but the following error has occurred so that the home page opened, "password is zero".
    I already have a password will be saved and deploy, but it seems that password is not deploy.
    So I create a data source on weblogic.
    but I have found that the way to set the data source in the model of the adf.
    (Production version of 11g Jdeveloper + Adf)

    Thank you.

    Mucahid behaved

    Do you use a jdbc url or a jdbc data source?
    Model project in you right click on the module of the application and select configuration. Change the configuration to use a jdbc data source.

    Timo

  • How to create the data control to a custom object of sale cloud using web service.

    Hi all

    I'm working on a requirement I need to display the common custom object data and their children object. After the display of the data user will be able to select multiple records by using the check box and then update the State to close.

    So basically, I need to create a table in which the data will fill with the checkboxs and when the user clicks on the button update then I need to update a field in the parent object.

    Any help would be appreciated.

    Thank you

    You must follow the steps below

    1. right click on the template project, select the new option

    2 Select the data control in the left hand side of the tab "All Technologies"

    4 Select "control of data from the Web Service" in the right side panel

    3. Enter the name of the data control (custom name)

    4. provide your WSDL to the URL https://crm-domain.oracleoutsourcing.com/foundationCustExtn/CrmCommonReferenceService?wsdl

    5. click Next, next if all methods to winow than wsdl, mix to the right and click Finish button

    6 refresh "data control" in your right side panel to request

    7 expand control of data and select only control data that you have already given

    8. then you can see the methods that comes from your wsdl.

    9. Select the method and expand it, you will get the return values

    10. drag and drop the return as a table value, you will get the af:table on the page

    11. don't want to operatet this table.

  • ADF faces with the META tag

    Hi guys,.

    I am with a problem. I need to add the META tag in a JSF page that works with ADF Faces. How does do it?

    The tag I need to add is:
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    Thank you very much

    http://technology.AMIS.nl/Blog/4631/ADF-11g-include-meta-data-tags-in-head-element-using-afdocument-and-metacontainer-facet

  • How to reuse data control

    I can create ADF business components library JAR files. However, how to reuse the data control? Y at - it a tutorial?

    YE,

    If you add the ADF library JAR file in a project, associated data commands will appear in the project too much. The developer of Fusion for the ADF, described precisely in the section [url http://download.oracle.com/docs/cd/E14571_01/web.1111/b31974/reusing_components.htm#sthref2706] 33.3.3 Guide

    John

  • JDeveloper 10 g &amp; ADF Faces: how to pass parameters to the html page request?

    I have a simple HTML as follows:
    ...
    < name of the form = "form1".
    action = "http://myserver/MyApp/faces/start.jsp".
    method = "POST" >
    < label for 'USER' = > USER < / label >
    < input type = "text" id = "USER" > < / input >
    < input type = "submit" value = "Send" > < / input >
    < / form > < / body >
    ...
    In my ADF Faces application, I traced a javax.servlet.Filter custom class with the following text for the doFilter method:

    ' Public Sub doFilter (ServletRequest request, ServletResponse response,)
    FilterChain chain) throws IOException,.
    ServletException {}

    System.out.println ("filter in MyApp");
    Map map = request.getParameterMap ();
    User String = (String) map.get('zoom') ("USER");
    System.out.println ("map of ask size:" + map.size () + "user:" + user);

    ...
    }

    What is printed:

    02/11/16 14:27:26 filter in MyApp

    02/11/16 14:27:26 length of content: 0 coding: iso-8859-1 getContentType: application/x-www-formulaires-urlencoded

    02/11/16 14:27:26 size request card: 0 user CRDBApps: null


    What can be the problem?

    Thank you!

    Hi Wes Fang

    Maybe you can try to use "name" instead of "id" for the input tag?

    
    

    success
    Jan Vervecken

  • How should I do side tabs in ADF Faces?

    A common component in the web pages of today is an element, similar to the af: panelTabbed, but with the tabs on the side (start, end) for the position, instead of above and below only as panelTabbed. I also see this in JDeveloper in the property inspector and other void signs during their layout is horizontal. For example, ADF Faces has a component that does this? How would I do that. Any suggestions?

    The tab item can be on top or below.
    If you want to have the side tabs, you could use af:commandImageLink with an image of the tab. When you press it, you can switch the content on the right, for example by using an af:switcher or a dynamic region.

  • Where is the HTML of JDeveloper 11g ADF FACES?

    I use JDeveloper 11.1.1.2.0 for my project. I remembered in 10g I a list of HTML tags such as, afh:tableLayout, afh:cellFormat, etc. under ADF FACES HTML package. However, in new JDeveloper 11 g, I saw that ADF carrots and there is no ADF Faces HTML tag. They are always available in 11g? If so, how can I install these tags in JDeveloper 11 g?

    You will need to add the components of the Trinity to your project - tags are there.
    But the question is if you really need to use these components, or maybe the layout components that provide the ADF Faces will be enough for you.

  • How to bind RichTextbox of ADF / Data Control Jdeveloper 11g R1

    Hello

    Can you please help me to link RichTextbox of ADF / Data Control in Jdeveloper.

    I am able to bind to inputText, button. But impossible to find for Richtextbox.

    Thank you

    Swathi

    GoTo pagedef and add the attribute binding in the bindings section

    Steps-

    Click the Green more icon--> to select in the generic links section attribute values--> click Ok--> select data source, and the attribute and then click Ok

    Then select on the RichTextEditor page editor and write in the value property that's how - #{bindings. AttributeName.inputValue}


    Ashish

  • How to conditionally bind the declarative component custom ADF ADF Faces

    Hi gurus,

    I created the custom declarative component called "Historical Record", following the article of Frank Nimphus Oracle ADF Code corner: How to bind custom declarative ADF Faces components and it works perfectly find.

    But I want to strengthen further to make more generic, as in Oracle EBS we can go to all the blocks and choose Tools-> history of the record and it shows WHO columns to the currently selected record.

    The intention is conditionally bind the attributes of the component with columns of WHO bodies VO.

    The scenario is:

    * all tables have Created_Date, Modified_Date for columns of the WHO.

    * the page containing the 2 instances of VO with different source (for example:-> emp dept)

    * whenever I have navigate dept records it should display columns WHO selected dept and the same thing then to move through the records of the emp.

    Kind regards

    Ferrere

    Well as I said, you shouldn't try to rebuild the Oracle Forms technology-specific behavior in some other technologies such as ADF (because it is not usually possible).

    It is probably best to have a separate button for each shape (square to a coherent position on all pages - as some form, toolbar header...)

    If you want to rebuild the behavior of forms, then you can use the combination of af: clientListener / af:serverListener to set a flag (as the name iterator) see scope that can be used by your 'global' button to retrieve the correct data. Therefore, add af:clientListener to each component entry...

    Dario

Maybe you are looking for