Refresh JSF page (SOLVED)

Hi -
I have multiple master-detail pages and want to refresh the master and details pages upon performing a DB update operation. How can I accomplish this?
In detail: I have a three level master-detail table and users can view details page MasterA then navigate to DetailsB and then navigate to DetailsC page. In the DetailsC page I have a button which does some DB operation and updates certain columns in all three tables viz A,B and C.
Once this operation is completed I want to retain the user in the current DetailsC page but refresh all the three ViewObjects (including the current form in detailC page) so that the user can see that his/her operation is completed.
I saw couple of OTN topics which suggest overriding prepareModel of JhsDataAction - but can anyone tell us how to do this for a JSF application?
Thanks in advance for your time.
Saran

Stevan -
Can you provide an example how to implement this. I have tried my level best and am not able to get this working.
Basically this is my scenario. I have a Delete operation button in my third page for DetailC, which does programmatic data manipulation and updates the table at the backend implementing our own business functionality. Since this does not change the current state of the VOs, ADF does not automatically refershes the VOs.
Once this op is completed (which is exposed as a method in the AppModuleImpl), I need to refersh all the VOs. I tried overriding JhsPageLifecycle's prepareModel - but could not get it working. And as far as 10.1.3.1 is concerned, we are yet to get it and the timeframe for implementing this is not flexible enough to wait for the 10.1.3.1 version.
Please hellp.
Thanks,
Saran

