Dynamic PPR and Partial Triggers

Hi,
I would like to know whether adding a UIComponent for dynamic re-rendering via ADFFacesContext.addPartialTarget() also triggers re-rendering of components having it as a partialTtigger. Currently, I am seeing that such somponents are not dynamically re-rendered. For example:
<af:inputText id="testInputText" value="#{testBean.inputTextValue}" binding="#{testBean.inputText}" autoSubmit="true" clientComponent="true"/>
<af:outputText value="#{testBean.inputTextValue}" partialTriggers="testInputText" clientComponent="true"/>While autosubmission triggers the partial update of the outputText, if I dynamically partial update the inputText via some other action, the outputText does not get re-rendered. Is this a bug or is this the intended working? How do I partially update some other component which already listens on the other component for partial updates without manually specifying it everywhere in the code. I ask this because it feels wrong to have to declare the listening in XHTML and then keep on re-declaring it everywhere in the java code.
Thank you.
Vikram

Hi,
1. you can do this from Java easily. So instead of using the declarative efresh you can use
AdffacesContext.getCurrentInstance().addPartialTarget(outputText);
then to notify dependent listeners on the output text you use
AdffacesContext.getCurrentInstance().partialUpdateNotify(outputText);
Note that the risk of the framework parsing and refreshing all dependencies implicitly would likely cause loops of refreshes that your page never gets out of. So best is to keep this under the control of the developer.
2. To do the same declaratively: If you want to have dependent components declaratively refreshed (e.g. the output text component when the input text component is PPRed, then instead of refreshing the input text component in response to a PPR event, refresh the surrounding container e.g. panelFormLayout or panelGroup.
Frank

Similar Messages

  • ChangeEventPolicy vs partial triggers - are they mutely exclusive?

    Under section 24.4.3 of the 11.1.2 Fusion Guide, the guide has the following to say about the changeEventPolicy property:
    "When you create a form, setting up PPR to work for all the components in the form can be time consuming and error prone. To alleviate this, you can set the changeEventPolicy attribute to ppr on value bindings. Doing so means that anytime the associated component’s value changes as a result of backend business logic, the component will be automatically rerendered. You can also set an iterator binding’s changeEventPolicy to ppr. When you do this, any action or value binding associated with the iterator will act as though its changeEventPolicy is set to PPR. This allows entire forms to use PPR without your having to configure each component separately."
    Fair enough, this property can save us setting up our own partial triggers.
    What isn't clear to me, is are they mutely exclusive? If changeEventPolicy is set to PPR, can we/should we still use partial triggers on the same page? I ask because I know it's easy to accidentally setup a circular partial triggers scenario which causes the application to break, so presumably with a combination of changeEventPolicy=PPR and partial triggers the same problem can occur.
    Does anyone have any opinions or advice to share please?
    Thanks,
    CM.

    changeEventPolicy=ppr affects only fields that are databound to binding attributes associated with this certain ppr'ed iterator.
    If you have other UI components that are dependant on some databound fields but do not bind to such, they will not be notified of changes unless they point to them using partial triggers. This usecase still requires partial triggers.
    One will also need to use them and change changeEventPolicy to none if he or she has some advanced field dependency where some fields have require update only after certain field is changed or in a specific order.
    Change event policy also alters other behaviours significantly. I am not sure if this is what should happen, bet if you have a form for a record including some af:selectOneChoice components bound to required attributes, ADF will warn user about them after EACH edit of any field that binds to a PPR'ed iterator. Let's say you have 4 af:inputText's and 4 selectOneChoice's. User gets 4 messages 4 times - after each inputText loses focus. And each of the messages will warn about 4 fields (soc'es) that "must have a value". This is certainly annoying to users.
    There are many more cases where changing changeEventPolicy to none solves mysterious problems - dependant LOV's, showPrintablePage or other "operation" behaviours.
    And yes, ppr'ing everything imposes notable impact on performance. Though I can't prove it easily, but it really feels different on weblogic instances running in slow machines (say 4 years old laptop).

  • Partial triggers not Fired on partial submit when invalidate component

    Can somebody tell me why Partial triggers are not Fired on partial submit when invalidate component in the validator. Neither error message next to the component is displayed.
    Does somebody has an idea how can i solve this?
    Thank you very much in advance

    Hi, that is a test case which i have promised you:
    The .jspx page contains two fields , one of which has autosubmit = true; You will see, that when invalidate test field 2 partial triigers on field 1 are not fired neither faces message next
    to the field 2 appears.
    If you add programatically Field 1 and Field 2 partial trigerrs this solve the problem.
    I'm waiting for your response.
    Regards,
    Krasi
    <?xml version='1.0' encoding='windows-1251'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:af="http://xmlns.oracle.com/adf/faces"
    xmlns:afh="http://xmlns.oracle.com/adf/faces/html">
    <jsp:output omit-xml-declaration="true" doctype-root-element="HTML"
    doctype-system="http://www.w3.org/TR/html4/loose.dtd"
    doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
    <jsp:directive.page contentType="text/html;charset=windows-1251"/>
    <f:view>
    <afh:html>
    <afh:head>
    <meta http-equiv="Content-Type"
    content="text/html; charset=windows-1251"/>
    <title>pprTest</title>
    </afh:head>
    <afh:body>
    <af:form>
    <af:panelLabelAndMessage label="Test Field 1">
    <af:outputText binding="#{testBean.testField1Comp}"
    partialTriggers="testField2"/>
    </af:panelLabelAndMessage>
    <af:inputText label="Test Field 2"
    id="testField2"
    autoSubmit="true"
    binding="#{testBean.testField2Comp}"
    partialTriggers="testField2"
    validator="#{testBean.testField2_validator}" />
    </af:form>
    </afh:body>
    </afh:html>
    </f:view>
    </jsp:root>
    import javax.faces.application.FacesMessage;
    import javax.faces.component.UIComponent;
    import javax.faces.context.FacesContext;
    import oracle.adf.view.faces.component.UIXInput;
    import oracle.adf.view.faces.component.core.input.CoreInputText;
    import oracle.adf.view.faces.component.core.output.CoreOutputText;
    import javax.faces.application.FacesMessage.Severity;
    public class TestBean {
    private CoreOutputText testField1Comp;
    private CoreInputText testField2Comp;
    public TestBean() {
    public void testField2_validator(FacesContext facesContext,
    UIComponent uiComponent, Object value) {
    // If input equals "invalidate" set value of the
    // testField1Comp on "Component is invalid"
    // Invalidate input and add an error message
    if (((String)value).equals("invalidate")) {
    testField1Comp.setValue("Component is invalid");
    invalidateInput( (UIXInput)uiComponent,"TestField2","Test Field 2 is invalid!");
    // If input not equals "invalidate" set value of the
    // the testField1Comp on "Component is valid"
    else{
    testField1Comp.setValue("Component is valid");
    //Dynamic adding of the partial targets , solves the problem
    // with losing of partial triggers
    //AdfFacesContext.getCurrentInstance().addPartialTarget(testField1Comp);
    //AdfFacesContext.getCurrentInstance().addPartialTarget(uiComponent);
    public void setTestField1Comp(CoreOutputText testField1Comp) {
    this.testField1Comp = testField1Comp;
    public CoreOutputText getTestField1Comp() {
    return testField1Comp;
    public void setTestField2Comp(CoreInputText testField2Comp) {
    this.testField2Comp = testField2Comp;
    public CoreInputText getTestField2Comp() {
    return testField2Comp;
    public static void invalidateInput(UIComponent uiComp,String compName, String message) {
    showErrorMessage(uiComp , message);
    if (uiComp instanceof UIXInput){
    ((UIXInput) uiComp).setValid(false);
    public static void showErrorMessage(UIComponent component, String message) {
    showMessage(component, message, FacesMessage.SEVERITY_ERROR);
    private static void showMessage(UIComponent component, String message, Severity severity) {
    String compId = component.getId();
    FacesContext ctx = JSFUtils.getFacesContext();
    FacesMessage facesMessage = new FacesMessage(
    severity, component.getId() , message);
    ctx.addMessage(compId,facesMessage );
    }

  • ADF Faces: PPR and Dialog framework

    Hi All,
    I know that there have been some navigation-related issues reported with 10.1.3 and the dialog framework, so if this is a bug.....
    Anyway, I have an ADF Faces page that displays some data (from ADF View Object) in an af:Table. I have an "Edit Record" button and a "Create Record" button in the appropriate facets of the table. The 2 buttons use a dialog: navigation case (useWindow=true) to open a pop-up window with a record displayed for editing. Each of the buttons also has partialSubmit=true with an appropriate ID set on the button.
    Now, I am trying to get the table to refresh upon return from the dialog. After much experimentation, I have found that setting the partialTriggers property on the af:OutputText components that are inside the af:Table->af:Column will cause an existing row to refresh upon return from the edit button. However, I cannot get a new row to show up inside of the table upon return from the create button. I have tried setting partial triggers on the af:OutputText, af:Column, af:Table, etc all the way up to the top-level af:Page to no avail. I have also tried refreshing the iterator binding in the dialog return, to no avail. If I completely refresh the page (see sample code below), the record does show up, but it does cause other undesirable side effects (screen scrolls to the top, af:showDetailHeader's re-set their state, etc).
    Any pointers are appreciated...
    Here is the code behind my create button:
      public String performCreateCheck()
        DCBindingContainer bindings = getBindings();
        OperationBinding operationBinding = bindings.getOperationBinding("CreateNewCheck");
        Object result = operationBinding.execute();
        // Stuff snipped - the CreateNewCheck binding does a "CreateInsert" on my VO
        return "dialog:EditCheck";
      }Here is the code that refreshes the page (causes the new row to appear):
      protected void refreshCurrentPage()
        FacesContext context = FacesContext.getCurrentInstance();
        String currentView = context.getViewRoot().getViewId();
        ViewHandler vh = context.getApplication().getViewHandler();
        UIViewRoot x = vh.createView(context, currentView);
        x.setViewId(currentView);
        context.setViewRoot(x);
      }Kind regards,
    John

    Found this: http://radio.weblogs.com/0118231/stories/2004/09/23/notYetDocumentedAdfSampleApplications.html#81
    on Steve M's blog. His example uses exactly the same method that I do. However, It would be nice to get this working "properly" with PPR instead of refreshing the whole page. Here are what I see as the drawbacks to the "refresh the whole page" method:
    1). The page will scroll up to the top. If the page is bigger than a screenful, this is an annoyance.
    2). Any af:showDetailHeader's will have their disclosed property reset (unless you implement some method of saving their state). This is an issue for me, as the af:Table is inside of a normally un-disclosed af:showDetailHeader
    3). If any component anywhere puts something into the faces messages (e.g. "Record saved"), it will be lost when the page is refreshed.
    Any ideas on how to get this working with PPR?
    Regards,
    John

  • Dynamic PPR in ADF Tree

    Is it possible to dynamically add a partial target to be rendered in the subsequent response in ADF Tree?
    Say for example I have a tree as follows:
    Root
    - Child 1
    - Child 1.1
    - Child 1.2
    - Child 1.3
    - Child 2
    - Child 2.1
    - Child 2.2
    Now I would like to re-render ONLY "Child 2.2" when "Child 1.3" is updated via "autoSubmit" or "f:ajax". Note the knowledge of the "node to be rendered" is not available during design time, i.e. it is only dynamically known when a value is being set in "Child 1.3" or for that fact any other node.
    I could bind the component to a UIComponent and then use "context.addPartialTarget(UIComponent)" but the way that I see it, component binding is a view build time process and when the tree nodes are being rendered, it uses the same UIComponent instance to render each of the nodes and would try to fetch each of the visible node and see whether a change has been made and partially render it accordingly on the condition whether it has been changed or not. I need a mechanism in which if I change "Child 1.3" and it specifies to partially re-render "Child 2.2", it shoud ONLY re-render child 2.2 and not any other node whatsoever.
    Is this currently possible? Moreover are <f:ajax> and ADF PPR interoperable?

    Glad to know the answer. Thank you. :)
    Here's a suggestion which is inline with JSF
    JSF 2.0 (or was it 1.2) defines PartialViewContext which has it's roots with <f:ajax>. PartialViewContext basically states all the client ID's which will be re-rendered durig this process with a mutable getRenderIds() collection (although it's mutable, it's not specified in the docs whether changing it will lead to actual changing of the list or not. It works for the Mojarra implementation in WLS 12.1 (Mojarra 2.1.5) but was not working in 10.3.5 (Mojarra 2.0.9). In any case I can always override the PartialViewContextFactory to provide a wrapper of PartialViewContext which supports mutating). What I would like to propose is that since I can dynamically state client ID's which needs to be re-rendered, I can state the client ID's of the node components and they be rendered accordingly. This would be very helpful since in our current implementation we were hoping to have a very optimized implementation of af:tree which could be having several nodes and each node can change depending upon a change in any other subsequent node.
    I have tried this new method and it works like a charm with other ADF components including components within iterators and switchers, howsoever it failed to work inside a tree. It would actually be a good addition/fix.
    Thank you once again.

  • Default dynamic attributes and weightings on BID invitation

    Based on certain business logic i need to default dynamic attributes and weightings on bid invitation transaction BBP_BID_INV,
    I tried to do some code in method BBP_QUOT_CHANGE of BADI
    BBP_DOC_CHANGE. The execution doesn't stop at that method as i put a breakpoint there.
    However it does stop at  BBP_BID_CHANGE method, i could not use this method because et_weight internal table is not available there ( i need to populate something in weightings) although ET_DYN_ATTR is available.
    Question is , for what purpose BBP_QUOT_CHANGE is used ?
    Let me know if you have any inputs ..
    -With Thanks
    Alok Pathak

    Hi,
      BBP_QUOT_CHANGE  method is used for QUOTATION.Whenever any change is done in the Quotation then this method is triggered.
    BR,
    Disha.
    Pls reward pointsfor useful answers.

  • Dynamic actions and PA-PD integration a problem

    Are you aware of an update problem with MSS and PA-PD integration?  This information was made available in a presentation to us last year.  Was this issue resolved in mySAP ERP 2004?
    Dynamic actions and PA-PD integration a problem
    Dynamic actions and PA-PD integration are not
    processed on updates made from the web (but in the
    background through a batch or call transaction session)
    That’s why most standard PCRs require HR to process
    the transaction using the SAP GUI in the foreground
    This normally affects changes to infotypes 0000 &
    0001
    Then the next slide states:
    Workaround for dynamic actions
    Review dynamic actions in table T588Z (use SE16 to
    display) and document the infotypes and values that
    trigger dynamic actions
    Incorporate those infotypes into your background
    processing and web forms (if necessary)
    Workaround for PA-PD integration
    Include the integration steps for these infotypes in your
    background processing (just as in conversions)

    Hi John,
    Not sure if it is fixed.. or can be fixed.. we are still in 47  & Use custom code to account for Dynamic Actions.. the PCR processes use the function module HR_MAINTAIN_MASTERDATA to update the infotypes. This function mimics a BDC & hence cannot handle Dynamic Actions... Basically, the issue is not with MSS but it is the way Dynamic Actions work.. to quote SAP  "Dynamic actions are not correctly processed in batch input sessions since in batch input the sequence of the screens needs to be predefined correctly. To be able to process dynamic actions in batch input, the checks of the dynamic actions need to be programmed when creating the batch input session. To avoid errors when programming and running the session, the static actions  only are processed in batch input. Calls of infotypes that are triggered by dynamic actions should be realized by separate Transaction calls.
    Please take a look at OSS Note #386027 for additional info about Dynamic Actions.
    Regards,
    Suresh Datti

  • ADF 11g Partial Triggers Row Column Update By Column in the Same Row

    Hi.
    I have a situation whereby I have a checkbox in a table row, which has an eventchangelistener, which upon activation, trys to update another column in the same row. I can not get this to work through partial triggers, even though I have set up my ids up correctly. The row though can be updated by a command button outside of the table using the same coding techniques, but I need it updated via the checkbox.
    Is there a limitation in updating a column within a row, from another row column's event change listener.
    Thanks.

    Updating the other rows from the checkbox works fine for me. Here is what I did.
    I DnD Emp table with a new column that says if the emp is new hire. If the checkbox is checked, I set Firstname and Lastname for that row as NewHire. I have partial triggers on Firstname and Lastname columns to update whenever checkbox is checked/unchecked and autosubmit on checkbox to true. Hope this helps.
    Try adding column selection property to single and see if it helps.
    Edited by: asatyana on Jan 16, 2012 12:48 AM
    Edited by: asatyana on Jan 16, 2012 12:49 AM

  • Difference between Report Template "Standard (PPR)" and "Standard"?

    What is the difference between Report Template "Standard (PPR)" and Report Template "Standard"? What does PPR mean and what makes it different? Why would you use PPR rather than just standard?
    Thanks,
    Linda

    Hello,
    PPR (Partial Page Refresh) is just a term used to describe some AJAX pagination and sorting functionality, it's just a holdover from before the term AJAX existed.
    You can just change the template and on your report to enable that functionality. In 3.0 it will just be on off switch in your pagination options.
    Carl
    Message was edited by:
    Carl Backstrom

  • Can I set autoSubmit="true" and partial trigger in Application Def. Editor?

    Hello Expert,
    Can I set autoSubmit="true" and partial trigger or other properties through JHeadstart Application Definition Editor?
    If I have changed the layout or add item though the Def. Editor, I have to regenerate and the manually modification
    on jsff will be overridden. Any suggestion to solve this problem?
    So far I know the page generation can be disabled, however, what if I have to regenerate the definition but want
    to remain the manual modification in Jsff?
    Thanks
    Neon

    Neon,
    You can use the "Depends on Item" property in the application definition editor. You can set this property on an item, or an item region, region container.
    The items that is specified as depends on item, will get autoSubmit="true" and the dependent items of region will get partial triggers that listen to the depends on item.
    Even if you need settings you can't generate, there is no need to switch off generation of the entire page.
    We never do this, we always specify custom templates for the bits and pieces of the page that we want to customize.
    Have you read section 4.7 "Customizing Using Generator Templates" in JHeadstart Developer's Guide?
    Steven Davelaar,
    JHeadstart team.

  • Template: 13. Standard (PPR) and column sorting

    When I use the template "template: 13. Standard (PPR)" and have column sorting setup for that region, I get the following script error when accessing my app and try to sort on a column.
    missing ) after argument list
    html_PPR_Report_Page(this,'R142222838802...3829',false,false,false,'fsp_sort_7')');
    Have other seen this error too? The work around for me is to not use the PPR template.
    Regards,
    Todd

    Hello,
    PPR (Partial Page Refresh) is just a term used to describe some AJAX pagination and sorting functionality, it's just a holdover from before the term AJAX existed.
    You can just change the template and on your report to enable that functionality. In 3.0 it will just be on off switch in your pagination options.
    Carl
    Message was edited by:
    Carl Backstrom

  • Partial triggers between two different jsff

    hi is it possible to obtain the information from the table in one jsff page in another jsff page thro partial triggers..........
    (i.e) we have the read only table in one jsff page and we need to obtain the information of the row into another jsff page which has a form....
    Both the fsff pages are in the same jspx page with different task flows

    Hi,
    this seems to be a duplicate of displaying content from table in one jsff to form in another jsff page
    Frank

  • Partial triggers doesnt work with Geo maps

    Hi All,
    Partial triggers are not working with Geo Maps.In dvt:map, PartialTriggers , when i select a table/command button from edit option,Field shows Red Mark, throws "Reference not found".
    What could be the reason ??
    Please help
    Thanks
    Sandeep.G

    Hi Priya ,
    See selectoneradio
    "The rule is that you cannot set at the same level the properties render and partialTriggers."
    Remove the partialTrigger from the inputText field, surround it by a component, f.ex. a panelHorizontal where you put the partialTrigger.
    It should then work.
    Regards,
    Didier.

  • Difference Between Port Forwarding and Port Triggering.

    Hi guys,
    I'm lost! The differences between port forwarding and port triggering is driving me nuts! It all seems very subtle to me. Can anyone explain to me (in a very simple way) what exactly are their differences. Thanks in advance!!

    Port Forwarding
    The big difference between this and port triggering is that forwarding is fixed.. you forward a port and it is always forwarded.. IE available to connection.. basically the forwarded port is excluded from the fire walling abilities of the router.  Second it is static and applies to one machine only. Whereas you could set port triggering to the router and thereafter any machine on the LAN can trigger it unless its already in use.. port forwarding must be specified for each individual machine.
    Port forwarding requires you to give each PC on the network its own unique static IP address.. Although there is ssh port forwarding that can be set dynamically. Most users only have the option of static ip port forwarding.
    The real downside of port forwarding is that it can be very tricky to set up... You may have to allow a series of ports on a machine and have to do that for each machine you want to allow through. Also routers often have limited abilities and may not allow you the ability to forward a port or select the service you require.
    Port Triggering
     This is a way of Dynamically assigning a service to a port WHEN it is required by an outgoing service. The port is initially not allowed so nothing can get in and you are protected by your network.  
    A good example of this is when using Yahoo! voice .. the voice works fine for a few minutes after you connect to Yahoo! then Yahoo! sends some kind of packet that requires a response from your PC... The packet is allowed in through your router no prob but the outgoing reply is not authorized to open a port on the router and is thus blocked. 
    'ope this helps

  • How can we get Dynamic columns and data with RTF Templates in BI Publisher

    How can we get Dynamic columns and data with RTf Templates.
    My requirement is :
    create table xxinv_item_pei_taginfo(item_id number,
    Organization_id number,
    item varchar2(4000),
    record_type varchar2(4000),
    record_value CLOB,
    State varchar2(4000));
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'USES','fever','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'HOW TO USE','one tablet daily','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'SIDE EFFECTS','XYZ','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'DRUG INTERACTION','ABC','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'OVERDOSE','Go and see doctor','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'NOTES','Take after meal','TX');
    select * from xxinv_item_pei_taginfo;
    Item id Org Id Item Record_type Record_value State
    493991     224     1265-D30     USES     fever     TX
    493991     224     1265-D30     HOW TO USE     one tablet daily     TX
    493991     224     1265-D30     SIDE EFFECTS     XYZ     TX
    493991     224     1265-D30     DRUG INTERACTION     ABC     TX
    493991     224     1265-D30     OVERDOSE      Go and see doctor     TX
    493991     224     1265-D30     NOTES     Take after meal     TX
    Above is my data
    I have to fetch the record_type from a lookup where I can have any of the record type, sometime USES, HOW TO USE, SIDE EFFECTS and sometimes some other set of record types
    In my report I have to get these record typpes as field name dynamically whichever is available in that lookup and record values against them.
    its a BI Publisher report.
    please suggest

    if you have data in db then you can create xml with needed structure
    and so you can create bip report
    do you have errors or .... ?

Maybe you are looking for