Backing file question

Very basic question
I have three page --page 1 , page2 and page 3
I have attached the below backing file to page2
The println statement always says curPage to be page2 even when I click other pages (page1 and page3) I;m not clear why backing file is executed when page 1 and page 3 is clicked. any pointers?
package age;
import com.bea.netuix.servlets.controls.page.PageBackingContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class testPageBackingFile extends com.bea.netuix.servlets.controls.content.backing.AbstractJspBacking
public boolean handlePostbackData(HttpServletRequest request, HttpServletResponse response) {
PageBackingContext testContext = PageBackingContext.getPageBackingContext(request);
String curPage = testContext.getLabel();
system.out.println("curPage" + curPage);
String newPage;
try {
Integer.parseInt(request.getParameter("age"));
newPage = "page5";
} catch (NumberFormatException nfe) {
newPage = "page2";
if(!curPage.equals(newPage)) {
testContext.setupPageChangeEvent(newPage);
return true;
} else {
return false;
}

Hello,
Unless "Control Tree Optimization" is turned on, the handlePostbackData() method of every backing file in the whole desktop will generally be run, even if the page / book / portal the backing file is attached to is not being displayed.
Kevin

Similar Messages

  • How can I have a backing file call a JavaScript function?

    I have a Weblogic portal with a JSP portlet. The portlet has a backing file. How can I get the backing file to call a JavaScript function in my portlet?
    thanks

    Hi
    your questions are not correct because you are mixing up server side operations with client side operations.
    First server side code executes then the page is sent to the browser , then any javascript executes on the browser. So asking for javascript to be called from backing file (server side) doesn't make sense or asking for javascript to read a parameter doesnt exactly work either.
    However in your server code suppose you have a variable action in the request that you want javascript to know then in your JSP you would add something like
    <script type="text/javascript">
    var action = '${requestScope.action}';
    alert(action);//or whatever you want to do
    <c:if test="${requestScope.someOthervariable == ''xyz'}"><%-- this check is done on the server --%>
    callSomeJavascript(); <%--this javascript is only executed when the server side value of someOtherVariable is xyz --%>
    </c:if>
    </script>
    i.e. you can output the javascript that has the variables you need or the function calls you want.
    Like I said understand whats server side and whats client side.

  • How to call a database controller in backing file

    Hello,
    First of all, I'd like to apologize if this question is posted by someone else before. But because I haven't been to find the answer so I just post this question here with hope that someone will have the answer for me.
    I am using weblogic 8.1 SP3. I am trying to build a web portal which requires users to login and logout. Based on the tutorials from BEA and the documents that I read in this forum, I decided to use backing file to check for the username and password. I am using MySQL database and I have a page flow controller which is based on the database control. How can I call that control in the backing file? Or is there anyway to compare the username and password that the user enters to the ones in the MySQL tables? I don't want to create a database connection in that backing file since the page flow controller can do that for me already.
    Any help is appreciated
    Thanks in advance
    TL

    select ename from emp@dblink
    ...lose the double quotes.
    Scott

  • Backing file at Page level

    Hi,
    I am working on Weblogic portal 9.2. I have single Portal that hold one page and 3 portlet.
    Conditionally I wanted to visible and hide these portlet so I added backing file at Page level and after using setVisible() method of portlet I can hide or show these portlet.
    But the problem is Portal page is not visible in portal administrator until and unless you created desktop template from existing portal web app.
    But consider somebody created new page on portal administrator and added these 3 portlet.and now want to see visibility and hiding functionality of portlet. So Page level Backing file approach will be fail as this page will not have any backing file support.
    So in this scenario how do I hide and show portlet without help of backing file

    Hi Kevin
    Just curious where exactly the BackingFile information gets stored for Pages, Books, Desktops etc in the Portal DB Schema. As per my understanding, from IDE we create .portal file. Add books/pages and portlets to the pages. We assign BackingFiles to Page/Book and portlets. When we deploy and create Desktop, this .portal file is parsed and all the information gets stored in the DB Tables. When we run portal in streamline mode, it gets all the details from the DB tables and NOT from the .portal file any more. In PF_PORTLET_DEFINITION Table, I could see a column to store the BackingFile full path. And in .EAR file we have this .class file. But in PF_PAGE_DEFINITION, PF_BOOK_DEFINITION, I could not see any such columns. So my question is in streamline mode when a desktop is rendered by reading all these tables, where exactly the BackingFile is getting triggered/called from which table. Does it still refer .portal file.
    Thanks
    Ravi Jegga

  • Setting Portlet Preference in Backing File for Clipper Portlet

    Hi All,
    I have a clipper portlet, and I am setting the preferences(for form based authentication & passing application data dynamically) in the backing file which is then associated to the Clipper portlet. I looked up at the clipper constants that are available; and the example they have given is
    portlet.setPreference(LOGIN_FORM_EXTRA_PARAMS, "name1=value2&name3=value4")
    My question is what is this "portlet"?? is it an instance?? then whose instance/object it is?? how am I suppose to declare it in my Backing File??
    Any input on this would be appreciated.
    Thanks,
    G

    Hi,
    I'm guessing here... but I think that the example is referring to a PortletPreferences object, which can be obtained through a PortletBackingContext with the getPortletPreferences() method. To obtain a PortletBackingContext you just use the static method PortletBackingContext.getPortletBackingContext() and pass in the request in the backing file. See also: Using the Preferences API to Access or Modify Preferences
    Hope this helps,
    Petri

  • Detection portlet backing file under weblogic portal

    Hi all
    I am try to work out a interportlet communication example under instruction listed below
    http://download.oracle.com/docs/cd/E13218_01/wlp/docs92/portlets/ipc.html#wp1025202
    Everything works fine until add action to a backing file. I cannot find such option under event handler wizard. From the documentation, it mentions that
    "The Invoke BackingFile selection will not appear unless a backing file is detected by WebLogic Portal. "
    Is any way that can trigger weblogic portal to detect particular backing file? or any example that I can refer to setup such action manually?
    Any help would be apprectiate, thanks.
    wayne

    Hello Wayne,
    The WebLogic Portal forum is a better place to ask WLP questions:
    WebLogic Portal
    However, to answer your question, you can add a backing file to the portlet in Workshop, or manually in the .portlet file as described (at the bottom of the section) here:
    http://download.oracle.com/docs/cd/E13218_01/wlp/docs92/portlets/building.html#wp1077130
    Kevin

  • Can we override the Desktop LAF for Pages using backing Files ?

    Hi
    I have the following Look And Feel related requirement.
    We have an global application level Skin which was applied at the desktop level using the .laf file.
    But some of the pages require a totally different Look and Feel apart from the one defined at the desktop level.
    To put the question in the other way,
    Can we override the skin & skeleton defined at the Desktop level using the backing file (for page or portlet) ?
    The following is the code snippet, which i used in the backing file to achive the above.
    LookAndFeel lookAndFeel = LookAndFeel.getLookAndFeel(request);
    lookAndFeel.setSkin(y_skin);
    lookAndFeel.setSkeleton(y_skeleton);
         lookAndFeel.reinit();
    Here the y_skin & y_skeleton are the new set of skin & skeletion which i have created for the page.
    when i ran the above snippet in the portal framework, i found the desktop level skin is getting applied
    to the pages insted of the y_skin & y_skeleton.
    Any help or directions .... for dynamically changing the skin & skeletion for pages will be appreciated.
    Thanks & Regards
    - Sachi

    What you are doing looks valid.
    this is the code that i have
    public void init(HttpServletRequest request, HttpServletResponse response)
    // Get the session from the request
    HttpSession session = request.getSession();
    // Get the LookAndFeel object from the PrimaryTheme in the request
    LookAndFeel lookAndFeel = LookAndFeel.getLookAndFeel(request);
    if (request.getParameter("defaultButton") != null)
    //System.out.println("default skin selected");
    session.setAttribute("skin", "default");
    if (request.getParameter("textButton") != null)
    //System.out.println("text skin selected");
    session.setAttribute("skin", "text");
    if (request.getParameter("classicButton") != null)
    //System.out.println("classic skin selected");
    session.setAttribute("skin", "classic");
    String selectedSkin = (String) session.getAttribute("skin");
    if (selectedSkin != null)
    //System.out.println("setting skin and skeleton to: '" + selectedSkin + "'");
    lookAndFeel.setSkin(selectedSkin);
    lookAndFeel.setSkeleton(selectedSkin);
    lookAndFeel.reinit();
    }

  • Unable to create temporary backing file

    My program is throwing out the error:
    temporary open: /var/tmp/BDB20825: Too many open files
    unable to create temporary backing file
    This happens after my program has been running for about 4 hours. The program appears to run out of file descriptors. The listing of /proc/<PID>/fd shows hundreds of lines naming the same file (/var/tmp/BDB20825), like this:
    lrwx------ 1 zobell users 64 Jul 28 14:41 622 -> /var/tmp/BDB20825 (deleted)
    That file does not exist. I suspect that someone is deleting but failing to close the file. A few open file descriptors with this deleted file occur slowly in the early hours, but not at a fast enough rate to bring the program down when it does. It looks like there is a sudden flood at the end.
    The program repeats this error slowly, and is stuck inside the db code. Here is the gdb backtrace I am seeing every time I interrupt:
    (gdb) where
    #0 0x00e74410 in __kernel_vsyscall ()
    #1 0x003d51dd in ___newselect_nocancel () from /lib/libc.so.6
    #2 0x002e5d39 in __os_sleep () from /devel/tfm/external/RH4_32/dbxml/latest/install/lib/libdb-4.6.so
    #3 0x002e43f1 in __os_openhandle () from /devel/tfm/external/RH4_32/dbxml/latest/install/lib/libdb-4.6.so
    #4 0x002e52ad in __os_open () from /devel/tfm/external/RH4_32/dbxml/latest/install/lib/libdb-4.6.so
    #5 0x002c0357 in __db_tmp_open () from /devel/tfm/external/RH4_32/dbxml/latest/install/lib/libdb-4.6.so
    #6 0x002c006c in __db_appname () from /devel/tfm/external/RH4_32/dbxml/latest/install/lib/libdb-4.6.so
    #7 0x002d50c9 in __memp_bhwrite () from /devel/tfm/external/RH4_32/dbxml/latest/install/lib/libdb-4.6.so
    #8 0x002d4a27 in __memp_alloc () from /devel/tfm/external/RH4_32/dbxml/latest/install/lib/libdb-4.6.so
    #9 0x002d62ec in __memp_fget () from /devel/tfm/external/RH4_32/dbxml/latest/install/lib/libdb-4.6.so
    #10 0x00232003 in __bam_new_file () from /devel/tfm/external/RH4_32/dbxml/latest/install/lib/libdb-4.6.so
    #11 0x002abc79 in __db_new_file () from /devel/tfm/external/RH4_32/dbxml/latest/install/lib/libdb-4.6.so
    #12 0x002abaff in __db_open () from /devel/tfm/external/RH4_32/dbxml/latest/install/lib/libdb-4.6.so
    #13 0x002a5d15 in __db_open_pp () from /devel/tfm/external/RH4_32/dbxml/latest/install/lib/libdb-4.6.so
    #14 0x0080644c in Db::open () from /devel/tfm/external/RH4_32/dbxml/latest/install/lib/libdb_cxx-4.6.so
    #15 0x0053ebbe in DbXml::DbWrapper::open (this=0x405bbee0, txn=0x0, type=DB_BTREE, flags=65537, mode=0) at Transaction.hpp:62
    #16 0x00549247 in CacheDatabase (this=0x405bbed8, env=0x9c5a848, type=DB_BTREE, compare=0) at CacheDatabase.cpp:28
    #17 0x005497e2 in DocDatabase (this=0x405bbed8, env=0x9c5a848, compare=0) at CacheDatabase.cpp:46
    #18 0x00584ced in DbXml::Manager::createDocDatabase (this=0x9c5a830, compare=0) at Manager.cpp:694
    #19 0x00519467 in DbXml::CacheDatabaseMinderImpl::verify (this=0xfffffdfe, entry=@0x6ac2f790, cid=-514) at CacheDatabaseMinder.hpp:31
    #20 0x00519398 in DbXml::CacheDatabaseMinderImpl::findOrAllocate (this=0x6ac5b4f0, cid=1, allocate=true) at CacheDatabaseMinder.cpp:71
    #21 0x00518e59 in DbXml::CacheDatabaseMinder::findOrAllocate (this=0x6acd9fa0, mgr=@0x9c5a830, cid=1, allocate=true) at CacheDatabaseMinder.cpp:21
    #22 0x0055b12d in LazyDIResults (this=0x6acd9f98, context=0x6acd9fa0, contextItem=0x4979abc0, expr=@0x9ce5de8, txn=0x0, flags=0) at /devel/tfm/developers/szobell/berkeley-db-xml/dbxml-2.4.16/dbxml/include/dbxml/XmlManager.hpp:80
    #23 0x0052f9cd in DbXml::QueryExpression::execute (this=0x9ce5de8, txn=0x0, contextItem=0x4979abc0, context=@0xbfcb0e04, flags=0) at /devel/tfm/developers/szobell/berkeley-db-xml/dbxml-2.4.16/dbxml/include/dbxml/XmlQueryContext.hpp:86
    #24 0x00565a3a in DbXml::XmlQueryExpression::execute (this=0x0, contextItem=@0xfffffdfe, context=@0xbfcb0e04, flags=4294966782) at /devel/tfm/developers/szobell/berkeley-db-xml/dbxml-2.4.16/dbxml/include/dbxml/XmlValue.hpp:186
    #25 0x0805af4b in XmlRecordWithCounts::ExtractQueryString (this=0xbfcb0dd0, select=@0xbfcb0e2c, result=@0xbfcac1d0, qDocument=0xbfcb0e14) at src/XmlRecordWithCounts.cpp:401
    #26 0x080585f6 in OdRecord::GetRequiredContent (this=0xbfcb0dd0, name=@0xbfcac1e0, origin=@0xbfcac1d0, dest=@0xbfcac1c0, type=@0xbfcac1b0, dist=@0xbfcac198, totalCount=@0xbfcac194, route=@0xbfcac1a0, qDocument=0x0) at src/OdRecord.cpp:143
    #27 0x0804d9c3 in ProcessOd (fpPrivate=0x8e11098, odDb=@0xbfcb0dd0, fdDb=@0xbfcb0d20) at src/BuildFdDb.cpp:263
    #28 0x0804f4c8 in ProcessOneDest (fpPrivate=0x8e11098, odDb=@0xbfcb0dd0, fdDb=@0xbfcb0d20, dest={static npos = 4294967295, _M_dataplus = {<std::allocator<char>> = {<No data fields>}, Mp = 0x9da758c "LAX"}, static Sempty_rep_storage = {0, 0, 69041, 0}}) at src/BuildFdDb.cpp:464
    #29 0x080501cd in main (argc=6, argv=0xbfcb10c4) at src/BuildFdDb.cpp:589
    At this time, the program is trying to extract fields out of an XmlDocument that is the result of a query. The program uses a pre-calculated XmlQueryExpression to extract a specific field. This may not be the best way to extract a field from a document, given the apparent overhead of needing a temporary file!
    My program queries two database files (OD.dbxml and FD.dbxml.new), and uses the information to add records to the second file. The databases are rather big:
    bash-3.2$ ls -l /tmp/*dbxml*
    -rw-rw---- 1 zobell users 5233745920 Jul 28 14:42 /tmp/FD.dbxml.new
    -rw-rw---- 1 zobell users 6539427840 Jul 13 10:16 /tmp/OD.dbxml
    (I keep them in /tmp because everywhere else uses NFS and performance is awful with NFS.)
    My environment:
    Red Hat Enterprise Linux Client release 5.3 (Tikanga) 32 bit.
    Berkeley DB XML 2.4.16, C++ interface.
    Disk space should not be an issue:
    bash-3.2$ df /tmp /var
    Filesystem 1K-blocks Used Available Use% Mounted on
    /dev/mapper/VolGroup00-tmp
    28948572 13044384 14409968 48% /tmp
    /dev/mapper/VolGroup00-root
    144742920 5333544 131938272 4% /
    I ran this program about a year ago and did not see this issue. I have made a few changes and linked to the newer version of the XML database since then. Any help is appreciated.

    I have more information about this problem.
    If I "disable" the routine __os_zerofill() in os_fzero.c, by having it always return (0), I no longer get an exception and my application appears to run smoothly. However, I have not determined what in this routine leads to the exception. And, I have no idea what the short and long term consequences of "disabling" this routine will be....
    -Coralie

  • Portlet backing file vs content backing file

    Hi,
    could someone explain the differences between a "portlet backing file" and a "content backing file". Both are properties available on a portlet.
    Thx
    Emmanuel

    According to the documentation, here is the difference:
    Scoping and Backing Files
    The difference between having a backing file as part of <netuix: portlet backingfile =some_value> or part of <netuix: jspContent backingfile=some_value> is related to scoping.
    For example, if you have the backing file on the portlet itself, you can actually stop the portlet from rendering. If the backing file is at the jspContent level, the portlet portion of the control tree has already run; you use this implementation to run processes that are specifically for the JSP in the portlet.
    See http://download.oracle.com/docs/cd/E13155_01/wlp/docs103/portlets/building.html#wp1077130 for more info.
    Brad

  • How to get PortetSession object in backing file

    Hi all,
    Is it possible to get PortletSession object for current portlet in a backing file. If it is then could you please tell me how?
    regards
    -saurabh

    Pl see your duplicate post here - How to capture SQL *Loader program parameter value in control file?
    Srini

  • CGI map file questions, help !!!

    I am trying to use the CGI map file to open web reports. I got two questions at this time.
    1. How to refresh the report to reflect resent edits ? I used the CGI map to open a report. Later, I made some edits to the report and opened it again. However, the browser showed the report before the edit. I had to save the report to different file name and edited the key in the map file to show the edited report. This should not be the right way.
    2. How to open a report on a separated screen which is on top of the original one ?
    Any suggestions? Thanks!
    null

    Hi Kate.
    As far as a find and replace tool is concerned, most of us
    here prefer using some tool such as FAR or BkReplacem as they offer
    more features to help in this kind of scenario. The simple answer
    is however that these tools, as indeed does the inbuilt tool, bases
    it's search on the HTML. Therefore if there are specific instances
    of HTML strings you will have to analyse carefully them before you
    replace anything. It sounds like you are already some down down
    this line. Take a backup of your project and test out your theory.
    As far as your map file question is concerned, you can safely
    reimport your map file PROVIDED that no changes have been made to
    the mapids in the meantime. Personally I wouldn't do this unless
    you are 100% sure of this. If it is a case of having 100s of topics
    that are not mapped and never have been but could be, I'd just
    create a new map file and map away.

  • Is it possible to use a portlet backing file on the dvt_enabler portlet?

    We currently have a 9.2 portal with a simple login form portlet that uses a backing file to do much security checking, authentication against ActiveDir, etc. Our requirement is to convert to WLP 10.3 using the DVT enabler portlet or something like it for login (because DVT/DISC is to be turned on for the portal). will it be possible to specify that backing file against the DVT enabler portlet?

    I'm not sure using the DVT enabler portlet will do what you want. It basically just specifies the render dependencies to bring in the dojo and dvt javascript libraries. It doesn't provide any login support itself; the javascript it brings responds to the logged-in state of the user (accessed via DISC), so something else is required to login the user.
    Greg

  • Problem with backing file in weblogic portal

    Hi friends,
    Hope all are good. How to call the backing file methods,before begin method of jpf portlet of weblogic.
    Thanks,
    Ramanuja kolla.

    Serge, can you post this in weblogic.servlet.interest.portal? There is a
              chance portal gurus might be able to answer this query
              --Nagesh
              "Serge" <[email protected]> wrote in message
              news:403080b2$[email protected]..
              >
              > Hello.
              >
              > I am developing Portal Web application now using WebLogic Workshop 8.1
              with Service
              > Pack2 and I have a problem with Default Page in Portal.
              >
              > The problem is following: when I click on ANY link (even on Minimize or
              Maximize
              > in Portlet titlebar) on the page that is not default for my application,
              default
              > page is always shown. Why does it happen? Can you help me?
              

  • No Backing File in Portlet

    Hi All,
    Is there any possibility of not having a backing file when we are implementing the IPC (Inter-Portlet Communication) in our portal application ??
    Thanks in Advance
    Portal Developer

    Hello,
    A backing file is not needed unless you want to do something "custom" with the events your portlet receives. All the options listed at http://edocs.bea.com/wlp/docs102/portlets/ipc.html#wp1055503 can be specified in your .portlet file, and only "invoke backing file method" actually requires a backing file.
    Kevin

  • I am not able to use two backing files in same portal page

    hi to all
    i am using backing files in remote portlet.
    but i have two portlets in my portal page and in both i need to use backing files. i used seperate backing files for both the portlets but only one works at a time.
    please help me out frnds..
    did this happening because of same object MarkupRequestState.KEY..... following is code that i am using. similar code used for another portlet, just a change of state varible and parameter variable
    am i missing something?
    package backempno;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import com.bea.netuix.servlets.controls.content.backing.AbstractJspBacking;
    import com.bea.wsrp.ext.holders.MarkupRequestState;
    import com.bea.wsrp.ext.holders.SimpleStateHolder;
    public class sendempno extends AbstractJspBacking
    public boolean preRender(HttpServletRequest request,HttpServletResponse response)
    SimpleStateHolder state2 = new SimpleStateHolder();
    String empno=request.getParameter("empno");
    state2.addParameter("empno",empno);
    request.setAttribute(MarkupRequestState.KEY, state2);
    return true;
    }

    Hi Susan,
    In that case I will recommend that you consult a local technician/IT team and see if there is some network connectivity issue with your machine.
    - Abhishek Maurya

Maybe you are looking for

  • My powermac dual g5 will not boot up and/or wake up from being asleep

    My power mac will not boot up. I hit the power button and it mades the first sound but not the boot sound. My keyboard will not light up or turn on. I replaced the pram battery I hought that might help. It didn't. I am not sure hot to open the disc d

  • [SOLVED] Unable to boot into fresh install (UEFI, gummiboot)

    Hello to you all, I installed arch linux on my new Lenovo E130 following Beginner's guide. After install, when I rebooted the system I'm dropped into emergency shell. Whole log: :: running early hook [udev] :: running hook [udev] :: Triggering uevent

  • Recevier adapter empty message-handling ignore

    Hi all, I configured file receiver adapter with file content conversion (comma separated). In processing parameters Empty-message handling is set to Ignore. Payload that is in message generated from SAP is:   <?xml version="1.0" encoding="utf-8" ?>  

  • Is my battery life the same as when I first got my ipod?

    I've had my iPod for a couple months, I've noticed that the battery life seems weaker and dies out quicker now. Am I just thinking this, is my battery life the same as when i first got my iPod?

  • How to get Anchored Frame oversets

    Dear All I'm having one big problem regarding for the Anchores I'm having 10 pages with anchored Frames data's in the pages. Query:1 How to collect all anchored Frames Query 2: How to get the Anchored Frames Overset checking Query 3: How to get the A