Similar Messages

  • Prevent an 'iframe' in a JSF page to refresh when a  button is clicked

    I have a JSF Page. On this page I have a
    1)Iframe that ponts to another JSF page that contains a JSF tree
    2)A button named 'ADD'
    3)A listbox
    When I select a node in the tree it gets stored in the session and when I click the ADD button the selected value is populated into the listbox.
    Building the tree is a very costly(time consuming) operation. So whenever I click the ADD button it's action event in the backing bean runs and populates the listbox with the selected value.
    The problem whenever the I click the ADD button a postback happens and so the whole page is reloaded including the iframe and the tree with in the firame. How can I prevent the tree in the iframe refreshing each time I click the ADD button.
    Any workarounds/ help greatly appreciated.
    Thanks.
    -Rolla
    Message was edited by:
    RollaTomasi

    I do't think Virtual forms solve this problem as clicking anything(firing action events) on the main page would force the page and all the componets to refresh and the as the ui:iframe points to another JSF page on which the tree is; that page is also being refreshed .
    I also have added logic in the init method of the second page inwhich the tree is tocheck for postbacks. But I observed that :
    A postback on the main page is not a post back to the second page
    Thanks for your reply.

  • Jsf page not getting refreshed with updated values?

    Hi All,
    - managed-bean - session scope.
    - On a request, Even though, I am updating the bean's properties(values), my Jsf page is not getting refreshed with updated values as it is displaying the older values.
    Can anybody throw some light?
    Thanks in advance.
    - Sri

    Please try to give us more information, follow BalusC suggestion.
    For this moment I only can say you that the more common cause to this problem (in my expirence) is that you have problems with your conversion/validate phase.

  • I want to refresh my jsf page on the click of command button.

    Hi all,
    i m using JDEV 11.1.2.1.0
    i have created one jsf page with fragment i want to refresh my whole page on the click of command button which is present in fragment page.Besause i want to refresh some field but those are present in jsf page so i cant apply partial trigger because command button property in fragment page backing bean class and those attribute which i want to refresh its property in other class.
    thanks.
    Rafat

    i didnt get you from your content so i go with subject for giving your answer
    refreshing some of the fields
    BindingContainer bindings = getBindings();
    DCIteratorBinding dciter = (DCIteratorBinding)bindings.get("xIterator");
    ViewObject vo = dciter.getViewObject();
    Row row = vo.getCurrentRow();
    vo.executeQuery();or else drop execute operation as button to execute vo.
    to refresh a page
    partial trigger nice options.
    to performs instant refresh
    af:poll component
    so if you don mine give me some scenario using hrschema i may give a liitle try to my small brain :)

  • Action method calls when refreshing the JSF page

    I have a test application which contains a JSF page. The page contains a command button. Button's action attribute is mapped with action method in managed bean.Inside action method I am not doing anything and just redirecting to the same page using navigation-rule configured in faces-config.xml. I deployed the application and tested the page.
    This is what I observed.
    scenario 1:
    ===========
    1) Run the page.
    2) Refresh the page.
    Observation:
    Action method not called.
    scenario 2:
    ===========
    1) Run the page.
    2) Click the command button.
    2) Refresh the page any number of times.
    Observation:
    For each and every time the page is refreshed Action method is called.
    Can anybody tell me why it is happening?

    sk_java wrote:
    I have a test application which contains a JSF page. The page contains a command button. Button's action attribute is mapped with action method in managed bean.Inside action method I am not doing anything and just redirecting to the same page using navigation-rule configured in faces-config.xml. I deployed the application and tested the page.
    This is what I observed.
    scenario 1:
    ===========
    1) Run the page.
    2) Refresh the page.
    Observation:
    Action method not called.
    You get the page using a http get so no action is "configured" to fire...
    scenario 2:
    ===========
    1) Run the page.
    2) Click the command button.
    2) Refresh the page any number of times.
    Observation:
    For each and every time the page is refreshed Action method is called.
    Can anybody tell me why it is happening?Using the command button (the first time) you obtain the view as postback so refreshing the page the browser will redo the last POST that fire again the Action...

  • Problems with data controls from java classes in JSF pages.

    Hi! We have a problem in our Application that we are developing with JSF pages using Data Controls generated from facades java classes. When we running a page in debug mode and the page are loading, if we insert a breakpoint in the first line of method referenced in the data control, the execution enter two times in the method, and this is a problem for us. How to solve this?
    We are using JDeveloper 11.1.1.2 with ADF faces.

    You might need to play around with the refresh property of the action binding.
    http://download.oracle.com/docs/cd/E15523_01/web.1111/b31974/adf_lifecycle.htm#BJECHBHF

  • Adding a footer in JSF pages

    Hi,
    How can we add footer to a jsf page? I tried using Tiles framework. But it uses a TilesServlet class which is not there any more. I looked in almost all versions of struts jar but couldnt find it. Now i have created a footer jsp and added it inside every other jsp using f:facet tag
    <h:panelGrid width="100%">
    <f:facet name="footer">
    <f:subview id="foot2">
    <jsp:include page="/footer.jsp"/>
    </f:subview>
    </f:facet>
    </h:panelGrid>
    In my footer.jsp, i have three command links which i want to use for navigation between different pages of application. In faces-config.xml, I have created the action from footer.jsp to different pages. But when i am including the footer.jsp to other jsp's, action is not working. Clicking on the command link refreshes the same page rather than going to the specified action. Please help.
    Thanks
    Neha

    Hi,
    this is because the footer gets included in the parent page, which means that the navigation is not from footer.jsp but from the parent jsp. Change the navigation cases you created for the footer.jsp to use a wildcard instead so that they work as global navigation cases. This solves your issue
    Frank

  • JDev 1013, Webservice as Data Control in JSF page returns error

    Hello,
    For a client we are starting a project with Java Server Faces in combination with web services. In order to do some testing we created a web service in PLSQL (with a empno input field and a record output) and deployed this web service on an OC4J container. We then created a (new) JSF project, used the PLSQL web service as a Data Source, and used this Data Source in a JSF page.
    When this JSF page is started an error occurs validation -
    DCA-40007: The value for parameter "empNo" cannot be null..
    The webservice can however be called in the page, the output is shown but the error stays in the page.
    Communication with support gave me a temporary solution
    I've put in the page definition for both the methodIterator (getEmpIter) and the accessIterator (ReturnIterator) the Refresh="Deferred". Now the error doesn't show in the page at startup of the page. Data is presented correctly after pushing the button, though still in the Jdeveloper Embedded OC4J Server Log shows a list of
    ERROR Value for parameter : 'empNo' cannot be null.
    In a multi row Webservice (created by JDeveloper) however i still get this error.
    (1) What caused this error?
    (2) When is the next version of JDeveloper due?
    (3) I am looking for documentation on the following subjects
    (3.1) How a JSF page is rendered by the Oracle JSF implementation
    (3.2) How to read and adjust the JSF page definition, for example the <executables> part
    (3.3) Problem with the extra abstraction layer is that is very hard to find where an error occurs. Is a mechanism/documentation available to find in which JSF fase an error occurs and how to bypass it?
    Regards Leon Smiers

    (1) I think what is happening is that your page calls out to the Web service when you first run it without any parameter. This is why you get the error and also the reason that deffer works to solve this.
    I think a solution would be to have your Web service handle the case of receiving an empty parameter.
    (2) When it is ready :-)
    (3.2) right click the jsf page and choose "go to page defenition" you can then edit it using the structure pane and the property inspector.
    (3.3) you can run in debug mode, the code for ADF will be available when we go production, and with it a lot of more documentation.

  • JSF page fails to reflect saved changes to model

    How do I refresh the info kept in the JSF backing bean in order to reflect changes saved to the model?
    My JSF page contains rows of data. Depending on the user’s choices, one or more rows may be eliminated from the model. My problem is the change in the model is never reflected in subsequent page displays, unless I kill the session. I’m sure this behavior is because the backing bean has a scope of session and the data loaded into the session bean never changes to reflect the change in the model. Invalidating the session kills everything including stuff I want to keep around (like logon info and other stuff that will really never change during the session). Changing the backing bean scope to request breaks the update completely.
    Help!!!
    Regards,
    Al Malin

    Thanks for the reply.
    I have (actually had) two problems. The first one I've solved since my initial post (stupid error on my part).
    The other unsolved problem is JSF pages displaying stale data. User navigates to first page, navigates to second page, at this point the database changes, and then the user navigates back to first page. Navigating back to the first page shows the data how it was, not how it is, because it's from the session bean and not the database. If I could kill the session bean when the user navigates from the page the problem would be solved because I build the inital display in the constructor (BTW, please advise if this is a bad approach).
    Frank, your reply raised a question. Is there a way to specify a refresh frequency? If so, how?
    Thanks,
    Al Malin

  • Update OneToMany collection from jsf page

    Hello,
    I have a problem updating a OneToMany relationship from a jsf page.
    I get an parent object via the local interface from the ejb, then I remove a child from the onetomany relationship and call my save method on the stateless bean which just merges the parent object back to the entitymanager.
    But the child I've removed gets not deleted from the database (so its in the collection again after refresh).
    So whats the preferred way to do this?
    thanks
    Dirk

    Thanks for the reply.
    I have (actually had) two problems. The first one I've solved since my initial post (stupid error on my part).
    The other unsolved problem is JSF pages displaying stale data. User navigates to first page, navigates to second page, at this point the database changes, and then the user navigates back to first page. Navigating back to the first page shows the data how it was, not how it is, because it's from the session bean and not the database. If I could kill the session bean when the user navigates from the page the problem would be solved because I build the inital display in the constructor (BTW, please advise if this is a bad approach).
    Frank, your reply raised a question. Is there a way to specify a refresh frequency? If so, how?
    Thanks,
    Al Malin

  • JSF Pages are not rendering correctly when  loaded using Non JSF actions

    Hi All,
    This problem is irritating me and I am posting the same query for the third time here.
    When I come from non jsf actions such as page submitting using Javascript, clicking anchor link, clicking normal Html submit button and so on my page is not rendering correctlly .
    In other words, My first GET method/Post method works perfectly for the first time when the page is loaded.
    But when we try to access the page for the second time, although logical work is perfect in bean, I am getting same old page.
    How to resolve this issue?
    or
    Is this Bug of Sun's Implementation of JSF Framework.
    Thanks,
    Sudhakar

    Hi Sudhakar,
    There is a discussion about refreshing a page, Take a look at the below thread
    http://swforum.sun.com/jive/thread.jspa?threadID=55660
    Hope this what you are looking for
    MJ

  • How to get values from a query string in URL in a jsf page?

    if i have a url, http://my.com/?name=john+smith, how do i get the values from that url in a jsf page and then pass those values to a servlet?
    i know how to do that in jsp using "request.getParamter("name")" and save it in a bean and then forward to a servlet. But what about in jsf?

    Hello,
    Try this:
    Map requestMap = FacesContext.getCurrentInstance().getExternalContext().getRequestMap();
    String name = (String) requestMap.get("name");If isn't worked one of these methods probably will solve your problem.
    FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
    FacesContext.getCurrentInstance().getExternalContext().getRequestHeaderMap();hth.

  • How-to get attributes from one JSF page redirected to another?

    How do I send information from one JSF page when the navigation rule redirects it to another?
    When JSF navigation does a forward I can use request.setAttribute() in the from-page and then use request.getAttribute() in the to-page, but this doesn't work with <redirect/>.
    Regards,
    Al Malin

    The process scope in ADF Faces solves this. See:
    http://www.oracle.com/webapps/online-help/jdeveloper/10.1.3/state/content/navId.4/navSetId._/vtTopicFile.adffacesguide%7Cdevguide%7CcommunicatingBetweenPages%7Ehtml/

  • How to Refresh a Page once saved to database in ADF.

    Hi,
    I created a JSF page using project template as "JSF,ADF,business components".
    There is a List of values displayed in a dropdown list,
    User can create new value and once it is saved to the database it should reflect in the list of values.But it is not displaying in the LOV and it is happening only when i close that page and open a new one.
    Can u please tell me how to refresh a page without closing the current page once save button is clicked.
    Thank you,
    Harika.

    Mini wrote:
    Hi Hari,
    Yes i have a apex page redirects from the ebs menu like you said. But for the refresh issue instead of modifying in the jsp i thought of bringing the automatic refresh for that apex page once it is loaded within apex.
    However these type of issues are sometimes get fixed by clearing browser cache or just by restarting your browser. Have you tried it?Yes i have tried, by clearing the browser cache and also by restarting the browser then too it still persist.
    Any DA action will be helpful for refreshing that page for 1sec once it is loaded. Since i dont want it to be loaded multiple times often once it is loaded.
    The refresh has to be only once if the page is loaded.
    or is it possible to Refresh the page based on the application page item through DA
    Thanks
    Brgds,
    MiniTechnically Yes, you can create a D.A. that will fire only once based on some apex page item or application item value. However this is NOT the correct solution.
    <li> When you see apex page (after clicking menu in EBS), do you see apex url in browser address bar? Can you post the URL here?
    <li> If you directly log-in to APEX (not via EBS), do you still face this issue?
    Regards,
    Hari

  • Can we  have a href tags in jsf page

    hi all,
    I tried inserting a link in jsf page using <a href> tag but when I click it, it is appending the link to contextroot.
    For Example:
    <f:verbatim>
    click here
    </f:verbatim>
    and when I click on it, I see http://www.google.com is appended to my application url after context root like
    http://localhost:9080/Ma/view/India/http://www.google.com
    and I get 404 error. how do I do it without having my application url.
    Thanks
    Ma
    Edited by: niki007 on Jan 12, 2009 4:32 PM

    This problem can occur if you didn't specify any protocol (http:// or https:// or others) in the link. But your example looks fine. I think that you modified the real code to this example, without being aware that you solved the problem yourself.
    At any way, you can also just use h:outputLink to render <a> elements.

