Using sequences in ADF-UIX

Hi
I am trying to add a record to a table using the create action from the data control.
The underlying table has a sequence defined on it. Is there a way to get the next sequence number to show when the user clicks the Create button?
thanks

Assuming the field the sequence is pushed to is called Id, and the sequence name is ID_SEQ, override the EO's create method with the following code:
protected void create(AttributeList attributeList) {
  super.create(attributeList);
  oracle.jbo.server.SequenceImpl idSeq = new SequenceImpl("ID_SEQ", getDBTransaction());
  setId(idSeq.getSequenceNumber());
}Now when you create a record in UIX, you'll see the sequence number prepopulated in the associated Id field. You can set the field's properties to readOnly as the user no longer has to populate it.
Hope this helps.
CM.

Similar Messages

  • Using sequence in adf

    hi i have a sequence in my database how can i use that sequence in my application. i have a createInsert button, i what to insert the id using the sequnce in my database
    Edited by: ADFnewbie on 2012/01/11 11:04 PM

    hi am trying to do my test in my application module am having this errror my expression is (new oracle.jbo.server.SequenceImpl("SMS_CAT_SEQ",adf.object.getDBTransaction())).getSequenceNumber()
    oracle.jbo.KeyNotPopulatedException: JBO-25078: Key attribute Id for SmsUsers not populated
         at oracle.jbo.server.OracleSQLBuilderImpl.buildWhereClause(OracleSQLBuilderImpl.java:2357)
         at oracle.jbo.server.EntityImpl.buildWhereClause(EntityImpl.java:10718)
         at oracle.jbo.server.OracleSQLBuilderImpl.doEntitySelectForAltKey(OracleSQLBuilderImpl.java:747)
         at oracle.jbo.server.BaseSQLBuilderImpl.doEntitySelect(BaseSQLBuilderImpl.java:552)
         at oracle.jbo.server.EntityImpl.doSelect(EntityImpl.java:8287)
         at oracle.jbo.server.EntityImpl.populate(EntityImpl.java:6951)
         at oracle.jbo.server.EntityImpl.getAttributeInternal(EntityImpl.java:3516)
         at oracle.jbo.server.AttributeDefImpl.get(AttributeDefImpl.java:3141)
         at oracle.jbo.server.AttributeDefImpl.resolveGet(AttributeDefImpl.java:3369)
         at oracle.jbo.server.EntityImpl.getAttrInvokeAccessor(EntityImpl.java:1674)
         at oracle.jbo.server.EntityImpl.getAttribute(EntityImpl.java:1639)
         at oracle.jbo.server.ViewRowStorage.getAttributeInternal(ViewRowStorage.java:1773)
         at oracle.jbo.server.ViewRowImpl.getAttributeValue(ViewRowImpl.java:1962)
         at oracle.jbo.server.ViewRowImpl.getAttributeInternal(ViewRowImpl.java:824)
         at oracle.jbo.server.ViewRowImpl.getKey(ViewRowImpl.java:635)
         at oracle.jbo.server.EntityImpl$ViewRowRef.<init>(EntityImpl.java:13229)
         at oracle.jbo.server.EntityImpl.registerExprValueSupplierOverride(EntityImpl.java:659)
         at oracle.jbo.server.ViewRowStorage.registerExprValueSupplierOverride(ViewRowStorage.java:1259)
         at oracle.jbo.server.ViewRowCache.addWithCheck(ViewRowCache.java:370)
         at oracle.jbo.server.ViewRowCache.add(ViewRowCache.java:410)
         at oracle.jbo.server.QueryCollection.addRowToColl(QueryCollection.java:3415)
         at oracle.jbo.server.QueryCollection.fetch(QueryCollection.java:3490)
         at oracle.jbo.server.QueryCollection.get(QueryCollection.java:2184)
         at oracle.jbo.server.ViewRowSetImpl.getRow(ViewRowSetImpl.java:5125)
         at oracle.jbo.server.ViewRowSetIteratorImpl.doFetch(ViewRowSetIteratorImpl.java:2936)
         at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2792)
         at oracle.jbo.server.ViewRowSetIteratorImpl.refresh(ViewRowSetIteratorImpl.java:3033)
         at oracle.jbo.server.ViewRowSetImpl.notifyRefresh(ViewRowSetImpl.java:2797)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:1255)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:1078)
         at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2775)
         at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2752)
         at oracle.jbo.server.ViewRowSetIteratorImpl.first(ViewRowSetIteratorImpl.java:1581)
         at oracle.jbo.server.ViewRowSetImpl.first(ViewRowSetImpl.java:3556)
         at oracle.jbo.server.ViewObjectImpl.first(ViewObjectImpl.java:10196)
         at oracle.adf.model.binding.DCIteratorBinding.setupRSIstate(DCIteratorBinding.java:808)
         at oracle.adf.model.binding.DCIteratorBinding.refreshControlAndNotifyDCE(DCIteratorBinding.java:707)
         at oracle.adf.model.binding.DCIteratorBinding.refreshControl(DCIteratorBinding.java:676)
         at oracle.jbo.uicli.binding.JUIteratorBinding.refreshControl(JUIteratorBinding.java:485)
         at oracle.adf.model.binding.DCIteratorBinding.refresh(DCIteratorBinding.java:4555)
         at oracle.adf.model.binding.DCExecutableBinding.refreshIfNeeded(DCExecutableBinding.java:347)
         at oracle.adf.model.binding.DCIteratorBinding.getRowSetIterator(DCIteratorBinding.java:1634)
         at oracle.jbo.jbotester.panel.BindingPanel.setBindingContext(BindingPanel.java:131)
         at oracle.jbo.jbotester.panel.BindingPanel.<init>(BindingPanel.java:101)
         at oracle.jbo.jbotester.panel.BindingPanel.<init>(BindingPanel.java:75)
         at oracle.jbo.jbotester.form.BindingForm.createMasterPanel(BindingForm.java:65)
         at oracle.jbo.jbotester.form.BindingForm.init(BindingForm.java:126)
         at oracle.jbo.jbotester.form.JTForm.<init>(JTForm.java:72)
         at oracle.jbo.jbotester.form.BindingForm.<init>(BindingForm.java:52)
         at oracle.jbo.jbotester.form.FormType$1.createForm(FormType.java:63)
         at oracle.jbo.jbotester.form.FormType.createForm(FormType.java:199)
         at oracle.jbo.jbotester.form.FormType.createTab(FormType.java:270)
         at oracle.jbo.jbotester.form.FormType.showForm(FormType.java:248)
         at oracle.jbo.jbotester.form.FormType.showForm(FormType.java:207)
         at oracle.jbo.jbotester.form.FormType.showForm(FormType.java:203)
         at oracle.jbo.jbotester.tree.ObjTreeNode.showForm(ObjTreeNode.java:135)
         at oracle.jbo.jbotester.tree.ObjTreeNode.showForm(ObjTreeNode.java:118)
         at oracle.jbo.jbotester.tree.Tree.processTreeMouseClicked(Tree.java:734)
         at oracle.jbo.jbotester.tree.Tree.access$100(Tree.java:96)
         at oracle.jbo.jbotester.tree.Tree$TreeMouseListener.mouseClicked(Tree.java:145)
         at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:253)
         at java.awt.Component.processMouseEvent(Component.java:6292)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
         at java.awt.Component.processEvent(Component.java:6054)
         at java.awt.Container.processEvent(Container.java:2041)
         at java.awt.Component.dispatchEventImpl(Component.java:4652)
         at java.awt.Container.dispatchEventImpl(Container.java:2099)
         at java.awt.Component.dispatchEvent(Component.java:4482)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4247)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
         at java.awt.Container.dispatchEventImpl(Container.java:2085)
         at java.awt.Window.dispatchEventImpl(Window.java:2478)
         at java.awt.Component.dispatchEvent(Component.java:4482)
         at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:644)
         at java.awt.EventQueue.access$000(EventQueue.java:85)
         at java.awt.EventQueue$1.run(EventQueue.java:603)
         at java.awt.EventQueue$1.run(EventQueue.java:601)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
         at java.awt.EventQueue$2.run(EventQueue.java:617)
         at java.awt.EventQueue$2.run(EventQueue.java:615)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:614)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    Edited by: ADFnewbie on 2012/01/12 1:44 AM

  • File upload, download using ADF UIX and not JSP

    I have examples for the file upload, download using JSP
    But I want to use ADF UIX. Look and feel in this is impressing and I want to use this. Any one have example for this.
    Users will select a file from their desktop
    This will be stored into the database (Any document. Word, Excel)
    When they query the records then the UIX column need to give a hyperlink. Clicking on the link should prompt to download the file to the local system

    Sure, I use the Apache Commons File Upload package, so that is what I will discuss here ( [Commons File Upload|http://commons.apache.org/fileupload/] ).
    The Commons File Upload uses instances of ProgressListener to receive upload progress status. So first create a simple class that implements ProgressListener:
    public class ProgressListenerImpl implements ProgressListener {
        private int percent = 0;
        public int getPercentComplete() {
            return percent;
        public void update(long pBytesRead, long pContentLength, int pItems) {
            if (pContentLength > -1) { //content length is known;
                percent = (new Long((pBytesRead / pContentLength) * 100)).intValue();
    }So in your Servlet that handles file upload you will need to create an instance of this ProgressListenerImpl, register it as a listener and store it in the session:
    ServletFileUpload upload = new ServletFileUpload();
    ProgressListenerImpl listener = new ProgressListenerImpl();
    upload.setProgressListener(listener);
    request.getSession().setAttribute("ProgressListener", listener);
    ...Now create another servlet that will retrieve the ProgressListenerImpl, get the percent complete and write it back (how you actually write it back is up to you, could be text, an XML file, a JSON object, up to you):
    ProgressListenerImpl listener = (ProgressListenerImpl) request.getSession().getAttribute("ProgressListener");
    response.getWriter().println("" + listener.getPercentComplete());
    ...Then your XMLHttpRequest object will call this second servlet and read the string returned as the percent complete.
    HTH

  • Uploading xml file using ADF UIX and storing in ordsys.orddoc field

    I am using ADF UIX and I am using the messageFileUpload tag to upload an XML file into the database (the file contains special characters like hyphens, apostrophes, $, etc). Once in the database I have a procedure which puts it into a clob field using the dbms_lob package. However, what exactly does ordsys.orddoc do with special characters? If I debug my procedure I see that 1 of 4 hyphens and 3 apostrophes have been turned into a character that looks like a square. Anyone know what is going on?

    It should pass binary information only, no conversion at all.
    The conversion is likely in messageFileUpload or the dbms_lob package you are using. Or you may need to tell DBMS_LOB the character set the XML file is in?
    You may want to upload the file using the interMedia tag library... Using uploadFormData?
    http://www.oracle.com/technology/software/products/intermedia/htdocs/descriptions/tag_library.html
    http://www.oracle.com/technology/products/intermedia/htdocs/jsptaglib/html/toc.htm
    Larry

  • Searching using a combination of MessageChoice & TextInput in ADF UIX  Page

    Hello,
    I'm trying to create a page in ADF UIX which implements search operation using a combination of "Message Choice" & "Text Input". I refered to the OTN How to's Document for "Building a list of Values (LOV) with ADF UIX". It's been mentioned in the document to create an LovInput component & when you do that an UIX page LovWindow0.uix is created by default along with two handler's "LovFilter" and "LovSelect".
    when I try to implement this concept in the simple UIX page with out creating a LOV Input field.... i.e; I tried to implement this concept by just using the List of values component.... I'm not able to associate a handler to the go button present in the default list of files component.
    Consider the scenario where I'm using the Departments View.. In the list I'm displaying the filter Choice & in the Text Input specifying the where condition...
    Can anyone please help me out on this...I'm new to this concept...
    Thanks & Regards,
    Arun
    Message was edited by:
    sam_1328

    Hi Sam,
    i think this link should have part of ur solution.
    http://www.oracle.com/technology/products/jdev/tips/shmeltzer/setwhereclause/uix.html
    There you need to make slight modifications to the codes so as to suite ur scenario of search(having a message choice to choose filter and a textinput for the search value)
    The new method that you add by reading the page can be modified.
    Origional method mentioned is
    public void setCondition (String p_cond)
    ViewObject empvo = findViewObject("EmployeesView1");
         //Creating a Where clause for the query
    String whereclause = "LAST_NAME like '%"+ p_cond +"%'";
    empvo.setWhereClause(whereclause);
    empvo.executeQuery();
    replace this with the new method
    public void setCondition (String p_filter,String p_value)
    ViewObject empvo = findViewObject("EmployeesView1");
         //Creating a Where clause for the query
    String whereclause = p_filter+" = "+p_value ;
    empvo.setWhereClause(whereclause);
    empvo.executeQuery();
    But if u have a filter which is suppposed to be charechter field den the code should be
    public final void setMoreConditions(String p_field, String p_value)
    ViewObject empvo = findViewObject("EmployeesView1");
    if (p_field.equalsIgnoreCase("last_name")||p_field.equalsIgnoreCase("first_name"))
    String whereclause = p_field+" LIKE '%"+p_value+"%'";
    empvo.setWhereClause(whereclause);
    else
    if (p_field.equalsIgnoreCase("manager_id")||p_field.equalsIgnoreCase("department_id") )
    String whereclause = p_field+" = '"+p_value+"'";
    empvo.setWhereClause(whereclause);
    else
    String whereclause = "";
    empvo.setWhereClause(whereclause);
    empvo.executeQuery();
    In the above code include all the charechter field names in the first if condition.
    I think that should solve ur purpose.
    Try it and let me know if ur having any problems.
    Regards,
    Vineet

  • Reset of current row after commit in ADF-UIX

    Dear experts,
    I have developed an application with Oracle JDeveloper 10g and ADF-UIX using BC4J. The problem is that wherenever a commit is performed the current row for the master table is reset which causes confusion for the end user.
    Do you know how can I solve that problem?
    Thank you in advance,
    Constantine

    ... I forgot to mention that I use JDeveloper 3.1 on Windows NT4.
    About my problem, it seems that a "key" does not exist in the record (Row object) i'm using for.
    So, what really is a "key"? Is this an internal complicated number or just the values of some data fields, indicated as "Primary Key" in the table?
    If the answer is the second one, I have to say that at the really before commit of the record, the value of my primary key fields is NULL, because they are filled up by a "sequence object" created in the database (triggered by a "TRIGGER BEFORE INSERT", which calls the "sequence.nextval" SQL command).
    So, I really have the value of my primary key fields just after committing the record in the database, and would explain everything.
    But is really this the "key"?
    Thanks

  • ADF UIX:  MessageChoice in a table. NavigationBar.

    Hi,
    I've got two problems with adf uix.
    I would like to have a drop-down list which presents the answers possible to each questions. (An answer is referancing a questions with two columns: quesNumero, and numerodep, sequenced in parent).
    I don't know why, but the visible answers are those of the first question.
    Here are the properties of the list binding editor:
    http://img81.imageshack.us/img81/5376/prob16rj.jpg
    Here's the source code of the list:
    <column>
    <columnHeader>
    </columnHeader>
    <contents>
    <messageChoice model="${bindings.current.Remarque3}">
    <contents childData="${bindings.Remarque3.displayData}">
    <option model="${uix.current}"/>
    </contents>
    </messageChoice>
    </contents>
    </column>
    Here the result:
    The answer is matching only the first question.
    How could I correct that?
    In addition, I would like to have all the recordings on a page. I would like that the table does not use a navigationBar. I have each time between ten and tewnty questions to post and I don't want that the user must change pages to see the last questions. How can I do that?
    http://img72.imageshack.us/img72/6851/prob31el.jpg
    Thanks a lot !
    Nicolas

    Nobody ?
    Message was edited by:
    user481143
    Message was edited by:
    user481143

  • JBoss 4.0.0RC1/3.2.3 - JDeveloper 10g - ADF UIX

    While I realize that JDeveloper has only been tested (to one degree or another) with JBoss 3.2.X, I decided to try and publish to JBoss 4.X after failing with 3.2.X. (The results are the same for either server version).
    I have a simple master-detail page off of which I have a create action on the detail section. The primary key is a DBSequence number that goes against a table with an insert trigger defined and a sequence for that field.
    The create action opens an input form for creating a new record. In the emdedded OC4J, everything works just fine. Depsite following the developer's review paper on deploying to both standalone OC4J and JBoss, it fails completely. Errors are different, but I thought I would start with JBoss since this equates to our development environment:
    When the create button is selected to initiate the action, the input form comes up but in the place where I would expect to see a temporary sequence value in the primary key field, the value is blank and the Execute button on this form does not activate. In addition, JBoss error log (both JBoss 3.2.3 and JBoss 4.0.0RC1 (and DR4)) displays the following (just showing a fragment):
    2004-07-28 10:37:34,315 ERROR [org.jboss.web.localhost.Engine] StandardContext[paros]null
    java.lang.ClassCastException
         at oracle.jbo.uicli.uix.PrimitiveTypes.getArray(PrimitiveTypes.java:122)
         at oracle.jbo.uicli.uix.JUCtrlAdaptValueBindingRef._adapt(JUCtrlAdaptValueBindingRef.java:106)
         at oracle.jbo.uicli.uix.JUCtrlAdaptValueBindingRef._adapt(JUCtrlAdaptValueBindingRef.java:96)
         at oracle.jbo.uicli.uix.JUCtrlAdaptValueBindingRef.access$4000071(JUCtrlAdaptValueBindingRef.java:40)
         at oracle.jbo.uicli.uix.JUCtrlAdaptValueBindingRef$CompositeModel.get(JUCtrlAdaptValueBindingRef.java:219)
         at org.apache.commons.el.ArraySuffix.evaluate(ArraySuffix.java:218)
         at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:145)
         at org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:263)
         at org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:190)
         at oracle.jsp.el.OracleExpressionEvaluator.evaluate(Unknown Source)
         at oracle.jsp.el.OracleExpression.evaluate(Unknown Source)
         at oracle.cabo.ui.expl.ELBoundValue._evaluate(Unknown Source)
         at oracle.cabo.ui.expl.ELBoundValue.getValue(Unknown Source)
         at oracle.cabo.ui.collection.DataObjectListNodeList.getDataObjectList(Unknown Source)
         at oracle.cabo.ui.collection.DataObjectListNodeList.size(Unknown Source)
         at oracle.cabo.ui.BaseUINode.getIndexedChildCount(Unknown Source)
         at oracle.cabo.ui.BaseRenderer.getVisibleIndexedChildCount(Unknown Source)
         at oracle.cabo.ui.laf.base.xhtml.ColumnRenderer._startRowMode(Unknown Source)
         at oracle.cabo.ui.laf.base.xhtml.ColumnRenderer.render(Unknown Source)
         at oracle.cabo.ui.BaseUINode.render(Unknown Source)
         at oracle.cabo.ui.BaseUINode.render(Unknown Source)
         at oracle.cabo.ui.BaseRenderer.renderChild(Unknown Source)
         at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
         at oracle.cabo.ui.laf.base.xhtml.ColumnGroupRenderer._renderVisibleIndexedChildren(Unknown Source)
         at oracle.cabo.ui.laf.base.xhtml.ColumnGroupRenderer.render(Unknown Source)
         at oracle.cabo.ui.BaseUINode.render(Unknown Source)
         at oracle.cabo.ui.BaseUINode.render(Unknown Source)
         at oracle.cabo.ui.BaseRenderer.renderChild(Unknown Source)
         at oracle.cabo.ui.BaseRenderer.renderIndexedChild(Unknown Source)
    Has anyone been at all successful using ADF-UIX from JDeveloper 10g and JBoss of any version? (Note I have followed the steps to install ADF Runtime, setvars, etc).
    Thanks
    Ray

    Yes. I have no problem with jdeveloper10g and jboss-3.2.3.
    Niether on my note with both linux, win, nor on production server with linux.
    Carefully look where do you install ADF Runtime (server defualt), and what server do you start (default is all). Simply change startup server to default or, copy jboss-3.2.3/server/default/deploy/bc4j.ear to jboss-3.2.3/server/all/deploy/

  • Demo: From ADF UIX to JSF

    Hello,
    I am new to most of this. I am running jdev 10.1.3 preview with EA12.
    While trying to run the demo described in the article "From ADF UIX to JSF"
    found at http://www.oracle.com/technology/oramag/oracle/04-nov/o64jsf.html I got the following errors.
    Project: C:\data\sample_home\MyADFFaces\ADFFacesView\ADFFacesView.jpr
    C:\data\sample_home\MyADFFaces\ADFFacesView\public_html\empTable.jspx
    Error: Internal error, ClassNotFound creating tag parser for afh:head, class: oracle.adfimpl.view.faces.taglib.html.HtmlHeadTag
    Error: Unable to find class for bean: null defined by tag with class: oracle.adfimpl.view.faces.taglib.html.HtmlHeadTag
    Error: head must be terminated with /> or %> not >
    Error: Internal error, ClassNotFound creating tag parser for af:form, class: oracle.adfimpl.view.faces.taglib.core.CoreFormTag
    Error: Unable to find class for bean: null defined by tag with class: oracle.adfimpl.view.faces.taglib.core.CoreFormTag
    Error: Internal error, ClassNotFound creating tag parser for af:table, class: oracle.adfimpl.view.faces.taglib.core.data.CoreTableTag
    Error: Unable to find class for bean: null defined by tag with class: oracle.adfimpl.view.faces.taglib.core.data.CoreTableTag
    Error: Internal error, ClassNotFound creating tag parser for af:tableSelectOne, class: oracle.adfimpl.view.faces.taglib.core.data.CoreTableSelectOneTag
    Error: Unable to find class for bean: null defined by tag with class: oracle.adfimpl.view.faces.taglib.core.data.CoreTableSelectOneTag
    Error: Internal error, ClassNotFound creating tag parser for af:commandButton, class: oracle.adfimpl.view.faces.taglib.core.nav.CoreCommandButtonTag
    Error: Unable to find class for bean: null defined by tag with class: oracle.adfimpl.view.faces.taglib.core.nav.CoreCommandButtonTag
    Here is a copy of the JSP page source that I created as I was following the text in the article
    Source starts
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="1.2"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:afh="http://xmlns.oracle.com/adf/faces/EA6/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/EA6">
    <jsp:text>
    <![CDATA[ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> ]]>
    </jsp:text>
    <jsp:directive.page contentType="text/html;charset=windows-1252"/>
    <f:view>
    <html>
    <afh:head>
    <meta http-equiv="Content-Type"
    content="text/html; charset=windows-1252"/>
    <title>
    empTable
    </title>
    </afh:head>
    <body>
    <af:form>
    <af:table value="#{myEmployees.employees}" var="row" rows="10">
    <f:facet name="selection">
    <af:tableSelectOne text="Select Employee and click ...">
    <af:commandButton text="Show" action="showDetails"/>
    </af:tableSelectOne>
    </f:facet>
    <af:column>
    <af:outputText value="#{row.first_name}"/>
    <f:facet name="header">
    <af:outputText value="Firstname"/>
    </f:facet>
    </af:column>
    <af:column>
    <af:outputText value="#{row.last_name}"/>
    <f:facet name="header">
    <af:outputText value="Lastname"/>
    </f:facet>
    </af:column>
    <af:column>
    <af:outputText value="#{row.email}"/>
    <f:facet name="header">
    <af:outputText value="Email"/>
    </f:facet>
    </af:column>
    </af:table>
    </af:form>
    </body>
    </html>
    </f:view>
    </jsp:root>
    ---source ends ---
    Can anyone tell me how to get past this? Thank you.
    -- Jack Condon

    One immediate thing: "EA6" is in the tag library namespaces, but you're using EA12.
    In general, there've been a lot of changes between EA6 and EA12, but the changed namespace is one simple thing.

  • ADF-UIX- How to populate multiple input fields from an lov?

    Like in Forms Developer where using an LOV we can populate multiple tex input items on selection of a value from the LOV, is it possible for us to do the same in ADF UIX.
    Iam usiing JDeveloper 10.1.2

    Have a look at this previous post:
    Re: Can return messageLovinput more than one value?

  • Display CLOB value in multiple rows in ADF UIX

    Hi,
    I have an ADF UIX application that uses data that are stored in a CLOB column in an Oracle Database.
    The table data is presented in a simple table in page1.uix, I use BC4J for accessing the Database and Oracle JDeveloper 9.0.5.2.
    The problem is that the CLOB data appear properly (meaning the rows appear OK) only in a frame (messageTextInput element) of a predefined size and if I change the element into a styledText or a formattedText the frame will not appear, but all the CLOB characters appear in a single row.
    Does anyone know how I can present the CLOB text data in a UIX page, without having a frame around the text, and at the same time keep the CLOB text in multiple rows?

    There's no completely trivial way. You'd have to do a bit of extra processing of your CLOB data. The most straightforward work to do is to convert "\n" into "<br>", and then pass that into a <formattedText>.

  • ADF UIX doSelect override with PL/SQL fails to allow insert

    I've been trying to create an ADF-UIX web app for simple insert/update/delete of records to a table.
    The schema simply has 2 tables - master and detail where the detail pk is made up of the master id and a start date:
    CREATE TABLE master (
    id NUMBER NOT NULL,
    name VARCHAR2 (10) NOT NULL,
    CONSTRAINT pk_master
    PRIMARY KEY ( id ));
    CREATE TABLE detail (
    id NUMBER NOT NULL,
    start_date DATE NOT NULL,
    name VARCHAR2 (10) NOT NULL,
    description VARCHAR2 (100),
    CONSTRAINT pk_detail
    PRIMARY KEY ( id, start_date ));
    ALTER TABLE detail ADD CONSTRAINT d_m_fk FOREIGN KEY (id) REFERENCES master(id)
    This works fine when I create it in a similar manner to that described in the "Complete ADF UIX Application ..." tutorial doc.
    http://www.oracle.com/technology/products/jdev/collateral/tutorials/9050/adfuix_tut.html
    I then tried to override the ADF doSelect and doDML methods as outlined in ADF_BC_StoredProcedures.zip example app allowing me to use PL/SQL stored pkg for dml.
    http://www.oracle.com/technology/sample_code/products/jdev/10g/ADF_BC_StoredProcedures.zip
    On trying to insert a new row my web app now fails with a null pointer exception when I press the Submit button. The app calls doSelect->handleStoredProcSelect which fails to get the value of a column.
    void handleStoredProcSelect() {
    CallableStatement st = null;
    try {
    String stmt = "BEGIN test_api.do_select(?,?,?,?,?); END;";
    DBTransaction tr = getDBTransaction();
    st = tr.createCallableStatement(stmt,1);
    ## This line works, I'm guessing because the value is populated from the master record I've selected in the form ...
    st.setLong(1,getTestId().longValue());
    ##FAILS HERE st.setDate(2,getStartDate().dateValue());
    Update,delete still work ok. And if I run the test app (right click on AppModule and select Test) all works ok.
    I'm not sure why doSelect is called on an insert so I commented out:
    doSelect
    handleStoredProcSelect
    handleStoredProcLock
    compareOldAttrTo
    Web App now lets me insert as expected.
    So finally ....my question is:
    Whilst the app now works does commenting out the doSelect leave me open to problems I haven't thought off
    and if not if you did want to use it how can you allow inserts?
    Any thoughts or similar experiences appreciated ...
    Cheers
    Ian

    I've been trying to create an ADF-UIX web app for simple insert/update/delete of records to a table.
    The schema simply has 2 tables - master and detail where the detail pk is made up of the master id and a start date:
    CREATE TABLE master (
    id NUMBER NOT NULL,
    name VARCHAR2 (10) NOT NULL,
    CONSTRAINT pk_master
    PRIMARY KEY ( id ));
    CREATE TABLE detail (
    id NUMBER NOT NULL,
    start_date DATE NOT NULL,
    name VARCHAR2 (10) NOT NULL,
    description VARCHAR2 (100),
    CONSTRAINT pk_detail
    PRIMARY KEY ( id, start_date ));
    ALTER TABLE detail ADD CONSTRAINT d_m_fk FOREIGN KEY (id) REFERENCES master(id)
    This works fine when I create it in a similar manner to that described in the "Complete ADF UIX Application ..." tutorial doc.
    http://www.oracle.com/technology/products/jdev/collateral/tutorials/9050/adfuix_tut.html
    I then tried to override the ADF doSelect and doDML methods as outlined in ADF_BC_StoredProcedures.zip example app allowing me to use PL/SQL stored pkg for dml.
    http://www.oracle.com/technology/sample_code/products/jdev/10g/ADF_BC_StoredProcedures.zip
    On trying to insert a new row my web app now fails with a null pointer exception when I press the Submit button. The app calls doSelect->handleStoredProcSelect which fails to get the value of a column.
    void handleStoredProcSelect() {
    CallableStatement st = null;
    try {
    String stmt = "BEGIN test_api.do_select(?,?,?,?,?); END;";
    DBTransaction tr = getDBTransaction();
    st = tr.createCallableStatement(stmt,1);
    ## This line works, I'm guessing because the value is populated from the master record I've selected in the form ...
    st.setLong(1,getTestId().longValue());
    ##FAILS HERE st.setDate(2,getStartDate().dateValue());
    Update,delete still work ok. And if I run the test app (right click on AppModule and select Test) all works ok.
    I'm not sure why doSelect is called on an insert so I commented out:
    doSelect
    handleStoredProcSelect
    handleStoredProcLock
    compareOldAttrTo
    Web App now lets me insert as expected.
    So finally ....my question is:
    Whilst the app now works does commenting out the doSelect leave me open to problems I haven't thought off
    and if not if you did want to use it how can you allow inserts?
    Any thoughts or similar experiences appreciated ...
    Cheers
    Ian

  • Populate Primary Key with DBSequence in ADF UIX page

    I have a table with a trigger, so that the primary key is populated by DBSequence. My problem is, I open a ADF UIX Input Page to create a row for my table. The field of the primary key is populated by any number but not with the logical sequence number. This number appears later, when I look at a row list. So the correct number is in the database but how can this already appear on my input page???

    You have to drop the trigger.
    Then make sure you have the Id field of your entity of type Sequence.
    Then go to your entity class and override the Create method.
      protected void create(AttributeList attributeList)
        super.create(attributeList);
        SequenceImpl s = new SequenceImpl("YOUR_DB_SEQUENCE_NAME", getDBTransaction());
        Number sVal = s.getSequenceNumber(); 
        setId(new DBSequence(sVal));

  • How to upload a file to a blob By ADF uix

    I need to add a file to a record as an accessory;
    I now use ADF-Uix?How do it?
    Someone can help me !
    Thanks

    The forum search would be my first try...
    Then google...
    This has been asked at least once a week and got correct answers...
    Timo

  • ADF UIX cancel/rollback button?

    Hi
    We're having a fair amount of trouble implementing a "cancel" button in our ADF UIX application (JDev 10.1.2). Apologies to those who read this same post on the ODTUG mailing list..... I'm hunting for even a hint of an answer before I approach Oracle Support.
    To set the scene, we have a parent VO "Departments" with child VOs "Dispatch" and "Agency". Dispatch also has a FK to Agency.
    We have a UIX view-screen that displays in a master-detail relationship Departments and Dispatch. From this screen the user can select the edit button, which navigates to an input-form screen to edit the currently selected Dispatch record.
    The Dispatch record has effective_from and effective_to dates. The underlying EO has a MethodValidator that ensures the from date <= the to date.
    On the edit screen we currently provide 2 buttons, Ok and Cancel. The Ok submitButton is bound to the commit binding, and navigates back to the view page via a struts link on completion.
    If the user selects the ok button and MethodValidator returns an error, the edit page's MessageBox displays the error and the user remains at the edit page until they resolve the issue.
    Our problems start with the cancel button.
    Originally we implemented the Cancel button as a simply "button" that navigated back to the view page. This worked well as the changes are never submitted, and on returning to the view page the record is presented in it's original state before being edited, thus the user's changes have been "cancelled".
    However if the user was editing an existing record, entered invalid dates that violated the MethodValidator, clicked ok and saw the MethodValidator error, then clicked cancel, on returning to the view page, any changes to the underlying record are visible including the invalid dates. I believe this occurs because the record has been submitted to the mid-tier by the ok button, and as such the changes now lies in the mid-tier.
    Given that a cancel "button" which simply navigates back to the view page is not a viable solution, we decided to investigate using a rollback button on our edit page, which then navigated back to the view page.
    There is a nasty side affect in using the rollback functionality, and has been a continuous frustration mentioned on OTN. When rollback is issued, it appears all iterators in the running application have their current row reset to the first element.
    This is a pain as in our example this results in not only the Dispatch iterator being reset to the first element, but also the parent Departments iterator, and presumably all other iterators in the application too. This would be an extreme annoyance to the user in every time they selected cancel, they would then need to navigate back to the correct Departments and Dispatch record if they wanted to make a different change.
    As such it is necessary to write some code to store the iterator positions before issuing the rollback, rolling-back, then restoring the iterator positions from the saved states.
    Luckily we found some code on OTN to do this:
    ADF - cancel button not working in input form(add new row)?
    This mechanism appeared to work, but, then, we did find one problem.
    I described at the beginning that our Dispatch VO is not only related to Departments but also Agency. To cater for this in our edit screen by including a LOV bound <messageList>, which displayed the relating Agencies for the user to select from.
    In using the pinched OTN rollback code, in the same scenario as previously, when the user edits a record, invalidates the MethodValidator after clicking ok, then clicks cancel, on returning to the view page, the field in Dispatch that represents the Agency is incorrectly showing a numeric result such as 0, 1, 2 etc. We realised that the value being shown is the previous edit screen's <messageList> internal index number representing the value selected in the list, and not the actual value itself.
    We're note sure why the OTN rollback code is causing this to occur. Though it restores the Agency iterator's position, it shouldn't result in the <messageList> index being written to the underlying Dispatch agency field, but rather the value the <messageList> index represents.
    It appears to me we're caught between a "rock and a hard-place" here. The simple solution of using a cancel "button" doesn't work when errors are raised. The complex case of using a "rollback" button doesn't work due to the problem with the <messageLists>.
    My research on OTN shows the "cancel vs rollback" button is a common frustration. Can somebody help me in providing a satisfactory "cancel" button that I can use throughout my app please?
    Many thanks in advance.
    Chris Muir

    The stack:
    Class                     Method
    UsrEcvAmpdsViewRowImpl    setAgency
    UsrEcvAmpdsViewRowImpl    setAttrInvokeAccessor
    ViewRowImpl               setAttribute
    DCDataControl             setAttributeInRow
    DCJboDataControl          setAttributeInRow
    JUCtrlValueBinding        setAttributeInRow
    JUCtrlValueBinding        setInputValue
    JUCtrlValueBinding        setInputValue
    InitModelListener         _setInputValue
    InitModelListener         _doModelUpdate
    InitModelListener         eventStarted
    AbstractPageBroker        _fireUIXRequestEvent
    AbstractPageBroker        handleRequest
    BaseUIPageBroker          handleRequest
    PageBrokerHandler         handleRequest
    UIXServlet                doGet
    HttpServlet               service
    HttpServlet               service
    ResourceFilterChain       doFilter
    JAZNFilter                doFilter
    ServletRequestDispatcher  invoke
    ServletRequestDispatcher  forwardInternal
    ServletRequestDispatcher  forward
    RequestProcessor          doForward
    RequestProcessor          processForwardConfig
    RequestProcessor          process
    ActionServlet             process
    ActionServlet             doGet
    HttpServlet               service
    HttpServlet               service
    ResourceFilterChain       doFilter
    JAZNFilter                doFilter
    ServletRequestDispatcher  invoke
    ServletRequestDispatcher  forwardInternal
    ServletRequestDispatcher  forward
    RequestProcessor          doForward
    RequestProcessor          processForwardConfig
    RequestProcessor          process
    ActionServlet             process
    ActionServlet             doGet
    HttpServlet               service
    HttpServlet               service
    ResourceFilterChain       doFilter
    JAZNFilter                doFilter
    EvermindFilterChain       doFilter
    ADFBindingFilter          doFilter
    ServletRequestDispatcher  invoke
    ServletRequestDispatcher  forwardInternal
    HttpRequestHandler        processRequest
    HttpRequestHandler        run
    HttpRequestHandler        run
    ReleasableResourcePooledExecutor$MyWorker run
    Thread  runAt a wild guess, InitModelListener is causing the issue, because it's the first place where we can see a setInputValue occuring?
    To make this official I've raised a TAR (4613003.992) with Oracle Support with a cut down version of our app to work through the issue.

Maybe you are looking for

  • Photo booth problems

    I just recently had my logic board replaced bc my battery wasn't getting recognized and wouldn't charge...the battery issue is fixed now but i tried using photobooth and a blank green screen just comes up with no picture...any ideas what this problem

  • Running another OS on same computer

    Dear All I have a G4 mac mini with OS 10.4.2 (ibook in for repairs) and a LaCie external hard drive. I have a digital camera that only works on OS 10.2 - 10.3.9. I want to be able to download the images onto the Mini or hard drive. What can I do? My

  • HAL 9.2 and Essbase 9.3.1

    Can anyone tell me how to configure HAL 9.2 Essbase Adapter to work with Essbase 9.3.1. Thanks!

  • How to identify which ALV triggered event in split ALV

    Hi all, I'm using a split ALV like this: CREATE OBJECT ob_custom   EXPORTING     container_name = 'CONTAINER'. CREATE OBJECT ob_split1   EXPORTING     parent      = ob_custom     orientation = cl_gui_easy_splitter_container=>orientation_vertical. CRE

  • Can't change home screen background

    I have downloaded and installed iOS 4 software and have an iPhone 3G. When I try to select a picture to save as wallpaper it doesn't give the option to set it as my home screen background. Is this feature not available for iPhone 3G? If it is availab