Store the value of the client side in the .jsf page

Hello

I implemented the functionality of line selection using check box in an af:table paginated . The user can select a record by activating the individual checkbox at the level of each line or select all the records by selecting the checkbox "Select all" at the level of the table header. I added a client listener that fires on the box click and the javascript function I capture the unique value of each line and then invoke a server event and by passing all the unique values captured.

I've also attached a server listener that calls a method in the managed bean. In the method I capture all the unique values (which went from java script) in the java collection and then storing the collection in the view range.

On the page, I have a button 'Submit' who collect all values stored in the field of view and execute the necessary business logic. This full feature works very well.

My requirement is to improve the flexibility of the page.

When the user selects the check box, it takes around a second deal with the life cycle complete .jsf page.

Is it possible to avoid the call Server to store the values in the field of view instead if I can store the decision-making value on the client side-side (which I believe will improve performance) and then finally when the user presses the button "submit" I'll enter the stored values on the client side and complete the rest of the business logic.

Please let me know if this is possible in the page .jsf which is developed in the ADF with JDev 12 c (12.1.3) or please suggest another approach.

Indications will be useful.

Thanks in advance.

Kind regards

Gerard

There are two ways to do this, consider for example the browser Local storage / storage of Session:

http://blog.teamtreehouse.com/storing-data-on-the-client-with-localStorage

Tags: Java

