Muench's examples, #81

I have a question for Steve M. or someone who used his example code #81. Does this method of refreshing a page ever not work? It seems like it only works once per request cycle. It is hard for me to tell why it does not work in a particular scenario.

Maybe a better question here is: how does this example work? It resets the root node. Is there any way to more fully understand exactly what it is doing? It is JSF, so I guess reading up on JSF at w3c would probably be a good way.

Similar Messages

  • Displaying Images in ADF/JSF: Error Using Steve Muench's Example #69

    Hi,
    I've been able to load images into the database using Steve Muench's Example 69. However, I'm having issues displaying the images.
    Jdeveloper: 10.1.3.3.0
    Database: 10gR2 with ORDSYS active.
    I'm getting the following error:
    07/08/20 12:09:20.993 JSFOrdImageExample-ViewController-webapp: Servlet error
    java.lang.NullPointerException
         at oracle.ord.html.OrdPlayMediaServlet.renderContent(OrdPlayMediaServlet.java:403)
         at oracle.ord.html.OrdPlayMediaServlet.deliver(OrdPlayMediaServlet.java:263)
         at oracle.ord.html.OrdPlayMediaServlet.doGet(OrdPlayMediaServlet.java:204)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:162)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:623)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:613)I'm not sure why I'm getting a NullPointerException...
    Previous to this, I had to include the bc4jhtml.jar file as a library in application.xml, and I've tried using the two bc4jhtml.jar files, but neither one seems to work.
    I'm thinking that there must be something simple that I'm missing with the servlet setup...
    Thanks!
    Kenton

    I tried the wayback machine, but unfortunately, it doesn't cache the SWF files either :( I do have a copy of some (ok one) of Steve's old videos (the one that shows how to do a dropdown list in an editable table, back before it was easy to do), but unfortunately, none of the search ones.
    John

  • Muench ex pg715-18 works until add CURSOR to select; anyone know how?

    I have an XSQL, modeled after the Muench book example on pg715-18, which uses xsql:ref-cursor-function to call a PL/SQL procedure which returns a ref cursor.
    It works very well UNTIL I try to use CURSOR in the SELECT statement built and ran in the PL/SQL after which I get an error like
    ORA-00600: internal error code, arguments: [kokbcrwo1], [2], [3], [], [], [], [], [] ORA-06512: at "JSDB.CATEGORYMAPSEARCH", line 262 ORA-06512: at line 1
    The database is Oracle 9.2.0 and I am using the XDK/XSQL that was installed with the database.
    Does anyone have an example which extends the Muench example to use CURSOR in the SELECT or which uses the tool delivered with 9.2.0 (DBMS_XMLGEN, etc.) to achieve the equivalent of the Muench example which returns/produces nested XML?
    Thanks
    R.Parr
    TemporalArts

    I found I get this error whenever the outermost select statement contains DISTINCT. Further I discovered a similar (albeit slightly different error) if the outermost select has GROUP BY.
    I got worked around the problem for my current use but would like to know if this is, in fact, a restriction on the use of CURSOR in XSQL and if it is still a restriction in vers 10 of the XDK?
    Thanks
    R.Parr
    Temporal Arts

  • Filter query based on a value from a drop down menu

    I am using ADFBC/JDev 10.1.3/ADF-faces (JSPX)
    I would like to display a table of data based on a view object and have a drop down menu of values that the user can select from which would filter the table of data. The filter would be applied to a field in the VO. For example, have a JSPX page that shows all employees and have a drop down menu that filters the employees by a specific department with an option to show all departments too in the drop down. I'm not sure if Steve Muench's example #76 (http://radio.weblogs.com/0118231/stories/2004/09/23/notYetDocumentedAdfSampleApplications.html) would serve as a basis for this requirement or not.
    Can anybody give me high level guidance on how to do this? Both declaratively and programmatically would be great.
    Thanks,
    Quoc

    I can't get the JSPX page to display the correct data. It's displaying the entire VO and when you try to select Yes or No or All from the drop down menu, it just changes the Active Flag column in the table to whatever you select for the first row only and still displays the rest of the rows in the VO.
    Here's my JSPX code:
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
              xmlns:h="http://java.sun.com/jsf/html"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:af="http://xmlns.oracle.com/adf/faces"
              xmlns:afh="http://xmlns.oracle.com/adf/faces/html"
              xmlns:cust="http://xmlns.oracle.com/adf/faces/customizable">
      <jsp:output omit-xml-declaration="true" doctype-root-element="HTML"
                  doctype-system="http://www.w3.org/TR/html4/loose.dtd"
                  doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
      <jsp:directive.page contentType="text/html;charset=windows-1252"/>
      <f:view>
        <afh:html>
          <afh:head title="showEmployees">
            <meta http-equiv="Content-Type"
                  content="text/html; charset=windows-1252"/>
          </afh:head>
          <afh:body>
            <af:messages/>
            <h:form>
              <af:panelForm>
                <af:selectOneChoice value="#{bindings['bind_active_flag1'].inputValue}"
                                    label="#{bindings['bind_active_flag1'].label}">
                  <f:selectItems value="#{bindings['bind_active_flag1'].items}"/>
                </af:selectOneChoice>
                <af:commandButton actionListener="#{bindings.ExecuteWithParams.execute}"
                                  text="ExecuteWithParams"
                                  disabled="#{!bindings.ExecuteWithParams.enabled}"/>
              </af:panelForm>
              <af:table value="#{bindings.EmployeesView.collectionModel}" var="row"
                        rows="#{bindings.EmployeesView.rangeSize}"
                        first="#{bindings.EmployeesView.rangeStart}"
                        emptyText="#{bindings.EmployeesView.viewable ? 'No rows yet.' : 'Access Denied.'}">
                <af:column sortProperty="EmployeeId" sortable="true"
                           headerText="#{bindings.EmployeesView.labels.EmployeeId}">
                  <af:outputText value="#{row.EmployeeId}">
                    <f:convertNumber groupingUsed="false"
                                     pattern="#{bindings.EmployeesView.formats.EmployeeId}"/>
                  </af:outputText>
                </af:column>
                <af:column sortProperty="FirstName" sortable="true"
                           headerText="#{bindings.EmployeesView.labels.FirstName}">
                  <af:outputText value="#{row.FirstName}"/>
                </af:column>
                <af:column sortProperty="LastName" sortable="true"
                           headerText="#{bindings.EmployeesView.labels.LastName}">
                  <af:outputText value="#{row.LastName}"/>
                </af:column>
                <af:column sortProperty="ActiveFlag" sortable="true"
                           headerText="#{bindings.EmployeesView.labels.ActiveFlag}">
                  <af:outputText value="#{row.ActiveFlag}"/>
                </af:column>
              </af:table>
            </h:form>
          </afh:body>
        </afh:html>
      </f:view>
    </jsp:root>Here's the bindings page:
    <?xml version="1.0" encoding="UTF-8" ?>
    <pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel"
                    version="10.1.3.41.57" id="showEmployeesPageDef"
                    Package="view.pageDefs"
                    MsgBundleClass="view.pageDefs.showEmployeesPageDefMsgBundle">
      <parameters/>
      <executables>
        <iterator id="EmployeesViewIterator" RangeSize="10" Binds="EmployeesView"
                  DataControl="AppModuleDataControl"/>
        <variableIterator id="variables">
          <variableUsage DataControl="AppModuleDataControl"
                         Binds="EmployeesView.variablesMap.bind_active_flag"
                         Name="EmployeesView_bind_active_flag" IsQueriable="false"/>
        </variableIterator>
        <iterator id="DropDownIterator" RangeSize="-1" Binds="DropDown"
                  DataControl="AppModuleDataControl"/>
      </executables>
      <bindings>
        <table id="EmployeesView" IterBinding="EmployeesViewIterator">
          <AttrNames>
            <Item Value="EmployeeId"/>
            <Item Value="FirstName"/>
            <Item Value="LastName"/>
            <Item Value="Email"/>
            <Item Value="PhoneNumber"/>
            <Item Value="HireDate"/>
            <Item Value="JobId"/>
            <Item Value="Salary"/>
            <Item Value="CommissionPct"/>
            <Item Value="ManagerId"/>
            <Item Value="DepartmentId"/>
            <Item Value="ActiveFlag"/>
          </AttrNames>
        </table>
        <action id="ExecuteWithParams" IterBinding="EmployeesViewIterator"
                InstanceName="AppModuleDataControl.EmployeesView"
                DataControl="AppModuleDataControl" RequiresUpdateModel="true"
                Action="95">
          <NamedData NDName="bind_active_flag" NDType="java.lang.String"
                     NDValue="${bindings.EmployeesView_bind_active_flag}"/>
        </action>
        <attributeValues id="bind_active_flag" IterBinding="variables">
          <AttrNames>
            <Item Value="EmployeesView_bind_active_flag"/>
          </AttrNames>
        </attributeValues>
        <list id="bind_active_flag1" IterBinding="EmployeesViewIterator" StaticList="false"
              ListOperMode="0" ListIter="DropDownIterator" NullValueFlag="1"
              NullValueId="bind_active_flag1_null">
          <AttrNames>
            <Item Value="ActiveFlag"/>
          </AttrNames>
          <ListAttrNames>
            <Item Value="Value"/>
          </ListAttrNames>
          <ListDisplayAttrNames>
            <Item Value="Description"/>
          </ListDisplayAttrNames>
        </list>
      </bindings>
    </pageDefinition>Any ideas?

  • Using a polymorphic view object with binding

    Hi,
    I'm hoping there's something simple I'm missing when trying to setup up the bindings for a ADF/struts page using a polymorphic view object.
    I'm using Entity and VO polymorphism to create a Question which has different types - boolean, multi-choice, likert, etc. I have the various question types created as sub type entity and view objects and added to the app module - when added to the app module the question types are subtypes of QuestionView so they don't actually appear in the Data Controls palette. This setup is like that used in Steve Muench's examples (blog at http://radio.weblogs.com/0118231/stories/2003/02/06/constructingTheDesiredEntityInAPolymorphicViewObject.html and the related undocumented one)
    My question is, how do I get to the data and have jdev create the necessary bindings for the extra attributes the subtype questions have? Since they don't appear as available data controls I can't create a binding iterator or anything for them - short of adding them as spearate view objects (which destroys the whole point of using polymorphism in this case) is there a way to do this?
    Really, the only reason I want to use the polymorphism is so I can have different types of entity validation depending on the type. Should I just simplify this to be one entity object with one VO and put all the validation into "if else's" based on a discriminator?
    Assistance appreciated...
    - Nathaniel

    How else are you planning to associate a JUTableBinding to the 'common' iterator containing all four types of rows and then selectively display them? Perhaps you'd need a custom model over the JUTabelModel that'd filter the rows out.
    I'm not sure if all that trouble is worth it given that your datasets (as far as mentioned in this post) are not large. If these tables/data has to be refreshed/executed a number of times, then you may see the overhead of four queries otherwise it should be fine as database is always faster in filtering rows than doing that in memory.

  • ADF-BC/JSF How to restrict the size of an ordImage

    Hi all
    I have a table containing two columns with type ordsys.OdImage. One is a small resolution icon and the other the image itself.
    Using Steve Muench s example mo 69, I was able to create a ADF-BC/JSF application that loads images to the database.
    Now my next step is to reject images whose size in pixels is other than the one defined for thumbnails, which is 100x100, I thought that I could do this by tampering with the getter methods of the ViewRowImpl Java class but it didn't work. It appears to me that the framework creates an empty image first and then loads the contents from a file.
    Can anybody give me a clue about how to accomplish this ?
    Thanks in advance
    Thanassis

    Just finished testing the validateEntity() approach and it failed.
    I think that I must be doing something wrong here.
    I use the OrdImageDomain.getHeight() and getWidth() functions and they both return 0 wheither invoked during attribute setter method or during the validateEntity().
    Anybody out there with a clue ....
    Thanassis

  • [SOLVED]Attempt to passivate/activate custom user data not working

    Hi
    I have an ADF BC application written in JDev 10.1.3.3 and our customers are reporting intermittent "Missing param at index xxx" error messages. I gathered that this could be related to passivation/activation problems in our application. I switched the app module jbo.ampool.doampooling=false and found that app failed repeatedly with the error even after patch 6215854.
    I tried converting to 10.1.3.4 and found that the application ran without error even with jbo.ampool.doampooling=false. However on one of the pages I am using a tree object which utilises a View Link Accessor that contains a bind variable. To set the value of the bind variable I am using VO client interface methods as per Steve Muench's example 113
    http://radio.weblogs.com/0118231/stories/2004/09/23/notYetDocumentedAdfSampleApplications.html
    The variable I am passing to the VO client interface methods is stored in a session scope bean and doesn't survive the activation/passivation process.
    So I followed the instructions here
    http://download-uk.oracle.com/docs/html/B25947_01/bcstatemgmt005.htm#sm0495
    and put my value into the user session hash table and try to write that value to the passivation snapshot.
    The problem comes in the activation stage. Processing does not pass the line in bold tags because the length of the nodeList = 0. It seems to find a nodeList from "custId" but its length is zero. Any ideas why that could be?
                if (elem != null) {
                  // 1. Search the element for any <jbo.counter> elements
                   System.out.println("@activate state wanal 1 2");
                  NodeList nl = elem.getElementsByTagName("custId");
                  if (nl != null) {
                    // 2. If any found, loop over the nodes found
                    System.out.println("@activate state wanal 1 3 <"+nl.getLength()+">");
    for (int i=0, length = nl.getLength(); i < length; i++) {
                      // 3. Get first child node of the <jbo.counter> element
                       System.out.println("@activate state wanal 1 4");
                      Node child = nl.item(i).getFirstChild();
                      if (child != null) {
                          System.out.println("@activate state wanal 1 5 <"+child.getNodeValue()+">");
                        // 4. Set the counter value to the activated value
                        getDBTransaction().getSession().getUserData().put("custId",new Integer(child.getNodeValue()));                   
                        break;
                }thanks
    paul
    Message was edited by:
    paul.schweiger

    Thanks Timo that debug output was really useful
    My initial error was that I was setting a property custId and then trying to retrieve custID - oops
    It turns out that the session scope bean data was surviving passivation/activation but the value in the bind variable in the view link accessor was not surviving. I now ensure that the bind variable is set by calling the method that populates the bind varaible on activation and use the data from session user data hash table
    thanks
    paul

  • JBO-35007 Row currency... another solution

    Hi all,
    I found another solution for handling of JBO-35007. If you implement extension of FacesPageLifecycle like in SRDemoSampleADFBC, in your class (eg. MyFacesPageLifecycle), right after line "JboException jboex = (JboException) ex;" in method "processException", put this:
    if ("35007".equals(jboex.getErrorCode()))
    refreshCurrentPage();
    return;
    The method refreshCurrentPage() I used is from Steve Muench's examples:
    public static void refreshCurrentPage()
    FacesContext context = FacesContext.getCurrentInstance();
    String currentView = context.getViewRoot().getViewId();
    ViewHandler vh = context.getApplication().getViewHandler();
    UIViewRoot x = vh.createView(context, currentView);
    x.setViewId(currentView);
    context.setViewRoot(x);
    Mirza

    This is a question for ALL JDev masters. What if I NEVER use the back button, but still get this error. I use the solution posted on many sites, enableTokenValidation=false, on the page-def. My issue doesn't relate whatsoever to the back button. I use jdev 10.1.3.3, ADF-BC. Here is the approach:
    The user searches for a person based on some parameters. All of the views are read-only and are extended from the original ViewImpl (there is a :p_id_person and also
    protected void executeQueryForCollection(Object object, Object[] bindParams, int i) {
            applyGenericBindParam(bindParams, "p_id_person ", getPersonId().toString());
            super.executeQueryForCollection(object, bindParams, i);
    }), so that when the person is found, the id is set in the hash map userdata(session object). All of the view objects have the bound variable (the id = :p_id_person) obviously. Now the other views also have some select queries which do some joins with other tables, as well as the person table (with the original id_person). Now here is the interesting part. I have many pages with read-only tables representing the view objects. These pages render without any errors. I point out, we DO NOT use the back button, since we are aware of the issue. However, when I go the search page and search for another user (go through all of the steps like above), on some of the pages when I click the first time, the 35007 error appears with the information regarding the first row from the table where the previous user was bound. The second time I click on the page (the link to the page), the page renders without any errors. The solution was found in the token validation, but I am still puzzled why this happens. Hopefully, one of the adf masters will answer this post, if not I will post it as a new thread. Thnx in advance
    PaQu

  • [SOLVED]JDBC Dynamic credentials problem

    Hello everyone. I have been trying to implement Steve Muench example 14 about JDBC Dynamic Credentials on my own web app., I am using Jdeveloper 10.1.3.2 and JSF/ADF.
    The thing is that the JDBC dynamic credential works well but when I enter a non-existant username/password the login.jsp page sends me to the main.jsp page and in the table that I have placed there (in the main.jsp page) it shows "Access Denied". Is there any way to tell the app. to redirect the users to the login.jsp page if they try to acces other parts of the app. and they are not logged in???, or is it thay I am missing something from the Steve Muench's example???
    I have been cheking the "DynamicJDBCBindingFilter.java" code and, if I understand correctly ('cause I consider myself a newbe), the "super.doFilter(request, response,chain)" is suppoused to throw an exception if the authentication fails and the "catch" code then sends the user to the login.jsp page... but for some reason this doesn't work!!!
    Can anybody help me on this one please?
    Thanks.
    * By the way, no errors are thrown!
    Message was edited by:
    dragonov7

    Hi Frank, thanks for your response. That same idea crossed my mind but the thing is that the line "super.doFilter(request, response,chain);" is supouseded to throw an exception if it fails to do its job but for some reason it does not... I have placed a "System.out.printline("XXX");" line inmediatly after the "catch" statement to see if an exception is thrown but apparently it doesn't, so I can't set a flag if I don't know for sure if the process ended well (or wrong).
    I think I'll clear my mind for 1 hour and start all over again... maybe I am missing something...

  • [freelance job] Experienced ADF/Struts/JSP View-Controller developer

    Hi,
    I'm looking for a freelance "10.1.2 JDeveloper":
    - First task: Development of multi-lingual Struts View and Controller for login, logout, contact, free registration(create/modification of account info, new password, ...) pages.
    Period: may, june 2005 and more if first collaboration is succesful.
    Skills on following technologies are required:
    - View: Struts tags , Struts-el tags , JSTL , JSP , Servlets => no javascript, no UIX, no faces
    - Controller: ADF/Struts
    - Model: Oracle ADF-BC 10.1.2 Oracle 10g Database
    We provide the static html pages + css files and the ADF-BC model components.
    We develop/enhance the Model service methods based on your requirements.
    You "translate" the static html pages to Struts/Struts-EL/JSTL/JSP and the necessary ADF-Struts controllers that inter-act with our ADF-BC Model.
    Contact: [email protected]
    Regards
    Fred
    PS Sorry for polluting this technical forum with this kind of request.

    Dear all..
    I have change the block program, but still can't run..
    My EmpAction.java like these
    ==============================================
    package BindTest7.view;
    import BindTest7.model.EmpViewImpl;
    import java.text.DateFormat;
    import java.text.ParseException;
    import
    oracle.adf.controller.struts.actions.DataActionContext;
    import
    oracle.adf.controller.struts.actions.DataForwardAction;
    import oracle.jbo.ApplicationModule;
    import oracle.jbo.ViewObject;
    import java.util.Date;
    public class EmpAction extends DataForwardAction
    protected void prepareModel(DataActionContext ctx) throws Exception {
    super.prepareModel(ctx);
    ctx.getBindingContainer().findIteratorBinding("FindEmpView1Iterator")
    .setFindMode(true);
    public void onSearch(DataActionContext ctx) {
    ctx.getBindingContainer().findIteratorBinding("EmpView1Iterator")
    .executeQuery();
    //-public void onFilter(DataActionContext ctx)
    //recovery view
    ApplicationModule
    am=ctx.getBindingContainer().getDataControl().getApplicationModule();
    ViewObject EmpView=am.findViewObject("EmpView");
    //recovery dates
    String
    d1Str=ctx.getHttpServletRequest().getParameter("hiredate");
    String
    d2Str=ctx.getHttpServletRequest().getParameter("endDate");
    java.text.SimpleDateFormat formatter =
    new java.text.SimpleDateFormat("dd/MM/yyyy");
    Date d1=null;
    Date d2=null;
    // parse method could try a ParsingException,
    // it doesn't happpeend when dates are correct
    try
    d1=formatter.parse(d1Str);
    d2=formatter.parse(d2Str);
    catch (Exception e)
    //set where clausole
    EmpView.setWhereClauseParams(null);
    EmpView.setWhereClause("Hiredate>=:1 and Hiredate<=:2");
    EmpView.setWhereClauseParam(0,d1);
    EmpView.setWhereClauseParam(1,d2);
    EmpView.executeQuery();
    ===============================================
    Please help me....
    I just want to make a little modification on Steve Muench's Example
    by placing two input form for hiredate column so that
    the user only put the date
    on the query " between hiredate :1 and :2
    I'm waiting...
    regard
    erie

  • Setting Component rendered property On Page-Load

    I am using Jdeveloper 11g - fusion- web application.
    What I am trying to do is, onpageload, I am trying to over-ride some default properties of my uiComponents like rendered or read-only programatically.. I was referring to Steve Muench's Example no 60 -
    [http://radio.weblogs.com/0118231/stories/2004/09/23/notYetDocumentedAdfSampleApplications.html] to do this. That is to say, I have a controller for my page-def file which implements the PagePhaseListener. It looks something like
    {color:#ff0000}
    public void beforePhase(PagePhaseEvent pagePhaseEvent) {
    if (pagePhaseEvent.getPhaseId() == Lifecycle.PREPARE_MODEL_ID) {
    if (!isPostback()) {
    new AttributeAuthorization().initializeAuth();
    }{color}
    {color:#000000}
    And inside the initializeAuth() method, I get a handle to the current instance of FacesContext, get the context.getViewRoot()
    component tree, iterate on the component tree and call uiComponenet.setRendered(false/true)
    for some components. My problem is, when the page is rendered, the values I have set is not reflecting. But on the next request, ie, if I simply press the commit button on my page, all the components are rendered the way I expect them to...
    I tried doing this in different phases of the life-cycle like PREPARE_RENDER_ID, PREPARE_MODEL etc, in before and after methods, but my page renderes the way I expect it to only on the next request/page submission!!
    {color}
    Edited by: Julian Stephen on Dec 7, 2008 9:05 PM
    Edited by: Julian Stephen on Dec 7, 2008 9:14 PM

    The reason why I do-not want to use a managed bean is that, I want to do this for all the components in my page(It is reasonably big too). So doing this by a managed bean would mean, I need an interface which has as many getter methods as the no of components in the page. Also, we are still in developement which means everytime some-one adds a new component in the page they need to add a new getter method in the interface. Well not just the interface, but also in all the implementing classes...
    The business use-case is that, I have one page in the application which has different levels of visibility(Some components read-only, some not rendered, some editable) based not just on who is logged in but also on other business conditions decided on the page prior to this. So based on these different conditions I build different schemes or themes(I have like 3/4 themes) which decides which components are read-only, which all are editable etc etc... Now I have to apply this 'theme' on to my page :). The way I am trying to do it now, everytime a new component is added, its visibility just need to be set in the property files of different themes.
    Thanks,
    Julian

  • Does XSQLRequest require an actual file or can it handle a CLOB?

    Does the XSQL page have to be a file with an XSQL extension? Is there any way to send it the URL of a CLOB in the database?
    I'd like to call XSQLRequest and send it the URL of a CLOB in the database instead of the URL of a file. I have used Steve Muench's example of defining a new URL protocol that represents a CLOB but when I call method processToXML I'm getting errors. This all works great when I send a file with a xsql extension.
    Thanks very much!

    This is a repost of an e-mail sent to Steve on 2/2. Just wanted to know if anyone found out anything since February.
    ***IMPORTANT*** In playing around with the XSQLRequest that takes the DOM vs. the XSQLRequest that takes a URL, I discovered that if I call
    XSQLPagey.FindAndProcessXSQLPage(sUrl);
    and then subsequently call
    XSQLPagey2.FindAndProcessXSQLPageAsDOM(((XMLDocument)parsedDoc), null);
    ***everything works fine!*** and the result of the second call goes into the database. If I comment out the call to FindAndProcessXSQLPage, however, I will get the null pointer error when FindAndProcessXSQLPageAsDOM calls processToXML. This is why the program below has both calls in it.
    Thanks!
    Dale Johnson
    ******************************MAIN********************************
    import XSQLRequestSample;
    import ReadCLOB;
    import WriteCLOB;
    import XMLDocuments;
    import java.io.*;
    import org.w3c.dom.Document;
    import oracle.xml.parser.v2.*;
    import java.sql.*;
    import oracle.jdbc.driver.*;
    import java.sql.Connection;
    import oracle.sql.*;
    import java.net.URL;
    import org.xml.sax.SAXParseException;
    import org.xml.sax.InputSource;
    public class MainClass extends Object {
    public static void main( String[] args) throws Exception {
    Document Doc;
    Document Doc2;
    Connection conn = GetConnected.getConnection("blah", "blah", "@bah", "blah");
    XSQLRequestSample XSQLPagey;
    XSQLRequestSample XSQLPagey2;
    XMLDocuments.enableXMLDocURLs();
    String sUrl = new String("file:///G:/helloworld.jomama");
    DOMParser dp = new DOMParser();
    try {
    dp.parse(sUrl);
    catch (SAXParseException spe) {
    System.out.println(spe.getMessage());
    Document parsedDoc = dp.getDocument();
    Doc = XSQLPagey.FindAndProcessXSQLPage(sUrl);
    ((XMLDocument)Doc).print(System.out);
    Doc2 = XSQLPagey2.FindAndProcessXSQLPageAsDOM(((XMLDocument)parsedDoc), null);
    if (Doc2 != null) {
    ((XMLDocument)Doc2).print(System.out);
    CLOB theBigClob = ReadCLOB.getCLOBfromColumn(conn,
    "DALE_XML_TEST", "DALE_XML", "ID", "/111");
    WriteCLOB.fromXMLDocument(((XMLDocument)Doc2), theBigClob);
    conn.close();
    ***************************** My version of XSQLRequestSample *********************************
    import oracle.xml.xsql.*;
    import java.util.Hashtable;
    import java.io.*;
    import java.lang.string.*;
    import java.net.URL;
    import org.w3c.dom.Document;
    import oracle.xml.parser.v2.*;
    import org.xml.sax.SAXParseException;
    import org.xml.sax.InputSource;
    public class XSQLRequestSample {
    public static Document FindAndProcessXSQLPage(String sUrl ) throws Exception {
    Document Doc;
    // Construct the URL of the XSQL Page
    // Construct a new XSQL Page request
    XSQLRequest req = new XSQLRequest(sUrl);
    // Setup a Hashtable of named parameters to pass to the request
    Hashtable params = new Hashtable(3);
    // Process the page, passing the parameters and writing the output
    // to standard out.
    return req.processToXML(params,new PrintWriter(System.err));
    public static Document FindAndProcessXSQLPageAsDOM(XMLDocument theDoc,
    URL url )
    throws Exception {
    XSQLRequest req = new XSQLRequest(theDoc, url);
    // Setup a Hashtable of named parameters to pass to the request
    Hashtable params = new Hashtable(3);
    // Process the page, passing the parameters and writing the output
    // to standard out.
    return req.processToXML(params,new PrintWriter(System.err));
    }

  • Problem with af:tableSelectOne / af:commandButton

    Hi,
    I have an af:tableSelectOne and an associated af:commandButton 'Confirm' whos action is the method processLink() in the backing bean .
    For the first page of table results, everything works as expected, however, for any subsequent page of table results selecting a row and clicking 'Confirm' submits the page but does not call processLink() ie does not hit my breakpoint. After the submission, clicking 'Confirm' hits processLink().
    Why do I need to click the command button twice to hit its action?
    Furthermore, if i set AutoSubmit to true on the af:tableSelectOne it solves the problem, but has the undesired side effect of submiting the page everytime a row is selected.
    Any ideas?
    Please let me know if further information is required.
    Thanks.

    Hi, I am newbie to JSF-ADF and face a similar problem. I am working off of Steve Muench's example ([http://radio.weblogs.com/0118231/stories/2004/09/23/notYetDocumentedAdfSampleApplications.html#85]) and trying to add a download component to the page.
    Below is a snippet of the download segment from the JSF page.
    +&lt;af:table value="#{bindings.LastFiveUploadsList.collectionModel}"+
    +var="row" rows="#{bindings.LastFiveUploadsList.rangeSize}"+
    +first="#{bindings.LastFiveUploadsList.rangeStart}"+
    +emptyText="#{bindings.LastFiveUploadsList.viewable ? 'No rows yet.' : 'Access Denied.'}"+
    +id="table1"&gt;+
    +&lt;f:facet name="selection"&gt;+
    +&lt;af:tableSelectOne binding="#{UploadFileToBlob.tableSelectOne}"+
    +id="tableSelectOne1" /&gt;+
    +&lt;/f:facet&gt;+
    +&lt;f:facet name="actions"&gt;+
    +&lt;af:panelButtonBar&gt;+
    +&lt;af:commandButton text="Download"+
    +binding="#{UploadFileToBlob.downloadButton}"+
    +id="downloadButton"+
    +action="#{UploadFileToBlob.downloadAction}"/&gt;+
    +&lt;/af:panelButtonBar&gt;+
    +&lt;/f:facet&gt;+
    +&lt;af:column headerText="#{bindings.LastFiveUploadsList.labels.Filename}"+
    +&lt;af:outputText value="#{row.Filename}"/&gt;+
    +&lt;/af:column&gt;+
    +&lt;/af:table&gt;+
    And in the managed bean:
    +public String downloadAction() {+
    +DCIteratorBinding Iter = ADFUtils.getIterator("LastFiveUploadsList");+
    +Row r = Iter.getCurrentRow();+
    +System.out.println((String)r.getAttribute("Filename"));+
    +}+
    Irrespective of the selection from the list for download, the "r.getAttribute('Filename") always returns the last uploaded file.
    What am I missing here? Thanks.

  • Run application from console

    Referring to Steve Muench's example of Using ADF Data Binding from a Simple Console Program here http://radio.weblogs.com/0118231/2005/05/25.html#a558.
    Can anyone tell me how to actually run it? I want to run it outside of Jdeveloper - do I need to run the setvars.bat script? If so what arguments do I need to pass to it?
    - Nathaniel

    Nathaniel,
    stand alone java programs typically are executed by
    java -classname
    or if they are in a package that has a default run target
    java -jar packagename
    Did you look at Steve's example?
    http://otn.oracle.com/products/jdev/tips/muench/consoleadf/ConsoleBatchModeExample.zip
    His sample client should have a main method that makes it runnable.
    Frank

  • Dynamic JDBC credentials example application from Steve Muench

    Apologies for this newbie question...but I'm trying to understand the Dynamic JDBC credentials example application from Steve Muench:
    http://radio.weblogs.com/0118231/stories/2004/09/23/notYetDocumentedAdfSampleApplications.html#14
    I think I understand most of it but the one bit I dont understand is why it customizes the ADF Page Lifecycle (DynamicJDBCADFPhaseListener, DynamicJDBCPageLifecycle, DynamicJDBCPageLifecycleContext).
    Can anyone explain to an ex-forms developer why this code is there?
    I'm also trying to work out a way for the session to be invalidated when the user logins again
    e.g. a user logins, he doesnt use the logout function but uses the back button to go back to the login page. when he logs in with another set of credentials, would a new session start or as i supsect, it would use the original login credentials?
    Thanks

    You can ignore those three classes in the example. They are not related to the dynamic credential solution, and must have been left over from some other example I evolved into what you see. Sorry to have cluttered up the implementation with stuff that isn't really contributing to the actual solution. DOH!

Maybe you are looking for

  • BPC 7.5: FX rate for opening balance from different category

    Hi, I have three categories in my system, ACTUAL, ESTIMATE and BUDGET. When we submit ACTUAL data, we also submit a forecast for the year end period (DEC in our case). We also have currency rates for FORECAST for the DEC period. We are now working on

  • Screen goes dim when processor working - even when plugged to mains power.

    Screen goes dim when processor working - even when plugged to mains power. Whether I'm running 3D software or just surfing the net, the screen keeping fading/dimming and then recovering over a few seconds. No USB devices connected, mains power on - N

  • Speakers suddenly stop working. Icon greyed out?!

    Hi all. I started my laptop this morning to find that the speakers don't appear to be working. For no reason whatsoever. They were working last night. And now they're not. I press the volume up, down and mute buttons and it does nothing. The 'overlay

  • Stopping Services Installation Error

    When i try to uprgrade/install the new itunes, for the new ipod i just got it installs for a bit but stops at stopping services and waits a few minutes then bring up a pop up saying "service "ipod service"(ipodservice) could not be stopped. Verify th

  • Need Explaination of simple matrix code?!?!?! Thx

    Can someone plz explain this simple code to me!?!? im a noob. I know that this code cycles through all the rows & columns of the given matrix, but i get completely lost at this part: s[row][col] = m[row + theRow][col + theCol] ; Regards, Slvr99 this