ADF create form problem

Hello forum, I know - I am back again. But I am having all kinds of issues developing this ADF BC create form. Given the following scenario, can somebody please explain how he/she would set out to create the following ADF create form?
You a have a db entity call it table with fields1 through 10. During any create transaction, one of field1 or field2 or field3 must be present together with field4 through 10. That is, field1 can be entered along with fields 4 to 10 or field2 can be entered together with fields 4 to 10 or field3 and fields 4 - 10. Field10 can have four exclusive choices (say a, b, c, d) and should default to d (radio button). Field3 should store the name of an uploaded file. At no time can fields 1, 2 and 3 be entered. It is either one or the other.
Here's how I set out to develop this and have been running into all sorts of problems from Row inconsistency issues to 500 Internal errors. I created an unbound select one Radio component with three choices to display either field1 or field2 or field3 depending upon the radio button selected. I used the switcher facet to hide fields 1 and 2, show field 3 if radio button 3 was selected. So whenever radio button 1 was selected, field1 would be displayed, then fields 2 and 3 will be hidden. Initially, I used regular input components to display fields 1 to 3 and then try to map them back to the database but couldn't figure out how to do this. I then followed John's suggestion to use transient entity attributes. I did this but still couldn't figure out how to access their values so I could set the relevant db columns accordingly.
Because of the way this requirement is, I had to drag and drop field1, 2, and 3 in three different single drag and drop operations, then drag and drop the entire collection with the option to include the submit button, delete fields 1 through 3 in another operation. This created 2 different iterators in the pageDef file. I am not an expert yet on ADF but maybe this might be part of my problems. Trying to use two different iterators to insert into a single table during a single DML operation. But then again both iterators are bound to the same entity. I am not sure anymore.
Is anybody kind enough to take a look at what I have so far? John? Frank? Steve? Anybody? I am trying to make that switch from oracle forms to ADF. This is actually my first ADF form and so far it has been very frustrating. I really need help on this guys!!
Thanks

Thanks for the suggestion Frank! Just so I understand you, the ADF Faces text component that I am adding would be in addition to the radio select one component? Then if you click on radio button 1, enter data in the text field, that action should bind it to field1 and similarly for the other fields when radio button 2 or 3 is clicked? In this case I am assuming that I do not have to display the actual db fields1 - 3 on the form?
This would be fine for fields1 and 2 (though field2 would require one to enter a substantial amount of text - on average a 1000 characters as opposed to field1 that has a maximum length of 40 characters). Field3 however is different because it should be an inputFile component in order to download OS files and store in the database. Thus the ADF Faces text component might not be able to handle this without substantial additional java code.
Thanks again for your suggestions. I really appreciate it!