Similar Questions

  • Automatically, click a CommandButton in the JSF page after loaded the page

    I need to automatically, click the command button 'refreshPage' after loading of the JSF page below: (after trying the code in blue comment I'm unhappy. Please help!)

    <? XML version = "1.0" encoding = "UTF - 8"? >
    "< jsp:root xmlns:jsp ="http://java.sun.com/JSP/Page"version ="2.1"
    "xmlns:f ="http://java.sun.com/jsf/core"
    "xmlns:h ="http://java.sun.com/jsf/html"
    "xmlns:AF ="http://xmlns.oracle.com/adf/faces/rich"
    "xmlns:PE ="http://xmlns.oracle.com/adf/pageeditor"
    Cust ="http://xmlns.oracle.com/adf/faces/customizable" >. "

    < f: loadBundle basename = "oracle.webcenter.portalframework.sitestructure.resource.PortalAppPageResource"
    var = "portalResource" / >
    < jsp:directive.page contentType = text/html"; Charset = UTF - 8 "/ >

    < f: view >

    < af:document id = "d1" title = "#{portalResource ['home_title']}" >

    <!-< af:clientListener method = "callRefreshButton" type = "load" / >
    < af:resource type = "javascript" >
    function callRefreshButton()
    {
    var button = AdfPage.PAGE.findComponentByAbsoluteId ("refreshPage");
    ActionEvent.queue (button, true);
    }
    < / af:resource >->

    < af:messages id = "m1" / >
    < af:form id = "f1" >

    < af:pageTemplate value = "#{bindings.pageTemplateBinding.templateModel}" id = "pt1" "
    viewId="/oracle/webcenter/portalapp/pagetemplates/pageTemplate_swooshy.jspx" >
    < name f: attribute = "showNavigation" value = "#{true}" / >
    < f: facet 'content' = name >
    < af:group id = "g1" >
    < af:inputText label = "Label 1" id = "it1" / >
    < / af:group >
    < / f: facet >
    < / af:pageTemplate >

    <!-< af:commandLink id = "refreshPage" text = "refreshPage.
    action = "#{WangBean.reloadPage} '"
    rendered = 'true '.
    inlineStyle = "do-size: small;" color: white; »
    partialSubmit = "true" clientComponent = "true" >
    < / af:commandLink >->

    < af:inputText value = "#{bindings." Sdan8.inputValue}.
    columns = "#{bindings." Sdan8.hints.DisplayWidth}.
    maximumLength = "#{bindings." Sdan8.hints.precision}.
    shortDesc = "#{bindings." Sdan8.hints.ToolTip}"id ="it2.
    Visible = "false".
    inlineStyle = "do-size: medium;" make-weight: bold; ">
    < f: validator binding = "#{bindings." Sdan8.validator} "/ >"
    < af:convertNumber groupingUsed = "false".
    model = ' #{bindings. " Sdan8.format} "/ >"
    < / af:inputText >

    < / af:form >

    < / af:document >
    < / f: view >
    < / jsp:root >

    Timo,

    I got it works!

    What happened is that I didn't notice that the system generated a method of PollEvent by default for me inside my WangBean after I created the af:poll component:

    {} public void reloadPage (PollEvent pollEvent)

    Add your code here

    }

    Once I pasted my code in the vote started working as expected and the inventory button. Component AF:poll solve my problem.

    Thank you very much and I have learned 2 new staffs ADF on your part, am really appreciated.

    Kind regards

    Yi

  • How do I reload the JSF page

    Hi all

    I'm working on an application where I have three tables linked together (master-detail-detail). I have created two forms and the table of the sources of data in the table of these master-detail-detail. I added corresponding createInsert
    and validate operations for each my form and table on the JSF page. The tables have 3 columns which is generated by a sequence in the database. I display as a text output in my page. When I created the new line of this table, it is not be displayed until I have reload the page by typing the url. based on this value, I should create the rows in other tables.

    The app should work the way below

    1. I should be able to create a row in the first table using CreateInsert operation. -> I am able to create and could see the line in the db

    2. I should be able to create a row in the second table, which is a child of the first table. Dynamically, it must take the value of one of the tables for the foreign key attribute. -> Is the case that if I reload the page manually by pressing

    the url... but not if I don't charge it. I guess that the iterator does not refreshsed.

    I need to reload the page, either programmatically or by using the Configuration of the ADF. Please help me in doing this.


    Thanks in advance

    You have configured a composite relationship between the master and detail?
    This should take care of automatically put in the id of this master in new records that you create in the part detail.
    http://docs.Oracle.com/CD/E16162_01/Web.1112/e16182/bcentities.htm#sm0150

    Also instead of do a reload of the entire page, it would probably be best to do a refresh of partial page for the section, you need to refresh.

  • AF:table on the JSF page

    JDeveloper 11 g 11.1.1.2

    Hello

    I'm new to jdeveloper, I would like to add a table to a JSF page, I need to display data from an inner join query that is for example to two tables:

    Select columnA, ColumnB, ColumnC to join internal of the tableX TableY on tableX.columnD = tableY.columnD where tableX.columnE =: bind_variable

    I tried to add an object from view as follows: type of data source: only read through SQL query access, wrote the request, added a variable but there is no entry created under the section of data commands and so I can't drag and drop in the JSF page view to create the table , in addition, I don't know how to set a value for the "bind_variable" of the support bean which is mandatory since the value that I have to use the "bind_variable" depends on the user input.

    Thank you.

    The module app (check the checkbox) in the last step of the wizard you selected?

    bacing bean, you can provide the value of the variable binding, and run the query.

    DCBindingContainer bc = (DCBindingContainer) this.getBindings ();
    DCIteratorBinding dcIb = bc.findIteratorBinding("yourvoIterator");
    ViewObject vo = dcIb.getViewObject ();
    vo.setNamedWhereClauseParam ("bind_variable", value);
    vo.executeQuery ();

  • How to call "j_security_check" in the jsf page

    Hello

    with ADF security set up in Jdeveloper11.1.1.2, it automatically generates login.html and error.html for forms authentication.

    I found in login.html, the form action is "j_security_check" and I try to customize the page of connection with the jsf page, but do not know how to call "j_security_check" in the jsf page, there is no action attribute more within the af: form and I can't find the "j_security_check" in the action of Expression commandButton control build.

    Thanks in advance.

    Best regards
    Bill

    Hello

    you will need to add the login form to the JSf page wrapped in f: verbatim to show as part of the JSF page. JSF 1.2 using f: verbatim shoucl be no need, but in my experience, is best.

    If you develop and deploy on WLS, then Chapter 30 of the Fusion Developer Guide has a solution of God for you to build a form of connection in JSF completely

    http://download.Oracle.com/docs/CD/E15523_01/Web.1111/b31974/adding_security.htm#BABDEICH

    This requires any of j_security_check

    Frank

  • focus on something specific to the JSF page

    How we can focus on something specific to the JSF Jdev 11g page.
    In our use case user chose something of a radio button that he wanted to focus on a specific page element.
    Thank you.

    I don't think so. Another thing is to insert some JavaScript to code page (backing bean):

                    FacesContext facesContext = FacesContext.getCurrentInstance();
                    ExtendedRenderKitService service = (ExtendedRenderKitService)
                    Service.getRenderKitService(facesContext, ExtendedRenderKitService.class);
                    service.addScript(facesContext, "alert(\"Hello!\");");
    

    Pedja

  • Questions of text wrap in the jsf page.

    Hi experts.

    In jdev 12.1.3. and IE 11.

    How define the texts be auto-enveloppé in a field editable multiline?
    I tried:
    For a compenent of af: inputText in an af:form, I put the rows of the af property: inputText > 1, then there will be several lines showed.
    but the text will not auto-enveloppé when I enter texts in this area.
    AND the text will be auto-emballé when I put this readonly field.

    < af:inputText value = "#{bindings." Contents.inputValue}.

    label = "#{bindings." Contents.hints.label}.

    required = "#{bindings." Contents.hints.Mandatory}.

    columns = "#{bindings." Contents.hints.displayWidth}.

    maximumLength = "#{bindings." Contents.hints.Precision}.

    shortDesc = "#{bindings." Contents.hints.ToolTip}"id ="it4.

    readOnly = "#{bindings." "{Status.inputValue lt 1} ' lines =" 14"

    wrap = "hard" > ""

    < f: validator binding = "#{bindings." Contents.Validator} "/ >"

    < / af:inputText >

    Can someone help?

    Thank you.

    Post edited by: BAO. SZ and IE 11

    Hello

    my last post code must be placed in your css file, then in the inputText: styleClass = "wrapInputText."

    or you can add the inputText: inlineStyle = "' space: string pre; '"

    Kind regards

    Ruben.

  • selection of default choice for selectOneChoice in the JSF Page in the ADF

    I want to show the default choice in af:selectOneChoice here is the component of selectOneChoice

    < af:selectOneChoice label = "Search the Notifications" id = "soc1.

    Binding = "#{SupervisorApprovalsBean.lovNotificationType} '"

    valueChangeListener = "#{SupervisorApprovalsBean.searchNotificationLovChange} '"

    autoSubmit = 'true '.

    inlineStyle = ' height: 15px ">

    < af:selectItem label = "Approved" value = "Y" id = "si3" / >

    < af:selectItem label = "Denied" value = "N" id = "si1" / >

    < af:selectItem label = "Raw" value = "U" id = "si2" / >

    < af:selectItem label = 'All' value = 'A' id = "si4" / >

    < / af:selectOneChoice >

    I want to choose the third selectItem. How can I do?

    User, tell us your version of jdev, please!

    To do this, you set the value property to the index of the default value. You ave not set the property value at all, it means that the selection is not stored at all.

    Timo

  • Onload event management to add business logic to the JSF page in ADF

    I want to know how to handle the onload event so that add us business logic once a view is loaded.
    In short, that's what I want to achieve-
    I have an entity object that I show as editable ADF table. Once the page is loaded and I want the table to show at least 4 tiers bit regardless of the number of lines now exist in the database table. For example, if the database table has 2 entries then table ADF should show these 2 rows and 2 additional lines in the table of the ADF. And if the database table has 6 ranks, it should show 6-row table of the ADF. How to programmatically manage this feature. What functions and methods, I need to replace or add. Any help is appreciated.

    Thank you.

    https://pinboard.in/search/u:OracleADF? query = onLoad

  • Listeners of bean not invoked in the Facelets page fragment in Jdeveloper 12 c

    Hi all

    I'm working on an ADF application and facing the issue, as described below.

    I created a facelets page, index.jsf. In the jsf page, I added a taskflow bounded as a region.

    The taskflow, MainTF.xml, is based on fragments of the page. The default activity on the page is a page1.jsff of pageFragment, which comes from the facelets.

    Now inside the page1.jsff, I have a pane of the < af:link > with the property of listener action pointing to a bean method.

    When I run index.jsf, < af:link > is rendered, but clicking on it, the actionlistener is never called.

    The jsff source code is as below:

    <?xml version='1.0' encoding='UTF-8'?>

    < UI:composition xmlns:UI = "http://java.sun.com/jsf/facelets" xmlns:AF = "http://xmlns.oracle.com/adf/faces/rich" >

    < af: link text = "#{viewScope.ABean.aa} ' id = "l1" actionListener = "#{viewScope.ABean.al}" / >

    </ UI:composition >

    If I replace the tag < ui:composition > < ui:fragment > tag, as shown below, the page works as expected and the action listener is called by clicking on the link

    <?xml version='1.0' encoding='UTF-8'?>

    < UI:fragment xmlns:UI = "http://java.sun.com/jsf/facelets" xmlns:AF = "http://xmlns.oracle.com/adf/faces/rich" >

    < af: link text = "#{viewScope.ABean.aa} ' id = "l1" actionListener = "#{viewScope.ABean.al}" / >

    </ UI:fragment >

    So my question is, has anyone faced with a similar problem? I've seen several code samples where < ui:composition > works very well, then is there something I could do wrong here?

    Also, if I continue to use the <ui:fragment> tag, which will cause problems down the line?

    The version of Jdeveloper I use is: JDEVADF_12.1.3.0.0_GENERIC_140521.1008.S

    Thank you

    Gopal

    Try to surround yourself with af: link with containers (af:panelGroupLayout, af:panelBox,...)

    Dario

  • External JSF pages to view the contents of the URL

    Hello

    Is it possible for a JSF page that uses the PanelPage component and the ADF controls to provide menus, etc to actually allow an HTML page (accessed via a URL to an external site/application) to be displayed somewhere in the JSF page?

    For example, clicking on a menu item to an external HTML page causes the page currently displayed in a frame or similar in the JSF page?

    I tried the FrameBorderLayout control and control Frame to try to integrate a picture to display such a page through the establishment of goals for a menu item, but that doesn't seem to work. At least not when in a PanelPage. It works within a basic JSP page.

    I would have thought that it would be possible for an application of JSF to incorporate content from other sites/servers HTML as if a part of the application. Even if it meant the definition of 'wrapper' of some pages effectively sort the link in the JSF application within its rules of navigation.

    Or am I missing something?

    Gene

    Hello

    You can use an iFrame wrapped in a f: tag verbatim. This will make

    Frank

  • Why should store the database call should be server-side?

    Hi gurus,

    I use the tool obpm.

    I have a requirement to store the data in the database. I catalogued the required tables. I wrote a so-called method "storeDetails" in which I'm defining all the required values in the DB and then object by calling the method of the store .

    My question is why should he 'storeDetails' method is configured as a method on the server side?

    Kind regards
    Neya

    There is a misunderstanding common and essential to understand. Even today, some people think that BPM Oracle 10g supports not both server-side and client (things made from your browser by pressing the application of the workspace)-side (database calls, web service calls...).

    Methods marked as server-side mean they need the Oracle BPM engine to make the connection (for example the thread pool of database for database calls). SQL calls are thus only by the engine (server side). Separate the features of the workspace (client side) and the engine (server side), is an important way that customers can improve performance because you can choose to group together or both. Keeping the side Server and client side separate, you can scale the workspace as your number of end users increase. You can scale your engines as your number of cases increases.

    The engine can do tasks side server because it is what has been built to make. The workspace was built instead to do client-side UI and to publish data on end users, according to the needs.

    Dan

  • Validation in the form of manual client-side

    I have a manual form on multiple pages in my application. I'm doing a simple validation using javascript client-side. I have two fields for zip and zip code more (XXXX-XXXX). Each field must be validated that they are numbers and the postal code must be 5 numbers and zip should be 4 numbers. Here is the code that I placed in the APEX_ITEM in the SELECT statement in report region Blind Trusts.

    To ZIP Code:
    APEX_ITEM.text(12,c009,5,5,
    'onblur="if ((this.value != null && this.value !='''') && isNaN(this.value))
    {alert(''Zip Code must be numbers.'');this.focus();} 
    else {if (this.value.length !=5)
    {alert (''Zip Code must be 5 numbers.'');this.focus();} }"') 
    For Zip more:
    APEX_ITEM.text(13,c010,4,4,
    'onblur="if ((this.value != null && this.value !='''') && isNaN(this.value))
    {alert(''Zip Plus must be numbers.'');this.focus();} 
    else {if (this.value.length !=4)
    {alert (''Zip Plus must be 4 numbers.'');this.focus();} }"') 
    My environment is APEX 3.2 and Oracle 10 g Rel 2 database using IE7.

    I imported my request on APEX. ORACLE.COM:
    Workspace: RGWORK
    Username: TESTER
    Password: test123
    Application: Disclosure of financial information (30894)

    Run the Application as follows:
    Page 1 > update of the current year (Page 6) > next Question (Page 2) > trusts (Page 4) > click Yes > enter Zip code and Zip over the last 2 fields in the column address.

    It does not validate the postal code at all, but it does not validate the zipper more. It brings back stitch to zip more. Why it is not working?

    Can someone please help?

    Thank you

    Robert
    http://apexjscss.blogspot.com

    Hello

    Now, there are sample on the page we check yesterday.
    Not enter digital charters and dialog is open warning that

    Kind regards
    Jari

    Published by: jarola on February 9, 2011 18:21

    I've done region html without model standing before the footer

    
    

    You can place this html also for example some other footer region

    Then JavaScript

    $(function(){
     $( "#alert-dialog" ).dialog({
      autoOpen:false,
      modal:true,
      buttons:{
       "Ok":function(){
        $(this).dialog("close");
       }
      }
     });
    });
    function validateNumber (pThis,pNumber,pName)
    {
    if ((pThis.value != null && pThis.value !='') && isNaN(pThis.value))
    {
     $("#alert-dialog-text").text("Zip Code must be numbers");
     $("#alert-dialog").dialog("option",{
      beforeClose:function(){
       pThis.focus();
     },
     title: 'Zip Code'
     }).dialog('open');
    } else {
          if (pThis.value.length !=pNumber)
          {alert (pName + ' must be '+pNumber+' numbers.');
              pThis.focus();
              return false;
             }
         else {return true;}
         }
    }
    
  • Open a browser on the client side

    Hi all

    I have to open a new browser window client side when a user clicks a button.
    What are the possible ways to do this, and what is the recommended way to do this taking into account browser dependencies.
    I tried to give a destination as http;//google.com < af:goLink > with _blank targetFrame.
    Can you please proved some links that may help me to do the best possible.

    Kind regards
    ND

    Hello

    It depends on what is the use case: want to open a page of the application in a separate window or you want to open a browser window that is not for the application itself? Are options you have

    (i) goLink with targetFrame = _blank (as you may have guessed)
    (II) issue Java JavaScript that calls window.open on the client (works with all browsers)
    (III) use the dialogue box browse with dialog: navigation-case and control knob for useWindow = true (use it to open the pages of the application in a dialog box)
    (IV) use the af: popup for dialog boxes that open as part of a page. (Use to display additional information like the list of values)

    Frank

  • Store the new values in the table in the new row so that the 'old' remains in the previous lines

    Hello

    I am a student of genius embedded. I did a VI where I change the values of digital controls, and it saves it as a table.
    I want to store the pair of new values in the new row of this table.
    I have attached a VI where I can change the values of numeric control, as well as the number of lines from another control. But when I change the values, all values in the output table change including values in the previous row. I want these lines to be unchanged and that new line to update.

    Need help.

    If I understand correctly, you want to always 4 models. If so a 2D table will do the trick (see annex VI), otherwise crossrulz' solution should work.

Maybe you are looking for