How to make content of af:popup dynamic? Component Value is not updating.

HI,
     I am not able to update the component used in af:popup dynamically.
     In my case, the value of the component used in the popup is updated every time before opening the popup.
     I am building the af:popup. I am using component binding for my components. And I am setting data in the component using the component in the Managed bean only. The getter method for every component that I bind gets called only once i.e. while loading of the page. So when ever I change any thing in the component in managed bean, it is not reflecting in JSPX page. Coz it not calling the getter method of the component, so it is not getting the updated status for the component. But if you refresh the page you will get the updated component.
     Following is the sample code to simulate my problem,
     JSPX Page:-
<af:commandButton text="RCF Dialog (Without Script)" id="button1"
windowHeight="600" windowWidth="600">
<af:showPopupBehavior popupId="samplePopup" alignId="button1"
align="afterEnd"/>
</af:commandButton>
<af:popup id="samplePopup" clientComponent="false"
contentDelivery="lazyUncached">
<af:dialog title="Sample Dialog Test" modal="true"
cancelVisible="true" okVisible="true">
<af:inputText label="Label 1" value="#{searchField.myValue}"/>
<af:inputText label="Label 2" binding="#{searchField.textField}" />
</af:dialog>
</af:popup>
Managed Bean:-
public static int count = 1;
private String myValue = null;
private CoreInputText textField = new CoreInputText();
public String getMyValue(){
String value = "MESSAGE_" + count;
System.out.println("Count ==>" count " Value ==>"+value);
count++;
return value;
public CoreInputText getTextField() {
//Get called only once at the page load.
textField.setValue(getMyValue()+"_XXX");
return textField;
public void setTextField(CoreInputText textField) {
//Get called every time dialog is opened.
this.textField = textField;
Please let me know what to do make the content of the af:popup dynamic.
Any suggestions are welcome.

HI,
I have simulate my problem using one text field component in side the popup. It is the same way that i am using. In my case there is more code in the constructor of the dialog bean.
Following is the code,
<?xml version='1.0' encoding='windows-1252'?>
<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/rich">
<jsp:directive.page contentType="text/html;charset=windows-1252"/>
<f:view>
<af:document title="Popup Demo">
<af:form>
<af:spacer width="10"/>
<af:commandButton text="RCF Dialog (With Script)" id="button"
actionListener="#{mainScreen.processAcion}"/>
<f:verbatim>
<![CDATA[
<script>
function launchSampleDialog() {
var popup = AdfPage.PAGE.findComponent("samplePopup");
var hints = {};
hints[AdfRichPopup.HINT_ALIGN] = AdfRichPopup.ALIGN_OVERLAP;
hints[AdfRichPopup.HINT_ALIGN_ID] = "button";
popup.show(hints);
</script> ]]>
</f:verbatim>
<af:popup id="samplePopup" clientComponent="false" contentDelivery="lazyUncached" >
<af:dialog title="Sample Dialog Test" modal="true" id="dialogId" cancelVisible="true" okVisible="true">
<af:inputText label="Label 1" />
<af:inputText binding="#{dialogBean.textField}" />
</af:dialog>
</af:popup>
</af:form>
</af:document>
</f:view>
</jsp:root>
//Main Screen Bean set in session scope.
public class MainScreenBean {
     private static int count = 1;
     public void processAcion(ActionEvent event){
String updatedData = "ABCDEFG__" + count;
System.out.println("Inside process Action of Main Bean. Data set in Scope ==>" +updatedData );
FacesContext facesContext = FacesContext.getCurrentInstance();
facesContext.getExternalContext().getSessionMap().remove("dialogBean");
AdfFacesContext afContext = AdfFacesContext.getCurrentInstance();
afContext.getProcessScope().put("updateData", updatedData);
          count++;
ExtendedRenderKitService service = Service.getRenderKitService(facesContext, ExtendedRenderKitService.class);
service.addScript(facesContext, "launchSampleDialog();");
//Popup Dialog Bean set in session scope.
public class DialogBean {
private RichInputText textField = null;
public DialogBean() {
textField = new RichInputText();
textField.setLabel("Custom TextField");
AdfFacesContext afContext = AdfFacesContext.getCurrentInstance();
textField.setValue(afContext.getProcessScope().get("updateData"));
System.out.println("Data From Scope in Dailog Bean = " + afContext.getProcessScope().get("updateData"));
RequestContext.getCurrentInstance().addPartialTarget(textField);
public RichInputText getTextField() {
System.out.println("Inside getter for the component in Dailog Bean. Value = " + textField.getValue());
return textField;
public void setTextField(RichInputText textField) {       
AdfFacesContext afContext = AdfFacesContext.getCurrentInstance();
//Uncomment following line and run again. It will start showing updated value. But this will get called many times.
//textField.setValue(afContext.getProcessScope().get("updateData"));
System.out.println("Inside setter for the component in Dailog Bean. Value = " + textField.getValue());
this.textField = textField;
}

Similar Messages

  • How to make content horizontal swipe in single standard frame in Indesign CS6?

    How to make content horizontal swipe in single standard frame in Indesign CS6?

    This sounds like a question for the DPS forum. We don't handle DPS questions here:
    Digital Publishing Suite

  • HT4515 How to make sure that after browsing that the webpage is not running in the background, but totally closed down

    How to make sure that after browsing that the webpage is not running in the background, but totally closed down

    Double tap the Home button, tap & hold the Safari icon until it starts to wiggle, tap the red minus sign to remove it from the Multi-Tasking bar. Tap the Home button when finished.

  • How to make af: query (ResultComponentId) has two target values?

    hello all :D
    i'm newbie in jdev, i have little problem with af:query.
    how to make af: query (ResultComponentId) has two target values?
    thx
    agungdmt :D

    I think you can simply set the second target control's partialTrigger to the af:query.
    and access to the same binding attribute as your first target. (e.g.: if you have 2 target tables, set the value to #{bindings.XxxxxVO1.collectionModel})
    Samson Fu

  • How to make formula for the list of Charateristic values

    Hi,
    I am working on Cube 0SD_C03 for the Sales and Distribution Report "Product Group Wise Sales Ratio & Sales Based Product Ranking". There I have to use the following formula.
    Sales Ratio=(Total Sales for the Product Group / Its Total sales for month/ year)
    so is there any single formula through which it can be calculated for all Product Groups or I have to make the formula for all Product Group Values?
    Note: For Product Group, I have Biscuits, Chololate, Jelly, Wafers and 15 more elements.
    Regards
    Amit Srivastava

    Are you talking about calculating them as a whole, or having 15 seperate formula's?
    If you want to do it as a whole:
    Have you looked into creating a new set of Key Figures for use to create this formula?  For example, consider creating a new Restricted Key Figure which would contain the Dimension "Product Group" and you would then restrict that dimension to only Biscuits, Chocolate, Jelly, Wafers, etc.
    From there, you can create a new Calculated Key Figure which uses your newly created Restricted Key Figure(which is all product groups) to put together your formula.
    If you want 15 separate formulas you will need to create 15 separate Calculated Key Figures; one with a formula for Biscuits, another for Chocolate, etc.  But then, from here on out you can drag and drop them into any query/report in BEx within 0SD_C03 when you need it.
    If you need assistance on creating new Key Figures you could use this reference on [Working with Calculated and Restricted Key Figures|http://help.sap.com/saphelp_nw70/helpdata/en/46/834ef375e30ad3e10000000a11466f/content.htm]

  • How to make contents of DIV on page I'm leaving fade out?

    I am trying to figure out how to make the contents of a DIV on the page I'm clicking away from fade out. I know how to make the next page load with a fade in. So I'm half way there (I guess).  Wix has a lot of designs that use this effect. Here's a link to an example:
    http://www.wix.com/website-template/view/html/633?originUrl=http%3A%2F%2Fwww.wix.com&numbe r-of-page=1&position-in-page=1
    This is the code that I use to make a DIV load with a fade in:
    I add this CSS code under the DIV that I want to apply the fade in effect to:
         animation: fadein 2s;
        -moz-animation: fadein 2s; /* Firefox */
        -webkit-animation: fadein 2s; /* Safari and Chrome */
        -o-animation: fadein 2s; /* Opera */
    And I add this extra code to the CSS styles sheet:
    @keyframes fadein {
        from {
            opacity:0;
        to {
            opacity:1;
    @-moz-keyframes fadein { /* Firefox */
        from {
            opacity:0;
        to {
            opacity:1;
    @-webkit-keyframes fadein { /* Safari and Chrome */
        from {
            opacity:0;
        to {
            opacity:1;
    @-o-keyframes fadein { /* Opera */
        from {
            opacity:0;
        to {
            opacity: 1;

    Success!!! Thank you! Although I did have to change one more thing. See bold text below.
    One more question. What if I wanted to apply this effect to two ID's instead of one? Would it be as simple as adding a comma and then the ID in quotes like this?.... $(#container", "#footer")
    $(document).ready(function() {
        $("#container").css("display", "none");
        $("#container").fadeIn(2000);
        $("a.transition").click(function(event){
            event.preventDefault();
            linkLocation = this.href;
            $("#container").fadeOut(1000, redirectPage);       
        function redirectPage() {
            window.location = linkLocation;

  • How to make dependent choice lists grow dynamically?

    Is it possible to have dependent choice list which grow as the new content is added for choice list item?
    E.g If we have countries, states, cities as dependent choice lists. If contributor adds a new country the value should appear in the drop down next time. That value of country can be in turn be used to add states for it. The id of state in trun should be used to add cities. Is this possible?
    Regards,
    Pratap

    Hello All,
    by the way, it is very simple to let opltion lists grow dynamically, and moreover to have a predefined structure before.
    First you create a table and fill the view for this table with you start values, as it has been described before in this thread.
    Then you make the option list for the field Edit and Select.
    And then, as you know, your predefined values are stored in your custom schTable (whatever the name is), but all the values entered by the user are stored in DOCMETA table!
    All you need to do is to create a trigger with SQL Developer, so that on update and insert in table DOCMETA for your custom metadata field it is checked whether this value is already in your predefined option list stored in your schTable.
    And if the value is not there, make the trigger add a new record to custom table with this value and related values as well.
    Simple.
    This is true for any option list with predefined value and updated by the end-user.
    If it is dependent option list, then you need to add both values for parent and child fields in your custom table.
    There is another problem for which I can not find a solution --> if the field depends on two fields...
    Regards,
    Guli

  • How to make the title of screen dynamic in ABAP.

    Hi experts,
    I want to make the title of screen dynamic like:-
    --> i have an initial screen in which program takes some input files..and having a screen title as "INPUT FILE" with a read button.
    --> after clicking on read button it reads that file and shows on screen that exel file...here this screen title remains the same as "INPUT FILE" but i want it as "READ FILE". now this screen again having a button as write file.
    -- > Now after clicking on this write button this file gets write in to SAP system here i want my screen title as"WRITTEN FILE".
    Please help me and tell me the way to do it.
    Regards,
    Depque.

    Hi.
    Ypu should use a flag as soon as someone clic on the button, in order to keep a value.
    Then in PBO Module you should ask for the value of this flag
    if w_flag = abap_true ('X')
    set tittlebar number01.
    else.
    set titlebar number02.
    endif.
    Please let us to know if this could help you.
    Regards,
    Gabriela

  • How to make screenshot/jpg/pdf of ENTIRE long Safari window (not just visible part)?

    I want to get a "screenshot" (i.e. an image in any format -- PNG, JPG, PDF, whatever) of a looooooooong Safari window diplaying a Web page that entends far below the bottom of the visible screen area and has to be scrolled down to see all of it.
    I know about the standard screenshot keyboard tricks in 10.6 -- Command-shift-4, Command-shift-4 then spacebar/click, Command-shift-3, etc. But not any of them allow the user to get a screen shot of the entirety of a long/deep window -- they only capture what is visible on the screen.
    Also, another trick people often mention is to "print" (command-P) the Safari page, but instead of sending it to a printer choose "Save as PDF." Brilliant -- except that for some reason I've never been able to "print" a Safari page -- as soon as I hit the command-P keystrokes in Safari, I immediately get a spinning beachball that will only go a way with a force-quit of Safari. This has always been true on this computer (MacBook Pro) -- not sure if it's a common bug or if it's just an eccentricity of my particular machine. Either way, that option is off the table because "printing" is impossible with my Safari.
    I also searched around for various third-party freeware applications, and despite a lot of grandiose promises, none of them actually was able to capture an entire window including portions not currently visible on the screen.
    I did find a commercial application called SnapWeb that does have the capability to do exactly what I want -- but it doesn't produce usable images in demo mode and requires $$$ to unlock and work properly, something I'm currently unwilling to pay for a simple one-use gimmick that simply must be part of the OS already.
    So my question is:
    Is there any native way within the 10.6 OS that allows users to capture an entire long Safari window as an image file (not as a Web Archive, but as an image file composed of pixels), which includes the entirety of a Web page no matter how "long" it is, even if it extends far below the visible screen footprint?
    And if there is no native way in 10.6, if there a freeware/shareware application/widget/plugin/whatever which does the same thing?
    I already know about a commercial software that does it (SnapWeb), so I don't need more recommendations for paid apps. And I know that I can laboriously construct a JPEG by hand with Photoshop by taking a screenshot of the visible window, scrolling down a little, taking another screenshot, etc. etc., and then
    "stitching" them together. Yeah, it's possible (and in fact is what I've done in the past), but it's a time-consuming hassle that shouldn't be necessary.
    Help! I've wondered about how to do this for years, and have never yet found a satisfactory answer.

    Woo-hoo!
    After fiddling with Paparazzi! for another 40 minutes, I finally deciphered (through trial-and-error) how to maneuver through its awkward user-interface to an extent that I was finally able to make it "work" -- at least work sufficiently for my purposes. And lo and behold, it does indeed have the capacity to capture a screenshot of an entire long Web page, including the portion not visible on the screen. In fact my first attempt was to experiment with this very page of our thread on Apple "Discussions" about how to solve this problem -- and I got Paparazzi! to save it as a jpeg!! The whole thread, top to bottom, exactly as on the screen, not re-formatted for printing. The final file size was 985 pixels wide by 4,204 pixels long (1.2mb).
    I have since experimented with a couple other pages and had success with them as well.
    HOWEVER, I can't guarantee that Paparazzi! will work with every page on the Web, because I think one of the problems when I first attempted to use it was that the page I was trying to get a screenshot of contained a lot of Flash elements and other data-heavy widgets, and I think those messed up Paparazzi!'s memory or overwhelmed it or something. But perhaps such huge and problematic pages are rare enough to not be much of an issue using Paparazzi! under normal circumstances.
    So, I'll consider this problem "solved," and give user "jsd2" a "This helped me" star, since even though I already had Paparazzi! he encouraged me to revisit it.
    And for the record to help those who might stumble on this thread in the future seeking a solution to the same problem:
    The freeware program to get is called "Paparazzi!" and is available directly on the developers site here:
    http://derailer.org/paparazzi/
    Also, note that the current version only works with 10.6.8 or later, but if you have a previous version of the Mac OS, the developer helpfully maintains an archive of older releases that work with older OS versions -- you can access the old (and new) versions here:
    http://derailer.org/paparazzi/downloads
    It's also available for free download on various popular third-party sites, like:
    http://www.macupdate.com/app/mac/15966/paparazzi!
    Be warned that Paparazzi! does not have a very intuitive user interface, nor a user manual, so be patient with it and you should be able to figure out how to make it work.
    If you want another application that also does the trick and which has a simpler and better user experience, but you don't mind paying money to buy it, you can purchase and download "SnapWeb" on its developer's site here:
    http://www.tribalmedia.com/bts/snapweb/snapweb.html
    And if anybody seeing this in the future knows whether or not there is a native way to capture entire Web pages built in to 10.6, please post the info here. Thanks!

  • How to make one OR the other parameter required? (but not both)

    Hi all,
    I've got a report showing expenditures by budget code. There's a multi value parameter allowing the user to choose any codes they want, but this can be tedious, since there's a couple hundred of them.
    I would like to offer as an alternative a couple of "pre-packaged budget code groups" on another parameter. How can I set it up so that the user must choose EITHER something out of the full multi value set, OR one of the 2 or 3 pre-packaged options?
    thanks for any tips,
    sff

    Hi sherifffruitfly2,
    In Reporting Services, we can make a parameter optional by setting default values for the parameter. Based on your scenario, you can set one parameter to have no default values and set default values for the other parameter.
    As Josh posted, another approach is to add "All" value to each parameter and set "All" as the default value for each parameter. Then, we can set the visibility of the report to hide when both of the parameter contains "All". That way, the user can get the
    report to run by changing the values of only one parameter. For more information about add a "All" value to a parameter, please see the following thread with a similar topic:
    http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/7773eb1f-445e-461c-a315-e2e3d1161ae7/
    Hope this helps.
    Regards,
    Mike Yin
    TechNet Subscriber Support
    If you are TechNet Subscription user and have any feedback on our support quality, please send your feedback
    here.
    Mike Yin
    TechNet Community Support

  • HT204053 How to make my iPad back to Philippines store? I cannot update my my apps

    Pls help me to make my iPad back to Philippine store coz I cannot update my apps store....

    What you can re-download will depend upon what country that you are in (music, films, tv shows can't be re-downloaded in all countries, and audiobooks and ringtones can't currently be re-downloaded anywhere), and whether they remain in the store (content providers occasionally remove their items). You should keep and maintain your own backup copies of all of your downloads, just in case they are removed from the store (and for apps only the current version of each app is available in the store, so there may come a time when the version in the store requires a higher version of iOS than you have on your iPad).

  • Dynamically created HTMLDataTable does not update its chlidren

    I have a very delicate problem that I hope to get help with. I have created a HTML data table dynamically in the Java code. The left-most column contains a checkbox so that I can select and deselect rows in the table. The problem is that the checkbox value is only read from my backing bean but changes to it are not written back.
    The strange thing is that if I create exactly the same data table statically (i.e., as tags in the JSP-page) everything works perfectly fine.
    Is there some strange property that needs to be set when creating the data table dynamically that the JSF-framework automatically sets when it creates the table from the tags?
    Below you see the code for the creation:
    HtmlDataTable component = new HtmlDataTable() ; 
    CColumnHeader   column;
    UIColumn        tableColumn;
    tableColumn = new UIColumn();
    HtmlOutputText textHeader = new HtmlOutputText() ;
    textHeader.setValue("");
    tableColumn.setHeader(textHeader);
    HtmlSelectBooleanCheckbox tCheckBox = new HtmlSelectBooleanCheckbox() ;
    tCheckBox.setValueBinding(  "value", FacesContext.getCurrentInstance().getApplication().createValueBinding("#{data.subItems[0].selected}")) ;                       
    tableColumn.getChildren().add( tCheckBox ) ;
    component.getChildren().addAll( this.uicolumns ) ;
    JSF tag is defined as...
    <h:dataTable id="table" value="#{bean.model}" binding="#{bean.component}" var="data" />This do not work!
    However, the below code do...
    <h:dataTable id="table2" value="#{bean.model}" var="data">
    <h:column >
    <f:facet name="header">
         <h:outputText value="" />
    </f:facet>
    <h:selectBooleanCheckbox value="#{data.subItems[0].selected}" />
    </h:column>
    </h:dataTable>          For what I know these to examples should be equivalent.
    Furthermore, I noticed in the debugger that the attributes of my dynamically created table was not the same as the attributes on the one that JSF created for me. For example, each component that JSF created has got a map entry with the key javax.faces.webapp.COMPONENT_IDS for a ListArray containing the ids of its children. However if I try set this attribute in my code the column is not rendered at all. The UIColumn in the JSF-created table did have a javax.faces.webapp.FACET_NAMES=[header] in its attribute map. I don�t know if this has something to do with it, it was just one thing I noticed.
    Is this a bug or am I missing something?

    Why is that?
    What is it that actually goes wrong here? The two example works
    exactly the same in every aspect but in the first example, the JSF-
    framework only calls the getter method of the selected property and the
    latter case it calls both the getter and the setter. Otherwise the two
    tables works correctly.
    I use the binding attribute to be able to create the HtmlDataTable
    before the actual page is loaded and dynamically populate it with
    different numbers of columns depending on different system states.
    This is the reason why I have to create it dynamically and why I have to
    use the binding attribute.
    What is the reason for this not working? Am I breaking anything in the
    specification?
    What do you mean by "...with the hope that JSF will draw.."? It's is
    drawn, it is just the setter method that is not beeing invoked correctly.

  • How to make an ORDER BY clause dynamic

    is there anyway to make the ORDER BY clause in an SQL query within a DB control
    dynamic? I have tried to pass a String of the column name and place it in the
    statement within {}, but it doesn't work

    "Mark" <[email protected]> wrote:
    >
    is there anyway to make the ORDER BY clause in an SQL query within a
    DB control
    dynamic? I have tried to pass a String of the column name and place
    it in the
    statement within {}, but it doesn't workDid you find how ? please let me know, I also need to have a dynamic order by
    clause.

  • How to make columns in a table dynamic

    Hi,
    I want to make the columns of a table dynamic.
    At design time I dont know how many columns will be required.
    Rows are made dynamic by using the bean concept.
    Please help me in this reference(columns).
    Thanks
    Pooja

    Hi, i don't know how you create the rows dynamically but
    have you tried to use a forEach?
    <af:table ...>
    <af:forEach items="..." var="...">
    <af:column headerText="...">
    <af:outputText value="..."/>
    </af:column>
    </af:forEach>
    </af:table>
    here there is an example of a dynamic panelList:
    <af:panelList rows="3" maxColumns="6">
    <af:forEach items="#{bindings.ContratosView1.rangeSet}" var="li">
    <af:commandLink text="#{li.Codigo}" action="Edit"/>
    </af:forEach>
    </af:panelList>

  • How to make contents to be displayed in sam window by selec node in JTree

    hi,
    am a starter only, i need some help in JTree.
    I was able to make a tree using JTree.
    But the problem is..i want the contents corresponding to each node selected, at right side of the window..
    Just like we select node of a tree which is left side of the window its content will appear at that mouse click..right side of the same window
    Edited by: priya_1984 on Jun 21, 2008 2:25 AM

    Read the JTree API and follow the link to the Swing tutorial on "How to Use Trees", where you will find a working example.

Maybe you are looking for

  • Can't install xcode

    Hello, I bought a Mac Mini about three weeks ago (version 10.7.2). Also signed up to Apple's development (cost about $ 100 a year). Now I am trying multiple times to install the Xcode software programs (which includes all development including the sd

  • My device is going to be erased how can i protect it from erasing

    how can i protect my ipad from erasing

  • Restore controlfile from leagato tape backup

    I am using legato tool to perform rman tape backup. I use the following script on legato to get the controlfile backup. "backup current controlfile format '%d_%s_%p.ctrl'; " If I lost the controlfile how do i restore controlfile from the tape. Assume

  • Java Flavor???

    Hi All, I want to go on Java training as my next assignment requires application development using Web Dynpro and IView development using Java. I wanted to get your output as to which training course will be the best to go for. Should I go for regula

  • Deleting backups on Thinkpad T42

    Hi, I have a T42 laptop with Rapid Restore Ultra 4.0 to create backups: the problem is that i've now got 3 backups which are taking too much space on my hard drive, I only need the latest one i did. How do I delete backups? Is there an IBM tool softw