Maybe you are looking for

  • Long and  clob datatype

    Hello Gurus we are working on oracle 8.1.4.0.in our database i have a table that contain a long column and a clob cloumn. i need backup of this table so that i can create the same table with data in other schema. Is there any recommmanded way. Can us

  • IPhoto and Photoshop Elements

    I have been sent a small (144kb) black and white photo which has obviously been seriously manipulated in Adobe CS. My normal editing process is to use PE4.0.1 but I store photos in iPhoto. In this instance - and without using PE - I am noticing that

  • 2.Monitor an Dockingstation bleibt schwarz (T540p)

    Hallo, wir haben einige T540p-Notebooks in Benutzung mit Dockingstations. Auf einem Arbeitsplatz musste ich die Dockingstation austauschen. Nur bekomme ich den 2. Monitor jetzt nicht mehr zum laufen. Dieser lief vorher über DVI, über DP oder VGA funk

  • Mail in os 10.8.4 will not work.

    The mail program is locked on one message and will not respond. The time wheel is spinning for ever. Have aborted and restarted several times.

  • Moving applications from OS 10.4.11 to OS 10.5.8

    I have transferred applicatiions and data from my old iMac running OS 10.4.11 to the newer iMac I have been given.  It is running OS 10.5.8. I have tried to use my Address Book and was told that it isn't compatible with the newer OS.  How do I get my