Access page method from template

Hi,
I'm using JDev11/ADF and I need to implement this scenario : A have a page fragment based on a page template. This page has a backing bean with a class exteded from a generic class. I have some generic buttons in the page template. Theses buttons need to call a method in the base backing bean class through the page's backing bean. I read Frank's solution to access the page's binding from the template :
[http://thepeninsulasedge.com/frank_nimphius/2007/11/23/adf-faces-rc-implementation-strategies-for-global-buttons-in-page-templates/]
but is there a way to access a method in the page's bean from the template (A listener for instance ?)...
tks.

Hi,
what is missing is a method attribute like in declarative components. This however does not exist for templates yet. So there is no other solution yet than to invent some kind of contract.
Frank

Similar Messages

  • Changing header information in pages made from templates

    I am familiar with GoLive and using components for menus to
    accomodate universal changes.
    I am new to Dreamweaver (CS3). I am using templates for my
    menus so I can make universal changes. However, what do I do if I
    want to put a form on a page and need to be able to put some code
    in the header? I cannot because the header is non-editable on pages
    made from templates.
    Are templates the only alternative to GoLive Components?
    THX

    This is the sign of an improperly made template.
    Do this -
    Create a new page (Basic HTML).
    Use FILE | Save as Template....
    Look at the code in the head region of the page, particularly
    the editable
    region around the <title> tag, and the other editable
    region in the head
    called "head".
    Make your template file look like that.
    Always use FILE | Save as Template when you create your
    templates and you
    won't have this problem again.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "hmogg" <[email protected]> wrote in message
    news:fe39fo$pe6$[email protected]..
    >I am familiar with GoLive and using components for menus
    to accomodate
    > universal changes.
    >
    > I am new to Dreamweaver (CS3). I am using templates for
    my menus so I can
    > make universal changes. However, what do I do if I want
    to put a form on a
    > page
    > and need to be able to put some code in the header? I
    cannot because the
    > header
    > is non-editable on pages made from templates.
    >
    > Are templates the only alternative to GoLive Components?
    > THX
    >

  • Access native methods from an applet

    hi all
    I am developping a applet which has to access the native method which is c++ code. but it does not work at all, even though it can be compiled well.
    it returns
    java.lang.ExceptionInInitializerError
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
         at java.lang.reflect.Constructor.newInstance(Unknown Source)
         at java.lang.Class.newInstance0(Unknown Source)
         at java.lang.Class.newInstance(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.security.AccessControlException: access denied (java.lang.RuntimePermission loadLibrary.MemoInfo)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkLink(Unknown Source)
         at java.lang.Runtime.loadLibrary0(Unknown Source)
         at java.lang.System.loadLibrary(Unknown Source)
         at InfoShow.<clinit>(InfoShow.java:24)
         ... 11 more
    who can give me some suggestions on accessing native method from applet! thx
    regards
    beginner

    you don't have access to native code from an applet unless you've modified your policy file or you're using a signed applet.

  • Accessing a method from within another method

    I am having trouble accessing a method from inside a method in the same class.
    here is my code:
    public String getAns(int ans){
    answer = ans;
    ranswer = number1 * number2;
    if(answer != ranswer){
    return "No. Please try again";
    }else{
    return "Very good!";
    genQues();
    when i run this i get an Unreachable code error pertaining to genQues();
    is this allowed in Java and is there a more practical way to go about this?
    Thank you in advance

    next time use the correct code tags to post your code.
    Think of your problem like this though.
    You write
    if( something )
    then return some value;
    else
    then return some other value.
    The returns end the method here, returning the value.
    So, if the method ended at one of these 2 statements, how do you think it'll reach genQues(); ?
    Hope this helps.

  • Pages created from Template not showing background images

    I have created a templated and everything looks great, except when I go to create a page using the template. When I start a new page the backbround images are not there. Can anyone help?
    Thanks
    Jessica

    www.HSHpet.net is my website
    I didn;t know about templates when I started and now I want to create one to streamline my site and make it easier to manange. So right now each pageis copy and pasted.
    Here is the code from my dwt file
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="keywords" content="Pet Sitting, Dog Walking, Dog Boarding, Cat Sitting, Dog Training, Yorkville, Oswego, Montgomery, Plano, Sandwich, Aurora, Plainfield, Aurora. " />
    <title>Home Sweet Home pet services | Pet Sitting | Cat Sitting | Dog Walking | Pet Boarding | Dog Training</title>
    <style type="text/css">
    .background {
              background-image: url(../378.gif);
              padding: 0px;
              border-top-style: none;
              border-right-style: none;
              border-bottom-style: none;
              border-left-style: none;
              font-family: Georgia, "Times New Roman", Times, serif;
              font-weight: bold;
    .table backgroun {
              background-image: url(../336.gif);
              font-family: Georgia, "Times New Roman", Times, serif;
              font-size: 14pt;
    tr td .background1 {
              background-color: #FFF;
              font-family: Georgia, "Times New Roman", Times, serif;
              background-image: none;
              border-top-style: solid;
              border-right-style: solid;
              border-bottom-style: solid;
              border-left-style: solid;
              font-size: 14pt;
              font-weight: normal;
              text-align: left;
    blue column {
              background-color: #09F;
              font-family: "Bradley Hand ITC";
    </style>
    <script src="../SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    <link href="../SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    body {
              background-color: #FFF;
              background-image: url(../435.gif);
    .background1 {
              background-image: url(../378.gif);
              border-top-color: #FFF;
              border-right-color: #FFF;
              border-bottom-color: #FFF;
              border-left-color: #FFF;
              padding: 0px;
              font-family: Georgia, "Times New Roman", Times, serif;
              font-size: 14pt;
              border-top-style: inset;
              border-right-style: inset;
              border-bottom-style: inset;
              border-left-style: inset;
    .background1 .background1 td .background tr td ul li {
              text-align: left;
    .background11 {
              background-image: url(../378.gif);
              border-top-color: #FFF;
              border-right-color: #FFF;
              border-bottom-color: #FFF;
              border-left-color: #FFF;
              padding: 0px;
              font-family: Georgia, "Times New Roman", Times, serif;
              font-size: 14pt;
              border-top-style: inset;
              border-right-style: inset;
              border-bottom-style: inset;
              border-left-style: inset;
    </style>
    <script type="text/javascript">
    function MM_validateForm() { //v4.0
      if (document.getElementById){
        var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
        for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]);
          if (val) { nm=val.name; if ((val=val.value)!="") {
            if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
              if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
            } else if (test!='R') { num = parseFloat(val);
              if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
              if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
                min=test.substring(8,p); max=test.substring(p+1);
                if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
          } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
        } if (errors) alert('The following error(s) occurred:\n'+errors);
        document.MM_returnValue = (errors == '');
    </script>
    <script type="text/javascript">
      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-18640274-1']);
      _gaq.push(['_trackPageview']);
      (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    </script>
    </head>
    <body>
    <table width="85%" border="5" align="center" cellpadding="5" class="background1">
      <tr align="center" valign="middle" class="table">
        <td colspan="2" class="table"><img src="../HSHLogo_White.png" width="350" height="125" alt="Home Sweet Home logo" longdesc="http://www.HSHpet.net" /></td>
      </tr>
      <tr>
        <td colspan="2" align="center"><table width="90%" border="4" align="center" class="background">
          <tr align="center" valign="middle">
            <td><img src="../dog.jpg" width="150" height="150" alt="golden retriever" /></td>
            <td><img src="../fish.jpg" width="150" height="150" alt="fish in bowl" /></td>
            <td><img src="../cat.jpg" width="150" height="150" alt="DSH tabby" /></td>
            <td><img src="../bird.jpg" width="150" height="150" alt="peach faced love birds" /></td>
            <td><img src="../bunny.jpg" width="150" height="150" alt="bunny" /></td>
            <td><img src="../lizzard.jpg" width="150" height="150" alt="lizzard" /></td>
            <td><img src="../cat&amp;dog.jpg" width="150" height="150" alt="puppy &amp; kitten" /></td>
          </tr>
          <tr align="center" valign="bottom">
            <td colspan="7"><div align="center">
              <ul id="MenuBar1" class="MenuBarHorizontal">
                <li><a href="../index.html" class="MenuBarHorizontal">Home</a> </li>
                <li><a href="#" class="MenuBarItemSubmenu">About Us</a>
                  <ul>
                    <li><a href="../aboutus.html">About Us</a></li>
                    <li><a href="../teammembers.html">Team Members</a></li>
                    <li><a href="../15questions.html">15 Questions</a></li>
                    <li><a href="../happytails.html">Happy Tails</a></li>
                  </ul>
                </li>
                <li><a class="MenuBarItemSubmenu" href="../petsitting.html">Services</a>
                  <ul>
                    <li><a href="#">Pet Sitting</a>                  </li>
                    <li><a href="../k9cleanup.html">K9 Cleanup</a></li>
                    <li><a href="../overnightcare.html">Home Boarding</a></li>
                    <li><a href="training.htm">Training</a></li>
                  </ul>
                </li>
                <li><a href="#" class="MenuBarItemSubmenu">FAQ's &amp; Policies</a>
                  <ul>
                    <li><a href="../FAQ_PetSitting.html">Pet Sitting</a></li>
                    <li><a href="../FAQ_K9Cleanup.html">K9 Cleanup</a></li>
                    <li><a href="../FAQ_Boarding.html">Home Boarding</a></li>
                    <li><a href="#">Training</a></li>
                  </ul>
                </li>
    <li><a href="../NewsLinks.html">News &amp; Links</a></li>
                <li><a href="../CPR.html">Pet CPR</a></li>
                <li><a href="../employment.html">Employment</a></li>
                <li><a href="../contactus.html">Contact Us</a></li>
                <li><a href="#" class="MenuBarItemSubmenu">Schedule Service</a>
                  <ul>
                    <li><a href="https://www.powerpetsitter.net/login.aspx?bid=584">Existing Clients</a></li>
                    <li><a href="https://www.powerpetsitter.net/client/check_zipcode.aspx?id=584">New Clients</a></li>
                  </ul>
                </li>
              </ul>
            </div></td>
            </tr>
        </table></td>
      </tr>
      <tr valign="top" class="background1">
        <td class="background"><table width="100%" border="0" class="background1">
          <tr class="background1">
            <td align="center" valign="top"><p class="title"><!-- TemplateBeginEditable name="Heading" -->Tips for Conducting a Professional Pet Sitter Interview<!-- TemplateEndEditable --></p></td>
          </tr>
          <tr>
            <td align="center" valign="top"><!-- TemplateBeginEditable name="Body" -->
              <p align="left">Pet Sitters International (also known as PSI) was founded in 1994 as the first international association for professional pet sitters.             The mission of Pet Sitters International is to foster excellence and continuous learning in the pet-sitting profession by providing the best education and tools of the trade. We are very proud of our PSI membership.        </p>
            <!-- TemplateEndEditable --></td>
          </tr>
          <tr>
            <td align="center" valign="top"><table width="90%" border="0" align="center" class="background1">
              <tr align="center" valign="middle">
                <td><br/>                <a href="https://www.facebook.com/pages/Home-Sweet-Home-pet-sitting/107491737744" target="_top" title="Home Sweet Home pet sitting"><img src="https://badge.facebook.com/badge/107491737744.2549.1193722049.png" alt="facebook" width="120" height="65" align="absmiddle" style="border: 0px;" /></a></td>
                <td><a href="http://www.addthis.com/bookmark.php?v=250&pub=autiger811" onmouseover="return addthis_open(this, '', '[URL]', '[TITLE]')" onmouseout="addthis_close()" onclick="return addthis_sendto()"><img src="http://s7.addthis.com/static/btn/sm-share-en.gif" alt="Bookmark and Share" width="83" height="16" align="absmiddle" style="border:0"/></a>                <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js?pub=autiger811"></script></td>
                <td><a href="http://www.addthis.com/bookmark.php?v=250&pub=autiger811" onmouseover="return addthis_open(this, '', '[URL]', '[TITLE]')" onmouseout="addthis_close()" onclick="return addthis_sendto()"><img src="http://s7.addthis.com/static/btn/lg-bookmark-en.gif" alt="Bookmark and Share" width="125" height="16" align="absmiddle" style="border:0"/></a></td>
                <td><table width="170" border="0" cellspacing="0" cellpadding="0">
                  <tr bgcolor="#000000" valign="top">
                    <td width="9" rowspan="2"><img src="http://img.constantcontact.com/ui/images/visitor/tl_brdr2_trans.gif" alt="" width="9" height="9" border="0" /></td>
                    <td width="152" height="1" align="center" bgcolor="#000000"><img src="http://img.constantcontact.com/ui/images/spacer.gif" alt="" width="1" height="1" border="0" /></td>
                    <td width="9" rowspan="2" align="right"><img src="http://img.constantcontact.com/ui/images/visitor/tr_brdr2_trans.gif" alt="" width="9" height="9" border="0" /></td>
                    </tr>
                  <tr>
                    <td width="152" height="8" bgcolor="#ffffff"><img src="http://img.constantcontact.com/ui/images/spacer.gif" alt="" width="1" height="1" border="0" /></td>
                    </tr>
                  <tr>
                    <td width="170" colspan="3" align="center" style="border-left: 1px solid #000000;border-right: 1px solid #000000;"><div align="center">
                      <form action="http://visitor.constantcontact.com/d.jsp" method="post" name="ccoptin" target="_blank" id="ccoptin" style="margin-bottom:3;">
      <font style="font-weight: bold; font-family:Georgia; font-size:13px; color:#000000;">Join Our Newsletter</font><br />
                        <font style="font-weight: normal; font-family:Arial; font-size:10px; color:#000000;">Email:</font>
                        <input type="text" name="ea" size="14" value="" style="font-family: Arial; font-size:10px; border:1px solid #999999;" />
                        <input type="submit" name="go" value="Join" class="submit"  style="font-family:Arial,Helvetica,sans-serif; font-size:11px;" />
                        <input type="hidden" name="m" value="1102843860723" />
                        <input type="hidden" name="p" value="oi" />
                        </form>
                      </div></td>
                    </tr>
                  <tr bgcolor="#000000" valign="bottom">
                    <td rowspan="2"><img src="http://img.constantcontact.com/ui/images/visitor/bl_brdr2_trans.gif" alt="" width="9" height="9" border="0" /></td>
                    <td width="152" height="8" align="center" bgcolor="#ffffff"><img src="http://img.constantcontact.com/ui/images/spacer.gif" alt="" width="1" height="1" border="0" /></td>
                    <td rowspan="2" align="right"><img src="http://img.constantcontact.com/ui/images/visitor/br_brdr2_trans.gif" alt="" width="9" height="9" border="0" /></td>
                    </tr>
                  <tr>
                    <td width="152" bgcolor="#000000"><img src="http://img.constantcontact.com/ui/images/spacer.gif" alt="" width="1" height="1" border="0" /></td>
                    </tr>
                  </table></td>
                </tr>
              </table></td>
          </tr>
        </table></td>
        <td align="center"><table width="90%" border="1" class="background">
          <tr>
            <td align="center" valign="top" bgcolor="#00AEEF"><p style="font-family: 'Bradley Hand ITC'; font-size: 18pt; font-weight: bold;">Give us a call:</p>
              <p><a href="http://www.ringcentral.com" target="Callback_RingMe" onclick='var wind = window; var winop = wind.open; winop(&quot;http://www.ringcentral.com/ringme/?uc=F476D3FEFF03EF8DEB3A4803BAD689C9185666081445,0,&s=no &v=2", &quot;Callback_RingMe&quot;, &quot;resizable=no,width=380,height=360&quot;); return false;'><img border="0" src="http://www.ringcentral.com/ringme/F476D3FEFF03EF8DEB3A4803BAD689C9185666081445,0,/1/ringme _6.gif" alt="virtual office phone" /></a></p></td>
          </tr>
          <tr>
            <td align="center" valign="top" bgcolor="#00AEEF"><p style="font-family: 'Bradley Hand ITC'; font-size: 18pt; font-weight: bold;">Send us a message:</p>
              <form id="form1" name="form1" method="post" action="../formtoemailpro.php">
                <p>Your Name: </p>
                <p>
                  <input name="Name" type="text" id="Name" onblur="MM_validateForm('Name','','R');return document.MM_returnValue" />
                </p>
                <p>Your Phone #:</p>
                <p>
                  <input name="phone" type="text" id="phone" onblur="MM_validateForm('phone','','RisNum');return document.MM_returnValue" />
                </p>
                <p>Your Email Address:</p>
                <p>
                  <input name="email" type="text" id="email" onblur="MM_validateForm('email','','RisEmail');MM_validateForm('email','','RisEmail');ret urn document.MM_returnValue" />
                </p>
                <p>I'm interested in:</p>
                <p>
                  <select name="services" id="services">
                    <option value="mid-day care" selected="selected">Mid-day Dog Walks</option>
                    <option value="K9 cleanup">K9 Clean up</option>
                    <option value="vacation care">Vacation Care</option>
                    <option value="cat care">Cat &amp; Small Animal Care</option>
                    <option value="Overnights">Overnight Care (my home)</option>
                    <option value="Pet Boarding">Overnight Care (pet sitter's home)</option>
                    <option value="Walk &amp; Trains">Walk &amp; Trains</option>
                    <option value="other">Other</option>
                  </select>
                </p>
                <p>Comments:</p>
                <p>
                  <textarea name="comments" id="comments" cols="25" rows="5"></textarea>
                </p>
                <p>
                <img id="captcha" src="/securimage/securimage_show.php" alt="CAPTCHA Image"><br><a href="#" onclick="document.getElementById('captcha').src = '/securimage/securimage_show.php?' + Math.random(); return false">Reload Image</a><br />
                Verify code: <input type="text" name="captcha_code" size="10" maxlength="6">
                </p>
                <p>
                  <input type="submit" name="Submit" id="Submit" value="Submit" />
                  <input type="reset" name="reset" id="reset" value="Reset" />
                </p>
              </form>
              <p> </p></td>
          </tr>
          <tr>
            <td valign="top" bgcolor="#00AEEF"><p> <span class="center" style="font-family: 'Bradley Hand ITC'; font-size: 18pt; font-weight: bold; text-align: center;">Pet Care Services</span></p>
              <ul>
                <li>Dog Walking, Dog Boarding </li>
                <li>Pet Waste Removal Services</li>
                <li>Bird &amp; Reptile Care </li>
                <li>Walk &amp; Trains</li>
                <li>Cat Sitting</li>
                <li>Small Animal Care</li>
                <li>In Home Overnight Care </li>
                <li>Flexible and Custom Care </li>
                <li>Medications &amp; Injectables</li>
                <li>Dog Training </li>
                <li>Puppies and Older Pets </li>
                <li>Handicapped Pets</li>
              </ul>
              <p style="font-size: 14pt; text-align: center; font-weight: normal;"> </p>
              <p style="font-size: 11pt; text-align: center; font-weight: normal;">For your convinience we accept:</p>
              <p style="font-size: 14pt; text-align: center; font-weight: normal;"><img src="../visa_mastercard.jpg" alt="visa/mastecard" width="100" height="50" /></p></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td colspan="2" align="center" valign="middle"><span class="background2">&copy; 2007-2015 Home Sweet Home pet services</span></td>
      </tr>
    </table>
    <p>  </p>
    <script type="text/javascript">
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
      </script>
    </body>
    </html>

  • Error while accessing EJB method from JSP

    Hi,
    I am trying to access a bean from a JSP and have the foll. code piece:
    String url = "t3://localhost:7001";
    public Context getInitialContext() throws Exception {
    Properties p = new Properties();
    p.put(Context.INITIAL_CONTEXT_FACTORY,
    "weblogic.jndi.WLInitialContextFactory");
    p.put(Context.PROVIDER_URL, url);
    return new InitialContext(p);
    String getStackTraceAsString(Exception e)
    // Dump the stack trace to a buffered stream, then send it's contents
    // to the JSPWriter.
    ByteArrayOutputStream ostr = new ByteArrayOutputStream();
    e.printStackTrace(new PrintWriter(ostr));
    return(ostr.toString());
    %>
    <%
    String op="";
    try {
    // Contact the AccountBean container (the "AccountHome") through JNDI.
    Context ctx = getInitialContext();
    out.println("initial context got !!");
    DemoHome home = (DemoHome) ctx.lookup("demo.DemoHome");
    out.println("home got !!");
    %>
    <p>
    <%
    Demo ac = null;
    try {
    ac = (Demo) home.create();
    out.println("create called!!");
    if (ac==null)
    out.println("ac is null!");
    catch (Exception ee) {
    out.print("exception 1");
    %>
    <p>
    <%
    try {
    out.println("going to call method!");
    if (ac!= null)
    op = ac.demoSelect(); /* FAILURE POINT */
    else
    out.println("ac is null->error!!");
    out.println(ac.demoSelect());
    out.println("string got!!");
    out.println(op);
    catch (Exception e) {
    getStackTraceAsString(e);
    e.printStackTrace();
    out.println("error 2");
    catch(Exception e)
    out.println("error 3!");
    It gives an error on trying to access the method "demoSelect".
    e.printStackTrace gives the output:
    java.lang.RuntimeException: javax.ejb.EJBContext.getEnvironment is deprecated in EJB 1.1. EJB 1.1 compli
    ant containers are not required to implement this method. Use java:comp/env instead.
    <<no stack trace available>>
    JSP output is as foll.-->
    getting initial context initial context got !! home got !!
    create called!!
    going to call method! error 2
    What is wrong???
    pls help!

    Greetings,
    Hi,
    I am trying to access a bean from a JSP and have the
    foll. code piece:
    <%
    String op="";
    try {
    // Contact the AccountBean container (the "AccountHome") through JNDI.
    Context ctx = getInitialContext();
    out.println("initial context got !!");
    DemoHome home = (DemoHome) ctx.lookup("demo.DemoHome");
    out.println("home got !!");Though it doesn't seem to be the problem in this case, good EJB coding practices dictate that your code should be narrowing the home reference before calling any of it's methods (i.e. create(...) )... WebLogic may allow handling of its protocol objects in their native state, but other vendors do not... your application is not portable without narrowing.
    It gives an error on trying to access the method "demoSelect".
    e.printStackTrace gives the output:
    java.lang.RuntimeException: javax.ejb.EJBContext.getEnvironment is deprecated inThe error is not in your JSP, but in the bean... it seems your bean is attempting to acquire its "environment properties" in the pre-1.1 style, when...
    EJB 1.1. EJB 1.1 compliant containers are not required to implement this
    method. Use java:comp/env instead. ...instead, it should be looking them up in its JNDI namespace.
    What is wrong???
    pls help! Regards,
    Tony "Vee Schade" Cook

  • Pages created from template not formatted in FireFox browser

    Using Dreamweaver CS5 I redesigned a web site with all pages now created from a master template.  The result is that the site displays properly in IE, but not in FireFox.  See the www.lbtscic.com site.  It checked out OK in the Browser Lab for all browsers, but shows as mostly unformatted in the latest FireFox .
    A side problem is that changes in the master template do NOT show up in the pages created from that template.  When I make a change in the template the details show that it checked all the appropriate pages, but changed none.  Need Help!
    Bob Roberts

    The linked page looks the same to me in IE9/Safari5.1/FF3.6.23, and it looks broken in all of them - the content region is wider than the banner image.
    Here are seven common mistakes that will result in changes not propagating from Template to child -
    1.  Rename the Templates folder
    2.  Move the Templates folder to some other folder level in the site other than root level
    3.  Move a template out of the Templates folder.
    4.  Make changes to an editable region of the Template (which will not propagate)
    5.  Assume that Template changes will be effected by just uploading the changed Template file to the server without also uploading the changed local files
    6.  Corrupt the site cache so that the link between Template and child page is broken
    7.  Improperly create your child pages by simply opening the Template, adding page specific content, and resaving the Template with an *.html extension rather than its *.dwt extension. (you can tell if this is the case by looking at the code on a child page - if you see anything like <!-- TemplateBeginEditable... then this is what you have done).  If you *have done this*, then recreate the child pages (in DW) using FILE | New > Page from Template, select the Template and click CREATE.
    The 6th problem can be repaired by using SITE | Advanced > Recreate Site Cache, and the six others can be fixed by just not doing them.  Have you done any of those?

  • Pages Built from Template not working when put

    Hi,
    I am building a site with CS3 and running it to test it on
    onother site in a sub-directory - but, although the pages all work
    as expected when viewed locally, some are totally blank when put on
    the server - when I view the source they only contain;
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
    Transitional//EN">
    <HTML><HEAD>
    <META http-equiv=Content-Type content="text/html;
    charset=windows-1252"></HEAD>
    <BODY></BODY></HTML>
    so its not like the page is not there - its just that all the
    content has been skipped. I have tried re-putting, deleteing from
    the server and reputting - all with no success. Several pages,
    built from the same template work great, but just a few are like
    this...
    I have searched the net and forum, but can't find a similar
    problem - any help would be very gratefully received

    OK - I think that I have a system or corruption
    problem - I just tried another full upload and now nothing is
    working... I'm switching to my laptop to see if the old Dell is the
    problem.

  • Different page layout from template?

    In the new Pages with Maverick I can't find a way to use a different page layout from a template than the two layouts in miniature by default. Have you found a way?

    The templates doesn't have several different pages layouts anymore, which they had in Pages 09. Pages 5.0 is a very strpied down Pages. You could say Pages very Lite should be the name.
    What you could try is open the old Pages 09 ( in the application folder > iWork 09 folder) the templates you like. Add the different page layouts in templates so they not are hidden. Save as a documents. Now open them in Pages 5.0 and save as templates.

  • Access AM method from backing bean - best practice

    Hello,
    I need to call an appModule method from a backing bean. What is better?
    1. Resolve bindings.AMDataControl.dataProvider, get AM and invoke the method directly
    or
    2. Create method action in page definition, resolve OperationBinding from it's binding expression and execute the operationBinding
    I don't need to have a button on the page for this method.
    Rado

    Good question Rado.
    With a "flexible" framework like Oracle ADF, I also ask myself sometimes what would be the preferred approach to do things.
    See also these forum threads:
    - about "ADF Faces: Passing values from a managed bean to ADF BC module"
    http://forums.oracle.com/forums/thread.jspa?threadID=486742
    - about : "ADF Faces: getting selected row data in multi select table ..."
    http://forums.oracle.com/forums/thread.jspa?threadID=503248
    regards
    Jan Vervecken

  • New pages made From Template messed up!

    Hello,
    I have made a template that is not yet finished... I decided
    to test it out, but when I make new pages from it, the formatting
    is messed up (in any new pages that I create from the template).
    This of course is happening prior to uploading to the pages... (I
    need to make many different pages from the template but cannot
    proceed because of this...)
    If I preview the new ‘messed up’ page in Safari
    (that is by clicking the Preview button in Dreamweaver itself), it
    is almost OK, but the background image does not show up. Could
    anyone suggest what I might need to do to get the ‘new’
    page to appear fine in Dreamweaver itself.
    I am new to Dreamweaver and have just started with it since
    moving from GoLive...
    Thanks in advance.

    > Well, that solved the problem. Changed my hard disk name
    from D's 200 to
    > just
    > D 200. After that I had to reset the site root folder
    but now pages made
    > from
    > the template are correctly formatted...
    If it would be considered a bug, then many programs would
    have it! As a
    general rule of thumb, it's best to avoid any characters in
    your
    file/pathnames other than letters, numbers, and
    hyphens/underscores. That
    would eliminate spaces, quotes, ampersands, parentheses, etc.
    > One remaining question. In the template, I used
    Modify/Page Properties to
    > add
    > a background to it. When I make a new page from the
    template, the
    > background
    > does not appear. Is that normal or should it appear?
    It should appear, so there must be something wrong in the
    resulting code.
    Can we see it?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Peace Freak" <[email protected]> wrote in
    message
    news:[email protected]...
    > Hello,
    >
    > Read through both the latest suggestions and decided to
    try getting rid of
    > the
    > single quote first as it was the easiest to do. I am on
    a Mac by the
    > way...
    >
    > Well, that solved the problem. Changed my hard disk name
    from D's 200 to
    > just
    > D 200. After that I had to reset the site root folder
    but now pages made
    > from
    > the template are correctly formatted...
    >
    > Thank you so much for this excellent troubleshooting
    experience. I guess
    > this
    > single quote problem would be considered a bug (surely
    single quotes
    > should be
    > allowed in the names of hard disks???) as I don't ever
    remember Apple
    > saying
    > don't use single quotes when naming a hard disk...
    >
    > Should I/we report it to Adobe? I would be happy to. I
    don't know how
    > these
    > forums work but it might be an idea to post a
    topic/sticky with
    > appropriate
    > keywords so that others will be made aware of it easily.
    >
    > One remaining question. In the template, I used
    Modify/Page Properties to
    > add
    > a background to it. When I make a new page from the
    template, the
    > background
    > does not appear. Is that normal or should it appear?
    >
    > Thanks so much.
    >
    >

  • Access page item from Javascript

    I have searched the forum, and based on my findings this is what I've done so far:
    I have a page item where the Google Map key is stored. I want to access it from Javascript so that I can call the Google map with the key. (Note: The key can't be hardcoded as it will be pulled from DB according to the environment/url the app is running on. e.g. - dev, test, production.)
    Here's a javascript code block:
    <script>
       var google_key = $x('P1_GOOGLE_KEY').value;
       var l_url = "http://maps.google.com/maps?file=api&amp;v=2&amp;key=" +
                   google_key +
                   "&sensor=false";
    </script>I have tried, $v('P1_GOOGLE_KEY') , $x('P1_GOOGLE_KEY') , &P1_GOOGLE_KEY. and none of them work.
    How do I access a page item from Javascript?
    Thx!
    Marc

    Marc,
    I am going to take a shot in the dark, but are you referencing this item outside of a function in your head tag? So basically it tries to reference the item on load? If so this is not going to work because the item does not exist yet. If you are using jQuery change your code to look like:
    $(document).ready(function(){
       var google_key = $x('P1_GOOGLE_KEY').value;
       var l_url = "http://maps.google.com/maps?file=api&amp;v=2&amp;key=" +
                   google_key +
                   "&sensor=false";
    });This will tell the javascript to fire after everything has fully loaded. If you are not using jQuery then you can use a little javascript snippet from here to add a ready event to your page. or you can copy paste this into a script tag.
    (function () {
      var ie = !!(window.attachEvent && !window.opera);
      var wk = /webkit\/(\d+)/i.test(navigator.userAgent) && (RegExp.$1 < 525);
      var fn = [];
      var run = function () { for (var i = 0; i < fn.length; i++) fn(); };
    var d = document;
    d.ready = function (f) {
    if (!ie && !wk && d.addEventListener)
    return d.addEventListener('DOMContentLoaded', f, false);
    if (fn.push(f) > 1) return;
    if (ie)
    (function () {
    try { d.documentElement.doScroll('left'); run(); }
    catch (err) { setTimeout(arguments.callee, 0); }
    else if (wk)
    var t = setInterval(function () {
    if (/^(loaded|complete)$/.test(d.readyState))
    clearInterval(t), run();
    }, 0);
    document.ready(function (){
    var google_key = $x('P1_GOOGLE_KEY').value;
    var l_url = "http://maps.google.com/maps?file=api&amp;v=2&amp;key=" +
    google_key +
    "&sensor=false";
    Good Luck,
    Tyson Jouglet

  • URGENT - Editing pages made from template

    Okay so,
    I have created a few pages from a template that I created. To make the pages from template, I went to file > new > page from template > "mycreated"
    I need to edit these pages individually with different features and table layouts on each page, but it doesn't let me because the template locks these pages that I created from the template. How can I get around this?
    This is really urgent, I'll  highly appreciate some help!
    Thanks!

    If this were my site, I would make the entire region editable.  That way you can apply some re-usable classes, unique IDs or inline styles if desired.
    CSS:
         #table-one td {font-size: 26px}
        #table-two td {font-size: 16px}
    <!-- TemplateBeginEditable name="Tables" -->
    <table id="table-one" width="50%" border="1" align="left">
              <tr>
                     <td style="font-size: 45px">Some text goes here.....</td>
                     <td>Default font size, 26px.....</td>
              </tr>
            </table>
            <table id="table-two" width="50%" border="1">
                   <tr>
                          <td>This is default font style, 16px... </td>
                   </tr>
            </table>
    <!-- TemplateEndEditable -->
    Nancy O.

  • Access page fragment from a page or vice versa

    How can you access (get and set) the components of page fragment from a page?
    I have a page fragment with a drop down box, which is shared across many pages. Now the value of the drop down list (in the page fragment) needs to changed based on the table columns of the page. I can easily do that if the drop down is on the same page as the table component, but I can't figure out how to do this if drop down is on a page fragment and the table is on a page. In other words, how do we make the page "see" its page fragment programmatically or vice versa? When you use this.xxxx, you only get access to page components and it does not include the comonents of the page fragmant which is embedded in the page.
    Thanks
    Message was edited by:
    Sabir

    What happens if a user were to have multiple browser windows open under the same session?
    Let's say I had a header like this example and I disabled some of the links on given pages. If a user had 2 pages open, and both has an instance of this header page fragment being rendered, which page's header would have its link disabled? Would it be both or would it somehow know to only affect the fragment within the page that's calling .disabled(true)?

  • No access to method from within the same class

    Hey there.
    First I have to excuse my English for I'm german and just learning...
    Ok, my problem is as follows. I have a class called JDBC_Wrapper it includes the method sendQuery(String query). When I call this method from within another class (where 'wrapper' is my instance of JDBC_Wrapper) it works fine. For example:
    wrapper.sendQuery("SELECT * FROM myDataBase");
    But then I have written a method called getNumRows() into my JDBC_Wrapper class.
    This method should send a query through sendQuery(Strin query) but when calling getNumRows() it says: "java.sql.SQLException: [FileMaker][ODBC FileMaker Pro driver][FileMaker Pro]Unbekannter Fehler." (Unbekannter Fehler -> Unknown Exception). What could that be?
    I'm using jdk2 sdk 1.4.2 with BlueJ. My database is Filemaker Pro 6. The ODBC/JDBC connector works fine.
    BerndZack

    This is within my JDBC_Wrapper class:
    public ResultSet sendQuery(String query)
            if(connected)
                try
                    Statement s = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
                    ResultSet rs = s.executeQuery(query);
                    return rs;
                catch(Exception e)
                    System.out.println(e);
            else
                //System.out.println("There is no connection to the datasource!");
            return null;
    public int getNumRows()
            try
                ResultSet r;
                r = this.sendQuery("SELECT COUNT(*) FROM " + table_name); // At this line the error occurs
                r.next();
                return (int)r.getInt(1);
            catch(Exception e)
                System.out.println(e.getMessage());
                return -1;
    }When I call sendQuery() from within another class it works, but calling getNumRows()
    throws an exception.

Maybe you are looking for

  • Info Package ABAP Routine

    Hi For FIGL_4 there is both open items and closed items. i want to filter only Open Items Accounting doc no's records for Customers,Vendors,GL account at info package level. There are 3 ODS's in BW side for Open items Customers,Vendors,GL accounts. i

  • Can't install newest iphoto after upgrading to Yosmite

    Hi guys, After upgrading my OS to Yosmite, my iPhoto icon has a "no-entry" icon covering over it. When I tried to open, it asks for an update. When in the app store, I can't seem to install the newest iPhoto app. Anyone experiencing the same problem

  • In how many computers can i install adobe creative cloud?

    i need it in two different computers in two different countries. Is it possible for us to use only one account?

  • Spotlight not working within program. Please HELP!

    Spotlight not working within programs. Cannot not locate files on network volumes. For example: if I am using Photoshop or MultiAd Creator Pro, and want to open a file, I will do File>Open and  use spotlight in the "Open" dialog, and it doesn't ever

  • Initial load conditions in OWB

    Hi We are building Datawarehouse using Oracle warehouse builder and Express.I would like to know about the initial load for each mapping.Currently the mapping is done for incremental load.If i have to do it for Initial load, how it can be done.Is it