Similar Messages

  • Oracle ADF 11g – Authentication using Custom ADF Login Form Problem

    Hi Guys,
    I am trying to Authenticate my adf application using custom Login Form.
    following this..
    http://www.fireboxtraining.com/blog/2012/02/09/oracle-adf-11g-authentication-using-custom-adf-login-form/#respond
    But my Login Page is not Loading.I think its sending request in chain.my jdev version is 11.1.1.5.Any Idea.
    Thanks,
    Raul

    Hi Frank,
    I deleted bounded code and In another Unit Test I created a simple login.jspx page and applied form based authentication but still facing same problem means something wrong in starting.
    My login.jspx page is
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:h="http://java.sun.com/jsf/html"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
      <jsp:directive.page contentType="text/html;charset=UTF-8"/>
      <f:view>
        <af:document id="d1" >
          <af:form id="f1" >
            <af:panelFormLayout id="pfl1">       
              <af:inputText label="USERNAME" id="it1"
                            />       
              <af:inputText label="PASSWORD" id="it2"
                              />
              <af:commandButton text="LOG IN" id="cb1" />
              <f:facet name="footer">       
              </f:facet>                 
            </af:panelFormLayout>
          </af:form>
        </af:document>
      </f:view>
    </jsp:root>
    Don't know wht real problem is

  • ADF create form : change value fields

    Hi all,
    I have a create form:
    first problem
    one field is an ID known by my backing bean
    <af:form>
            <af:panelFormLayout>
              <af:inputText value="#{bindings.Mpr.inputValue}"
                            label="#{bindings.Mpr.hints.label}"
                            required="#{bindings.Mpr.hints.mandatory}"
                            columns="150"
                            maximumLength="#{bindings.Mpr.hints.precision}"                       
                            shortDesc="#{bindings.Mpr.hints.tooltip}"
                            clientComponent="true">
                <f:validator binding="#{bindings.Mpr.validator}"/>
                <af:convertNumber groupingUsed="false" pattern="#{bindings.Mpr.format}"/>
                <af:clientListener method="getMpr" type="mouseOver"/>
                <af:serverListener method="#{backing_main.remplirChampMprCreerNote}" type="seekMPR"/>
              </af:inputText>I would like that when my page appears this value field *#{bindings.Mpr.inputValue}* be filled by this one *#{backing_bean.myID}* .
    second problem
    I have 3 richTextEditor who provide auto-completion (If you type ADF and then *<ctrl+space>*, ADF would be replaced by Application Developpement Framework thanks to a bean)
    It works outside a create form . Inside a create form the problem is when calling my bean I have a validator alert who say "you must enter a value" and my Component's value is reseted..
    Does someone knows these problems ?
    Thanks,
    valéry.

    Hello simply,
    I have an af:form generated by a viewObject's drag and drop, the automatically generated code use bindings, I just replace 3 af:inputText by 3 af:richTextEditors and I add the listeners for <ctrl+space> event.
    here is the JSF page :
        <f:view>
        <af:document title="une note au dossier médical">
        <af:messages/>
                            <f:verbatim>
                <![CDATA[       
                <script language="javascript" type="text/javascript">
                var comp;
                var target;
                var prevKey;
                var curKey=0;
                function wysiwygKeyPress(event) {
                    prevKey = curKey;               
                    curKey = event.keyCode;
                    var wysiwygValue="";
                    if(prevKey==17 && curKey==32)   // CTRL + espace
                        var richTextEditor = comp; //wysiwygmode
                        if (target.contentWindow.document.attachEvent){   //IE specific
                             if(target.contentWindow.document.body.firstChild.innerHTML)
                                wysiwygValue = target.contentWindow.document.body.firstChild.innerHTML;
                             else
                                 wysiwygValue = target.contentWindow.document.body.innerHTML;
                          else {     //FF specific
                             wysiwygValue = target.contentDocument.body.firstChild.textContent;
                        AdfCustomEvent.queue(comp, "customEvent",{value1:wysiwygValue}, true);
                function rteMouseOver(event) {
                    comp = event.getSource(); //helper function
                    target = event._target;
                    //IE could not find the event._target
                    var clientId = comp.getClientId()  + "::cont";
                    var iframe = document.getElementById(clientId);
                    if (iframe.contentWindow.document.attachEvent) { //IE
                       target = iframe;
                       //IE uses attachEvent
                       iframe.contentWindow.document.attachEvent('onkeydown', function() { wysiwygKeyPress(iframe.contentWindow.event); });
                    else {
                    //FF uses addEventListener
                      iframe.contentWindow.addEventListener('keydown',wysiwygKeyPress, true);
                </script>
                ]]>
            </f:verbatim>
          <af:form>
            <af:panelFormLayout>
              <af:inputText value="#{bindings.Mpr.inputValue}"
                            label="#{bindings.Mpr.hints.label}"
                            required="#{bindings.Mpr.hints.mandatory}"
                            columns="150"
                            maximumLength="#{bindings.Mpr.hints.precision}"                       
                            shortDesc="#{bindings.Mpr.hints.tooltip}"
                            clientComponent="true"
                            >
                <f:validator binding="#{bindings.Mpr.validator}"/>
                <af:convertNumber groupingUsed="false" pattern="#{bindings.Mpr.format}"/>
              </af:inputText>
              <af:inputText value="#{bindings.Commentaire.inputValue}"
                            label="#{bindings.Commentaire.hints.label}"
                            required="#{bindings.Commentaire.hints.mandatory}"
                            columns="150"
                            maximumLength="#{bindings.Commentaire.hints.precision}"
                            shortDesc="#{bindings.Commentaire.hints.tooltip}"
                            >
                <f:validator binding="#{bindings.Commentaire.validator}"/>
              </af:inputText>
              <af:spacer width="19" height="17"/>
              <af:richTextEditor value="#{bindings.Observation.inputValue}"
                                 label="#{bindings.Observation.hints.label}"
                                 required="#{bindings.Observation.hints.mandatory}"
                                 columns="150"
                                 shortDesc="#{bindings.Observation.hints.tooltip}"
                                 clientComponent="true">
                    <af:clientListener type="mouseOver" method="rteMouseOver"/>
                    <af:serverListener type="customEvent" method="#{backing_main.ctrlSpaceHandler}"/>
              </af:richTextEditor>
              <af:spacer width="15" height="22"/>
              <af:richTextEditor value="#{bindings.Traitement.inputValue}"
                                 label="#{bindings.Traitement.hints.label}"
                                 required="#{bindings.Traitement.hints.mandatory}"
                                 columns="150"
                                 shortDesc="#{bindings.Traitement.hints.tooltip}"
                                 clientComponent="true">
                    <af:clientListener type="mouseOver" method="rteMouseOver"/>
                    <af:serverListener type="customEvent" method="#{backing_main.ctrlSpaceHandler}"/>
              </af:richTextEditor>                            
              <af:spacer width="17" height="18"/>
              <af:richTextEditor value="#{bindings.Conclusion.inputValue}"
                                 label="#{bindings.Conclusion.hints.label}"
                                 required="#{bindings.Conclusion.hints.mandatory}"
                                 columns="150"
                                 shortDesc="#{bindings.Conclusion.hints.tooltip}"
                                 clientComponent="true">
                    <af:clientListener type="mouseOver" method="rteMouseOver"/>
                    <af:serverListener type="customEvent" method="#{backing_main.ctrlSpaceHandler}"/>
            </af:richTextEditor>                            
            </af:panelFormLayout>
            <af:commandButton text="Sauvegarder la note"
                              action="#{backing_main.creerNote}"/>
          </af:form>
        </af:document>
      </f:view>A pageDef file is automatically created :
    <pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel"
                    version="11.1.1.52.5" id="ajoutNote3PageDef"
                    Package="viewcontroller.pageDefs">
      <parameters/>
      <executables>
        <iterator Binds="TmpnoteView1" RangeSize="25"
                  DataControl="AppModuleDataControl" id="TmpnoteView1Iterator"/>
        <invokeAction Binds="Create" id="invokeCreate" Refresh="prepareModel"
                      RefreshCondition="${!adfFacesContext.postback and empty bindings.exceptionsList}"/>             
      </executables>
      <bindings>
        <attributeValues IterBinding="TmpnoteView1Iterator" id="Mpr">
          <AttrNames>
            <Item Value="Mpr"/>
          </AttrNames>
        </attributeValues>
        <attributeValues IterBinding="TmpnoteView1Iterator" id="Observation">
          <AttrNames>
            <Item Value="Observation"/>
          </AttrNames>
        </attributeValues>
        <attributeValues IterBinding="TmpnoteView1Iterator" id="Traitement">
          <AttrNames>
            <Item Value="Traitement"/>
          </AttrNames>
        </attributeValues>
        <attributeValues IterBinding="TmpnoteView1Iterator" id="Conclusion">
          <AttrNames>
            <Item Value="Conclusion"/>
          </AttrNames>
        </attributeValues>
        <attributeValues IterBinding="TmpnoteView1Iterator" id="Commentaire">
          <AttrNames>
            <Item Value="Commentaire"/>
          </AttrNames>
        </attributeValues>
        <action IterBinding="TmpnoteView1Iterator" id="Create"
                RequiresUpdateModel="true" Action="createRow"/>
        <action id="Commit" RequiresUpdateModel="true" Action="commitTransaction"
                DataControl="AppModuleDataControl"/>
      </bindings>
    </pageDefinition>I add to this form a create button and a commit button, you could see it in the pageDef :
    <action IterBinding="TmpnoteView1Iterator" id="Create"
                RequiresUpdateModel="true" Action="createRow"/>
    <action id="Commit" RequiresUpdateModel="true" Action="commitTransaction"
                DataControl="AppModuleDataControl"/>I call these actions in the bean creerNote called by my submit buton:
    public String creerNote() throws IOException {
            // --- modify fields to remove some html tags --- //
            // --- 1. get EL context --- //
            FacesContext facesContext = FacesContext.getCurrentInstance();
            Application app = facesContext.getApplication();
            ExpressionFactory elFactory = app.getExpressionFactory();
            ELContext elContext = facesContext.getELContext();
            // --- 2. get ExpressionValues --- //
            ValueExpression valueExpObserv = elFactory.createValueExpression(elContext, "#{bindings.Observation.inputValue}", String.class);
            ValueExpression valueExpConcl = elFactory.createValueExpression(elContext, "#{bindings.Traitement.inputValue}", String.class);
            ValueExpression valueExpTrait = elFactory.createValueExpression(elContext, "#{bindings.Conclusion.inputValue}", String.class);
            // --- 3. get String values --- //
            String texteObserv = (String)valueExpObserv.getValue(elContext);
            String texteConcl = (String)valueExpConcl.getValue(elContext);
            String texteTrait = (String)valueExpTrait.getValue(elContext);
            // --- 4. remove some html tags --- //
            texteObserv = texteObserv.replaceAll("<p>","");
            texteObserv = texteObserv.replaceAll("</p>","");
            System.out.println("[Main.java] CreerNote > observations après traitement : "+texteObserv);
            texteConcl = texteConcl.replaceAll("<p>","");
            texteConcl = texteConcl.replaceAll("</p>","");
            System.out.println("[Main.java] CreerNote > conclusions après traitement : "+texteConcl);
            texteTrait = texteTrait.replaceAll("<p>","");
            texteTrait = texteTrait.replaceAll("</p>","");
            System.out.println("[Main.java] CreerNote > traitements après traitement : "+texteTrait);
            // --- set new values --- //
            valueExpObserv.setValue(elContext, texteObserv);
            valueExpConcl.setValue(elContext, texteConcl);
            valueExpTrait.setValue(elContext, texteTrait);       
            // --- set mpr field --- //
            ValueExpression valueExpMPR = elFactory.createValueExpression(elContext, "#{bindings.Mpr.inputValue}", String.class);
            valueExpMPR.setValue(elContext, getMprSelected());
            // --- call the create pageDef's action --- //
            bindings = getBindings();
             OperationBinding operationBinding = bindings.getOperationBinding("Create");
             operationBinding.execute();    
            // --- call the commit pageDef's action --- //
            bindings = getBindings();
            operationBinding = bindings.getOperationBinding("Commit");
            operationBinding.execute();       
            return "Abrev";
    }As you know, If I type <ctrl+space> I call the method ctrlspaceHandler who change the value of the component.
    public void ctrlSpaceHandler(ClientEvent clientEvent) {
            // --- get applicationModule --- //
            if(am==null)
               setAm();
            // --- get myViewObject --- //
            ViewObjectImpl mesAbrev = am.getThesaurusVO1();
            ViewCriteria vc =  mesAbrev.createViewCriteria();
            ViewCriteriaRow vcRow = vc.createViewCriteriaRow();
            // --- get richTextEditor's last word without html tags--- //
            RichTextEditor rte = (RichTextEditor) clientEvent.getComponent();
            String texte = (String)clientEvent.getParameters().get("value1");
            System.out.println("[Main.java] ctrlSpaceHandler > valeur du rte via rte.getParameter: "+texte);
            int indiceDernierMot = texte.lastIndexOf(" ");
            indiceDernierMot++;
            String abr = texte.substring(indiceDernierMot).toUpperCase();
            abr = abr.replaceAll("<BR/>",""); abr = abr.replaceAll("<br>","");
            abr = abr.replaceAll("</P>",""); abr = abr.replaceAll("</p>","");
            abr = abr.replaceAll("</FONT>",""); abr = abr.replaceAll("</font>","");
            abr = abr.replaceAll("</SPAN>",""); abr = abr.replaceAll("</span>","");                                           
            System.out.println("[Main.java] ctrlSpaceHandler > abréviation recherchée : "+abr);
            // --- add a criteria to my viewObject --- //
            vcRow.setAttribute("Msgcourt", "like '"+abr+"'");
            vc.addElement(vcRow);
            mesAbrev.applyViewCriteria(vc);
            // --- seek the abbreviation --- //
            mesAbrev.executeQuery();
            // --- get row found --- //
            Row row = null;
            while(mesAbrev.hasNext())
                row = mesAbrev.next();
                System.out.println("[Main.java] ctrlSpaceHandler > ligne trouvée : "
                               +row.getAttribute("Spr") +" - "
                               +row.getAttribute("Msgcourt")+" - "
                               +row.getAttribute("Msglong"));
            // --- if found --- //
            if(row!=null)
                // --- get abbreviation's detail --- //
                String detail = (String)row.getAttribute("Msglong");       
                System.out.println("[Main.java] ctrlSpaceHandler > message long = "+detail);
                // --- replace abbreviation by detail in the text and update graphical component --- //
                texte = texte.replaceAll(abr.toLowerCase(), detail);
                texte = texte.replaceAll(abr.toUpperCase(), detail);
                rte.setValue(texte);
                RequestContext.getCurrentInstance().addPartialTarget(rte);
    }When debug I see all my method bean works fine.
    But as result on the form I have a message who say "first enter value", I can bypass this problem if I remove all richTextEditor's required attributes. Biggest problem is that my richText component is cleared after ctrl+space... My test with a richTextEditor bind to a bean was OK, the only difference here is my richTextComponents uses bindings with pageDef.
    Thank you,
    Valéry

  • ADF Create Form - will compensate

    I figured in as much as I am willing to learn and transition to ADF, I am not going to waste any more time on this create form. I am not sure if this is the right forum for this, but I am willing to compensate somebody who's willing to develop something that's working. It's a simple create form guys and I know that a lot of folks on this panel can nail it down in 30 mins or so. But I am not there - yet!
    If you are interested in further details please email me at [email protected] and I will provide you with the specs.
    P.S. Please guys keep in mind that this is a personal effort so it's nothing big. But its going to be worth your 30 mins or 1hr that's going to take you to develop the form.
    Thanks

    Nyanga,
    I was looking at your other post today regarding a create form. I think I may have something that is similar to what you are trying to do; before posting, let me explain what my JSF does, and you can comment.
    I have a JSF that is used to insert/update information in a single database table. Based upon one of the fields, let's call it field1 - other fields are displayed/cleared. For example, if field1 = "A" the user sees fields 2, 3, and 4, and fields 5, 6, and 7 are hidden (and internally set to null in the database record). Conversely, if field1 = "B" the user sees fields 5, 6, and 7, and fields 2, 3, and 4 are hidden (and internally set to null in the database record).
    Is this similar to your use case? If so, I can post a blog entry about it - it's really not to difficult.
    John

  • Nextensio create form problem

    I am using the nextensio create form and I am trying to pull menus from two other databases.
    <br />
    <br />I have a column titled schedule_location that is pulling data from table Location to create pull down menu.
    <br />
    <br />I also have a column titled schedule_employee that is pulling data from table Employees to create a pull down menu.
    <br />
    <br />Both tables are pulling the column ID not the column name. How do I fix this. Here is the code.
    <br />
    <br /><%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
    <br />
    <!--#include file="Connections/MHO.asp" -->
    <br />
    <!--#include file="includes/common/KT_common.asp" -->
    <br />
    <!--#include file="includes/nxt/KT_back.asp" -->
    <br />
    <!--#include file="includes/tNG/tNG.inc.asp" -->
    <br /><%<br />'Make a transaction dispatcher instance<br />Dim tNGs: Set tNGs = new tNG_dispatcher<br />tNGs.Init ""<br />%>
    <br /><%<br />' Start trigger<br />Dim formValidation: Set formValidation = new tNG_FormValidation<br />formValidation.Init<br />formValidation.addField "Sched_Date", true, "date", "", "", "", ""<br />formValidation.addField "Sched_Employee", true, "text", "", "", "", ""<br />formValidation.addField "Sched_Location", true, "text", "", "", "", ""<br />tNGs.prepareValidation formValidation<br />' End trigger<br />%>
    <br /><%<br />Dim rsEmployee<br />Dim rsEmployee_numRows<br /><br />Set rsEmployee = Server.CreateObject("ADODB.Recordset")<br />rsEmployee.ActiveConnection = MM_MHO_STRING<br />rsEmployee.Source = "SELECT *  FROM dbo.Employee"<br />rsEmployee.CursorType = 0<br />rsEmployee.CursorLocation = 2<br />rsEmployee.LockType = 1<br />rsEmployee.Open()<br /><br />rsEmployee_numRows = 0<br />%>
    <br /><%<br />Dim rsLocation<br />Dim rsLocation_numRows<br /><br />Set rsLocation = Server.CreateObject("ADODB.Recordset")<br />rsLocation.ActiveConnection = MM_MHO_STRING<br />rsLocation.Source = "SELECT *  FROM dbo.Location"<br />rsLocation.CursorType = 0<br />rsLocation.CursorLocation = 2<br />rsLocation.LockType = 1<br />rsLocation.Open()<br /><br />rsLocation_numRows = 0<br />%>
    <br /><%<br />Dim Repeat1__numRows<br />Dim Repeat1__index<br /><br />Repeat1__numRows = -1<br />Repeat1__index = 0<br />rsSchedule_numRows = rsSchedule_numRows + Repeat1__numRows<br />%>
    <br /><%<br />' Make an insert transaction instance <br />Dim ins_Schedule: Set ins_Schedule = new tNG_multipleInsert<br />ins_Schedule.init MM_MHO_STRING<br />tNGs.addTransaction ins_Schedule<br />' Register triggers<br />ins_Schedule.registerTrigger Array("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Insert1")<br />ins_Schedule.registerTrigger Array("BEFORE", "Trigger_Default_FormValidation", 10, formValidation)<br />ins_Schedule.registerTrigger Array("END", "Trigger_Default_Redirect", 99, "includes/nxt/back.asp")<br />' Add columns<br />ins_Schedule.setTable "Schedule"<br />ins_Schedule.addColumn "Sched_Date", "DATE_TYPE", "POST", "Sched_Date", ""<br />ins_Schedule.addColumn "Sched_Employee", "STRING_TYPE", "POST", "Sched_Employee", ""<br />ins_Schedule.addColumn "Sched_Location", "STRING_TYPE", "POST", "Sched_Location", ""<br />ins_Schedule.setPrimaryKey "Sched_ID", "NUMERIC_TYPE", "", ""<br />%>
    <br /><%<br />' Make an update transaction instance<br />Dim upd_Schedule: Set upd_Schedule = new tNG_multipleUpdate<br />upd_Schedule.init MM_MHO_STRING<br />tNGs.addTransaction upd_Schedule<br />' Register triggers<br />upd_Schedule.registerTrigger Array("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Update1")<br />upd_Schedule.registerTrigger Array("BEFORE", "Trigger_Default_FormValidation", 10, formValidation)<br />upd_Schedule.registerTrigger Array("END", "Trigger_Default_Redirect", 99, "includes/nxt/back.asp")<br />' Add columns<br />upd_Schedule.setTable "Schedule"<br />upd_Schedule.addColumn "Sched_Date", "DATE_TYPE", "POST", "Sched_Date"<br />upd_Schedule.addColumn "Sched_Employee", "STRING_TYPE", "POST", "Sched_Employee"<br />upd_Schedule.addColumn "Sched_Location", "STRING_TYPE", "POST", "Sched_Location"<br />upd_Schedule.setPrimaryKey "Sched_ID", "NUMERIC_TYPE", "GET", "Sched_ID"<br />%>
    <br />

    Thanks for the suggestion Frank! Just so I understand you, the ADF Faces text component that I am adding would be in addition to the radio select one component? Then if you click on radio button 1, enter data in the text field, that action should bind it to field1 and similarly for the other fields when radio button 2 or 3 is clicked? In this case I am assuming that I do not have to display the actual db fields1 - 3 on the form?
    This would be fine for fields1 and 2 (though field2 would require one to enter a substantial amount of text - on average a 1000 characters as opposed to field1 that has a maximum length of 40 characters). Field3 however is different because it should be an inputFile component in order to download OS files and store in the database. Thus the ADF Faces text component might not be able to handle this without substantial additional java code.
    Thanks again for your suggestions. I really appreciate it!

  • ADF Create form : Invalid owner exception

    hi
    i hve a master details form
    i hve to insert in to three more tables
    i created Eo's and Vo's for each and the association and links were created accordingly
    i want this form as a single page
    ie
    now i have to treat every view object as seperate one in the page
    i need to keep one create button for each view object to initialize the create page
    i tried to do with invoke action in executables
    now i am getting an error while initing the second create form
    *oracle.jbo.InvalidOwnerException: JBO-25030: Failed to find or invalidate owning entity: detail entity EO_ActivityDt, row key oracle.jbo.Key[-7 ].*
    is it possible prepare a create form from multiple table together with single create action
    pls advice
    thanks

    try chaging the pre-allocation size value (toplink map->Database Info tab->Sequencing).
    If you are using Oracle db, also make sure that you database sequence increment and TopLink sequence preallocation sizes are the same.
    For more info refer to http://www.oracle.com/technology/products/ias/toplink/doc/1013/main/_html/prjdaun007.htm
    Re: Toplink Sequence - Preallocation in Oracle
    Hope this helps,
    Anuj

  • ADF Create form

    hai ,
    i have one master detials form . i hve to insert in to three tables say cutomer master , customer personal details , Customer contact
    i have created entities ,associations and view objects , View Links for 3 tables and added to app module
    I just drag n drop the view objects to create a form
    Here i need to call *3 Create methods* of each View Objects to to init the create form
    and while Saving it shows error for customerid  in Cusomer Personal Details Table which should be inserted from the customer master table using View link /Association
    Pls advice

    hi timo
    i hve created as follows ,
    Created Eo's for 3 Tables n then Associations were created automaticaly with reference to Forign key constraints
    and Created the VO's for each n View Liks are created based on associations
    and added to app module
    i drag n drop the three VO's to create master form say vo1,vo2,vo3
    for each vo it have its own create method
    Now i tried
    1)
    with 3 create buttons
    ie i should click Create button 1 to init the fiirst table attribute n second button to init the second table attr n so on
    its working
    2)
    i hve added those three create method to page def executables its showing error for row key
    3)
    i tried with 1 backing bean and call the three create methods in the button action
    its showing error like
    oracle.jbo.InvalidOwnerException: JBO-25030: Failed to find or invalidate owning entity: detail entity EO_ActivityDt, row key null.
    *" Failed to find or invalidate owning entity: detail entity EO_ActivityDt, row key null.*
    *Failed to find or invalidate owning entity: detail entity EO_CorrespondenceHd, row key null. "*
    pls advice
    thanks

  • Primary key in adf create form

    Hi,
    I want to insert data to a table which has primary key. I have created a sequnece wich produces the uniq key number and trigger for before insert wich puts the number.
    Even I have trigger , when I commit a create form (I have drop create form on jsf page from datacontrol palette and put a commit button ) I get an error which says that this field is required. Is there something I missed??Anyone who has an idea??
    Please I need any kind o fhelp...
    Thank you very very much in advance
    Regards

    Thanks a lot, it worked. But it doesnt work if I have mandatory columns.Even I put some values when I commit I get the message that the value of this columns are required. Then I did something else. I changed back the primary key column from DBsequence to NUMBER and from the page's bean I put default vallue for it. In this case it works. Which way I should prefer? Is there something else that I have to add when I set the type to DBSequence?
    Thanks in advance
    Regards

  • Row Currency Error in ADF Create Form

    Hi. Can anybody help me with this simple problem. I have been reading through the threads, and I tried the solutions, but it doesn't work.
    I am having this error:
    JBO-35007: Row currency has changed since the user interface was rendered. The expected row key was oracle.jbo.Key[-14 ]
    I have one page, with a form. The form was created by dragging a view from the Data Control. The primary key is of type DBSequence. the client side validation is disabled, so errors created are done by the ADF Model validation, since the fields has the af:validator in them.
    I clicked the submit once, it shows the error, for the required values. Without doing anything, I clicked the submit for a second time. I get the said error about the currency, as well as errors for required fields. Funny thing is, after clicking the submit button twice, besides the error, the control fields disappear. Its like its a new record.
    Can someone help? Thanks in advance.

    This is what I found out when asking our team that prepares the patches...
    As you know the patches are generic and as a result can be applied to other platforms that JDeveloper is supported on. However the .bat that comes in the patch is for Windows only, but for other platforms you can most times copy the script from the file and replace the windows commands with their equivalent, for the required OS. Of course, ensuring to follow the patch readme instructions and to test the customized script to ensure the updates are applied correctly.
    Open the bat file in a text editor and you should be able to see what files are being replaced and/or installed, and in what locations.
    For example, in the bat look for windows commands such as 'copy', 'move', 'del' (most of the scripts are failry easy to understand what is going on). Take a backup and replace the windows commands e.g. on unix/linux to 'cp', 'mv', 'rm'
    The windows commands in the bat file can be changed to the required operating system's equivalent commands. Change manually of using the text editor's search & replace functionality.
    If the customer isn't confident or comfortable doing that Support can help out.

  • ADF Faces Form problem

    Hi all,
    I'm using JDev. 10.1.3, ADF Faces + Toplink infrastructure to build pages in my system.
    My problem can be solved easily via old jsp architecture but I don't know how to achieve by using ADF Faces.
    I want to create a simple form in ADF Faces just like below;
    <form name="pay_form"
    action="https://www.payformstore.com/servlet/payServlet"
    method="post">
    <input type="hidden" name="clientId" value="ABC45"/>
    <input type="hidden" name="amount" value="5.00"/>
    </form>
    But in ADF Faces, as you know when a form created (af:form or h:form), the included command button in form is only fired to call the method in backed bean of relevant .jspx page. All things there must be achieved are handled in backed bean so I can't use the servlet address in action in simple form
    (https://www.payformstore.com/servlet/payServlet). I tried to use external context to redirect to this address/ servlet (https://www.payformstore.com/servlet/payForm) but servlet does not accept this redirection, it only accepts http post and gives the HTTP 405, method not allowed error.
    So I tried to use simple html <form ..> </form> tag in my adf faces page (.jspx page) in
    <f:verbatim> tag but I can't pass parameter from managed bean to input type hidden fields. (<input type=hidden name="a" value="#{payForm.parameter1}"/>) Also I have used jstl to pass parameter via <c:out ...> to input type hidden field in this simple form but it was useless.
    So please tell me how to create a simple form which has a action parameter and post method with dynamically binded form fields (just like input type hidden or any other fields) in adf faces pages.
    If there will be no answers I may use simple jsp pages in the end.
    best regards....
    --baris                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi frank, I solved problem in a different way.
    First of all, I have developed the required form by coding with the pure JSP + HTML.
    There is no <HTML>, <BODY> tags in this new jsp file. Before calling this jsp file, I stored the required managed bean into HTTP Session as an object and in this jsp file, the hidden form fields are filled by this session object. In my ADF faces file, I have included this jsp form field with,
    <f:verbatim>
    <jsp:include ...>
    </f:verbatim>
    and there is no problem, Everything is, now, ok!
    thanks for your interest.
    best regards...
    --baris                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • ADF Parameter Form problem

    Hi all. I'm using the new JDev 10.1.3. I tried to add a Parameter Form as described in the "Build a Web Application with ADF Business Components and JavaServer Faces" Tutorial at http://www.oracle.com/technology/obe/obe1013jdev/masterdetail_adf_bc/master-detail_pagewith_adf_bc.htm#t7.
    I get the following exception when I run the page.
    Has anyone come across this problem yet?
    500 Internal Server Error
    java.lang.NullPointerException     at oracle.adfinternal.view.faces.renderkit.core.xhtml.EditableValueRenderer.addOnSubmitConverterValidators(EditableValueRenderer.java:178)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.SimpleInputTextRenderer.encodeAllAsElement(SimpleInputTextRenderer.java:82)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.FormElementRenderer.encodeAll(FormElementRenderer.java:48)     at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.delegateRenderer(CoreRenderer.java:271)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.InputLabelAndMessageRenderer.renderFieldCellContents(InputLabelAndMessageRenderer.java:115)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.LabelAndMessageRenderer._renderFieldCell(LabelAndMessageRenderer.java:293)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.LabelAndMessageRenderer.encodeAll(LabelAndMessageRenderer.java:163)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.InputLabelAndMessageRenderer.encodeAll(InputLabelAndMessageRenderer.java:94)     at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeEnd(CoreRenderer.java:159)     at oracle.adf.view.faces.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:624)     at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeChild(CoreRenderer.java:236)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelFormRenderer.encodeColumnChild(PanelFormRenderer.java:275)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelFormRenderer.renderColumn(PanelFormRenderer.java:251)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelFormRenderer._renderColumns(PanelFormRenderer.java:545)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelFormRenderer._encodeChildren(PanelFormRenderer.java:153)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelFormRenderer.encodeAll(PanelFormRenderer.java:69)     at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeEnd(CoreRenderer.java:159)     at oracle.adf.view.faces.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:624)     at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeChild(CoreRenderer.java:236)     at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeAllChildren(CoreRenderer.java:255)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelPartialRootRenderer.renderContent(PanelPartialRootRenderer.java:66)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.BodyRenderer.renderContent(BodyRenderer.java:117)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelPartialRootRenderer.encodeAll(PanelPartialRootRenderer.java:147)     at oracle.adfinternal.view.faces.renderkit.core.xhtml.BodyRenderer.encodeAll(BodyRenderer.java:60)     at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeEnd(CoreRenderer.java:159)     at oracle.adf.view.faces.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:624)     at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:623)     at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:546)     at oracle.adf.view.faces.webapp.UIXComponentTag.doEndTag(UIXComponentTag.java:100)     at Search.jspService(_Search.java:219)     [Search.jsp]     at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.0.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:60)     at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:416)     at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:478)     at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:401)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:719)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:298)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.access$100(ServletRequestDispatcher.java:42)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatcher.java:205)     at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:283)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:209)     at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)     at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)     at oracle.adfinternal.view.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:157)     at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)     at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)     at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)     at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:367)     at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:336)     at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:196)     at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:87)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)     at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:332)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:627)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)     at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)     at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:230)     at oracle.oc4j.network.ServerSocketAcceptHandler.access$800(ServerSocketAcceptHandler.java:33)     at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:831)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)     at java.lang.Thread.run(Thread.java:595)

    am not sure, but try to set the required field for this item in the property inspector to false.
    regarding the LOV, check this example : Adding an LOV to a query parameter (executeWithParams) in this link:
    http://blogs.oracle.com/shay/
    also check this:
    http://blogs.oracle.com/shay/2009/12/adf_query_with_parameters_and.html
    Edited by: M.Jabr on Feb 5, 2011 6:11 AM

  • Adf swing form problem

    i created two adf swing new empty forms.. and i'm triying to open form2 (form2
    have some components) with a click button from form1.
    i'm using this code on the event click button
    Form2 a = new Form2();
    a.setVisible(true); //or a.Show();
    after the click, the new form (a) appears without components and in a minimum
    size bar.

    It sounds like you have them displaying properly in a JFrame if you can get to the button from Form A and click the button. Your subject says "ADF Swing", so I assume you have bound your components that are on Form B. If that is the case, then you need to call setBindingContext() on Form B to get the ADF binding to execute. Here is a small sample assuming that you are using ADF Swing bindings and have also generated a Form with a binding context.
    // In the actionPerformed method of your button
      BindingContext ctx = panelBinding.getBindingContext();
      Form2 a = new Form2();
      a.setBindingContext(ctx);
      a.setVisible(true);
    ...Hope this helps.
    Erik

  • Create forms/adf using  JDeveloper 11

    hi
    i have a reg form and i hve created the EO's & VO's
    i drag n drop the VO to for create froms/ adf form and its running
    my problem is while running the page it by default it fills the existing data , i need to click the create button to init the create form
    is it possible with out the create button , set the default form to create model
    pls advice

    You're in the wrong forum, its about Oracle forms. For JDeveloper and ADF, try this JDeveloper and ADF

  • How To create ADF Search form in JDeveloper 11g 11.1.1.0.1

    Hi,
    I am using JDeveloper 11g 11.1.1.0.1 , in which i tried creating an ADF search form that has Find and Execute Buttons.
    I created the same ADF search form using JDeveloper 11g TP3 and TP4 wherein it works fine but not in JDeveloper 11g 11.1.1.0.1.
    Scenario....
    I dragged a read only view object on to the jspx page as ADF Search Form and dragged the same as Read only table.
    After doing this if i run the application the search functionality does not happen .
    ( I click on the find button and enter the condition and then click on the execute button. records does not get filtered based on that condition specified.)
    But when the same steps is done in 11g TP3 and TP4 the search functionalty works fine.
    Can someone suggest me what is the issue.
    Is this a bug in the new release.
    regards
    vinitha

    reply is in this id
    ADF Searchform with find and execute buttons in JDev 11.1.1.0.1 studio edi.

  • I have been creating forms in InDesign and pulling into Acrobat XI Pro to do form fields. My client would like to fill in the PDF form, save under a different name locally on their device, and redistribute. The problem I have is that, sometimes, they want

    I have been creating forms in InDesign and pulling into Acrobat XI Pro to do form fields. My client would like to fill in the PDF form using Reader, save under a different name locally on their device, and redistribute. The problem I have is that, sometimes, they want to redistribute the form as Read Only. I know how to flatten the form on a mobile device, but uncertain how they can do that with a PC or Mac using Adobe Reader. I looked at FormsCentral thinking there might be a solution going that route, but don't believe there is. Any advice?

    FormsCentral won't help with flattening a form. You could set up the form in Acrobat so that the fields are set to read-only, using JavaScript. Not quite the same as flattening but it's the best Reader can do.
    Note that when Reader is used to e-sign a document, it gets flattened, but this won't be possible if you need to Reader-enable the form and under certain other conditions.

Maybe you are looking for