Forum Stats

  • 3,827,976 Users
  • 2,260,844 Discussions
  • 7,897,423 Comments

Discussions

Oracle Jdeveloper 11 Templating does not work as a template

4591
4591 Member Posts: 13
edited Oct 13, 2008 1:56PM in JDeveloper and ADF
I created a template which contains images, menu and text messages. Then I used this template to create page1.jspx and page2.jspx. Everything is OK when I run the pages at this point. After that I made following changes to my template page: add new images, change text message and add new link buttons. Then I saved this template and then rung page1.jspx and page2.jspx my changes did not apply to these 2 pages. Does the “Templating” suppose to work in this way? I would like the template changes can apply to all of the pages that is created based on this template. Does anyone know how to achieve my goal?

Thanks,
Tagged:
«13

Answers

  • Shay Shmeltzer-Oracle
    Shay Shmeltzer-Oracle Director of Product Management for Oracle's Cloud Development Tools Posts: 16,867 Employee
    what you describe is indeed the way it should and is working.
    Check the source of your pages and verify they reference the right template.
  • Duncan Mills-Oracle
    Duncan Mills-Oracle Member Posts: 4,079 Employee
    We use templating in pretty much every application we write now and it certainly works exactly as you would expect. Any page with a template reference (<af:pageTemplate ...) which reads that template when it's refreshed. Just tested here on the production build and all is OK. Note one possible problem is if you've added an image to the template and not yet deployed that image to the internal weblogic - in which case when you refersh the page the image will not show up because it's not available on the "server". Stop the server and re-run to check that out.
  • 198995
    198995 Member Posts: 26
    What you are trying to do should be possible. When you say "Then I saved this template and then rung page1.jspx and page2.jspx my changes did not apply to these 2 pages. " Do you really me that you clicked 'run' on one of the pages? or did you save the page and refresh the browser? I am guessing that you saved and refreshed the browser, which is how to do this, the only trick is that since you made changes in the template, the main page did not change so the server didn't think it had to refresh anything. The trick to this is to 'tickle' the pages that use the template (just add and remove a space, for example) to get them to be dirty so they are reloaded. Then you will see the changes in the template.

    Ted Farrell
    Oracle Corporation
  • Duncan Mills-Oracle
    Duncan Mills-Oracle Member Posts: 4,079 Employee
    Now that's what I call service!
  • PaKo
    PaKo Member Posts: 378
    Ted,

    The automatic detection of changes in template (without tickling the page) worked in TP4. But it doesn't work in R1! It is not only templates, but seams also the other meta-files (like taskflows) are not reflecting the changes in running app. I just built a small test case with 2 pages. Started the page 1, then added a navigation rule in adfc-config between page 1 and 2, added a button to page 1 with proper action - and the refreshing the page in browser didn't reflect the navigation rule (the button is there but action is not performed - it postbacks on same page 1).

    So I have to redeploy the app for every such change to test! And this leads to enormous overhead in repeating the long test-case paths just to se some small change!

    Is there any way to force the WLS to detect the changes in meta-data files???

    Regards,

    PaKo
  • Steve Muench-Oracle
    Steve Muench-Oracle Member Posts: 5,465 Employee
    No, unfortunately in 11g R1 you need to re-run to see any changes. The good thing is that the optimized deployment that occurs for the integrated WebLogic server only copies changed files so this should be fast in practice. In a future maintenance release we hope to re-enable the auto-change-detection for WebLogic that worked in TP4 with OC4J.

    P.S. While I have your attention Pako, could you email me a JDev/ADF testcase for [Trinidad-767 | https://issues.apache.org/jira/browse/TRINIDAD-767 ] I noticed that you filed? Thanks.
  • 198995
    198995 Member Posts: 26
    Hey PaKo,

    I think it always worked liked this. You had to tickle the page if you were just changing the template, and for any metadata changes (like pageflow), you have to re-run the app. If it is easier, you could re-build the view project instead of tickleing the consuming page. As far as the metadata goes, the only time this would work is if the application hadn't read the metadata yet. We don't have (and have never had) the ability to re-load ADF metadata in a running system. It has always required a re-run. As steve points out, the good thing is that once the server is running, the re-run is pretty fast.
  • Steve Muench-Oracle
    Steve Muench-Oracle Member Posts: 5,465 Employee
    I want to correct my statement above since my recollection was from a pre-production build of 11g. It appears that simple UI-only changes to a page do get picked up just by saving the page and refreshing the browser, but anything involving metadata (like adding new bindings) or updating ADFBC components, requires a quick re-run. Sorry for the slightly stale info above.
  • 198995
    198995 Member Posts: 26
    Right. I just tested this out. So to summarize. 11g works exactly the same as TP4 here.

    1. Page changes can be saved and browser-refresh will pick up those changes without a re-run. The only exception is with templates which if you just change the template, you need to tickle the page to get the refresh to work. Same in 11g and TP4.

    2. Any metadata (pagedef, adfc, etc.) needs a re-run. Same in 11g and TP4.

    Please let me know if you have any other questions or comments. thx.
  • 4591
    4591 Member Posts: 13
    thanks for all of the imputs. I was using OC4J server came with 11 g. I must have not refresh my broswer or re-run the pages. It looks good now.
This discussion has been closed.