jbo:InputSelectLOV Question

I have a BC4J/JSP application with no struts or UIX in 9.0.3.3 (1025). I have some questions about the LOV tag. I want to use this to popup an LOV that passes the ID of a field back to the originating form. I want that form to be able to display friendly text instead of the ID.
For example, lets say that I have an employee edit screen which allows you to add a deparment to an employee by selecting them in a LOV. The tag for the LOV might look like this:
<jbo:InputSelectLOV datasource="dsEmp" dataitem="DeptId" displaydatasource="dsDept" displaydataitem="DeptName" displayvaluedataitem="DeptId" formname="myForm" ></jbo:InputSelectLOV>
This would put a text field on the page with a button next to it. When the user clicks on the button it pops up a window with all the department names. The user clicks on a name and in the original field the id is shown. I want the Name to be shown.
The other concern I have is that it doesn't indicate which choice was previously selected in the LOV. I.E. if we are editing an employee and changing their department, I want the LOV to indicate what the department was before we opened the LOV..
Is there any way to implement these ideas without writing my own Javascript to handle it?

I tried using a bc4j view object that I pass value to
but got an error, but when I used datatable to display
the same record, I got what I was looking for!
Have you tried creating an inputLOV with a view that
takes in parameters at runtime?
Thanks for all your help!
see below:
<jbo:ApplicationModule id="AppModule" definition="LOVprj.AppModule" releasemode="Stateful" />
<jbo:DataSource appid="AppModule" id="dsdocV" viewobject="DocView1" />
<jbo:SetWhereClauseParam datasource= "dsdocV" index="0" value="value1" />
<jbo:SetWhereClauseParam datasource= "dsdocV" index="1" value="value2" />
Commented out Data Table used to test view.
=============================================
<%--
<table border="1" width=50%>
<tr>
<td><jbo:DataTable datasource="dsdocV" /></td>
</tr>
</table>
--%>
LOV Syntax
==========
<form name="doc_lov" >
<jbo:InputSelectLOV datasource="SpotsBc4jModule.SpMastersView1" dataitem="DocumentId" displaydatasource="dsdocV" displaydataitem="DocumentId" displayvaluedataitem="DocumentId" formname="doc_lov" ></jbo:InputSelectLOV>
</form>

Similar Messages

  • How to get the value of an jbo:InputSelectLOV field

    I am trying to get the value that was picked by the user by jbo:InputSelectLOV field. The value just set by this is required for another field. The only way I can do this is by doing a commit every time the user picks a value. Any suggestions?. Note:I tried Jbo:PostChanges, it did not work.
    Here is the code snippet. The first Lov gets the value for LocationId. Contacts has LocationId as the foreign key, and I need this to pick ContactId.
    <tr>
    <td>Customerlocation</td>
    <td>
    <jbo:InputSelectLOV datasource="ds" dataitem="Customerlocationid"
    displaydatasource="CL" displaydataitem="Locationtype,Address1,Address2,City,State,Zip,Locationid"
    displayvaluedataitem="Locationid" formname="WorkfilesView_form"/>
    </td>
    </tr>
    <tr>
    <td>CustomerContactid</td>
    <td>
    <jbo:InputSelectLOV datasource="ds" dataitem="Customercontactid"
    displaydatasource="CC" displaydataitem="Contacttype,Contactinfo,Locationid,Contactid"
    displayvaluedataitem="Contactid" formname="WorkfilesView_form"/>
    </td>
    </tr>

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Charles (JDev team) ([email protected]):
    You can't do it right away, you have to submit first.
    When you return from the first lov, the locationId value is set the form input field but not to the datasource yet, which is what you need to be able to see it in the second lov.
    You need to submit the change immediately after the first lov is done and then forward to the same page.<HR></BLOCKQUOTE>
    Charles:
    Two questions:
    1. How to call the editSubmit.jsp automatically after the value is "picked". Right now I have a kludgy "Click Here" link which calls editSubmit.jsp
    2. I tried jbo:postchanges with out success. I have to commit to see the changes. Is this the right?.
    null

  • HELP: jbo:InputSelectLOV whereclause not working

    Hi,
    i have defined a datasource with a whereclause for an jbo:InputSelectLOV, but the whereclause is not working. I can see all records in the LOV Window.
    JDeveloer Version 9.0.2.822
    What is wrong?
    <jbo:DataSource
    id="ds_workpackage"
    appid="app1"
    viewobject="ViewWorkpackageView"
    whereclause="Employeeid = 'ADD'"
    />
    <bc4juix:LabelStyledText datasource="ds1" dataitem="<%=dsAttributes.getName()%>" />
    <uix:rawText>
    <jbo:InputSelectLOV
    datasource="ds1"
    dataitem="Wpid"
    displaydatasource="ds_workpackage"
    displaydataitem="Wpid, WorkpackageName, Employeeid"
    displayvaluedataitem="Wpid"
    formname="form1" >
    </jbo:InputSelectLOV>
    </uix:rawText>
    Thanks
    Achim

    REPOST

  • Jbo:InputSelectLOV whereclause not working??

    Hi,
    i have defined a datasource with a whereclause for a InputSelectLov, but the whereclause is not working. In the LOV Window all records will be displayed. Whats wrong?
    <--
    <%
    String sWhereEmployee = "Employeeid= '" + session.getAttribute("custid") + "'";
    %>
    <%-- Display Workpackage in Combobox--%>
    <jbo:DataSource id="ds_workpackage" appid="app1" viewobject="ViewWorkpackageView" whereclause="<%=sWhereEmployee%>" />
    <uix:styledText text="Workpackage" />
    <uix:rawText>
    <jbo:InputSelectLOV
    datasource="ds1"
    dataitem="Wpid"
    displaydatasource="ds_workpackage"
    displaydataitem="Wpid, WorkpackageName, Employeeid"
    displayvaluedataitem="Wpid"
    formname="form1" >
    </jbo:InputSelectLOV>
    </uix:rawText>
    -->
    Any ideas??
    Thanks
    Achim

    Achim,
    Do you know a way to return two values instead of just one using the lovcomp.jsp. The current InputSelectLov returns only one value.
    You help will be greatly appreciate it.
    Kamran
    [email protected]
    703 696 1121

  • Jbo:InputSelectLOV using UIX

    Hello, I'm building an application using Business Components and UIX - JSP. I want to put a Combo Box or a Drop Down control that shows the information (an attribute) of another table, but when I use the jbo:InputSelectLOV, it apears at the top of the page.
    How can I put that control where I need.
    Best Regards
    Santiago

    Wrap the jbo tag inside of a uix:rawText tag and it will show up in the right location in the page.

  • JBO:InputSelectLOV Exception

    Using the jbo:InputSelectLOV the following message displays in the data frame
    of the LOV window. The dataitems that are referenced are not date fields.
    Can anyone help?
    Exception:
    java.lang.NoSuchMethodError: java.lang.String oracle.jdeveloper.html.DateField.treatInvalidCharacter(java.lang.String)
         void lovcomp.jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
         [lovcomp.jsp]

    This seem to be a migration problem between RC2 and the final release (or RC and RC2 I don't remember)
    Your lovcomp.jsp is old or has not been recompiled correctly.
    The routine called treatInvalidCharacter is now located in oracle.jbo.html.HTMLServices.
    To make sure that you have the correct version of lovcomp.jsp, use the component palette to insert a new dummy InputSelectLOV tag in your jsp file to trigger the copy of the correct version in your project. Or look at the original stored at:
    JDEV_HOME\jdev\system\templates\tagswebapp\lovcomp.jspCharles.

  • JBO DebugOutput Question

    We're having some trouble with our views auto-querying when we attempt to add a new row. It's a JClient app that doesn't initially query any rows. We turned on jbo.debugoutput=console to get more information on the problem. Now we have a couple of questions on what some of the debug messages mean. The entries below were generated when we brought the form up and went into Find mode. Here is a snippet from the console:
    [751] Changing iterator range size from :1 to :1000
    [752] Column count: 13
    [753] ViewObject: PaymentTermsView Created new QUERY statement
    [754] PaymentTermsView>#q computed SQLStmtBufLen: 999, actual=982, storing=1012
    [755] SELECT * FROM (SELECT PaymentTerms.PAYMENT_TERM,
           PaymentTerms.LAWSON_TERM_CODE,
           PaymentTerms.DESCRIPTION,
           PaymentTerms.IP_TERM_CODE,
           PaymentTerms.DISCOUNT_PCT,
           PaymentTerms.DISCOUNT_DAYS,
           PaymentTerms.NET_DAYS,
           PaymentTerms.ACTIVE_FLAG,
           PaymentTerms.CREATE_SOURCE,
           PaymentTerms.CREATE_DATE,
           PaymentTerms.LAST_UPDATE_SOURCE,
           PaymentTerms.LAST_UPDATE_DATE,
            PaymentTerms.PAYMENT_TERM as SORTED
    FROM PAYMENT_TERMS PaymentTerms
    WHERE PaymentTerms.ACTIVE_FLAG = 1
    union all
    SELECT null as PAYMENT_TERM,
           null as LAWSON_TERM_CODE,
           null as DESCRIPTION,
           null as IP_TERM_CODE,
           null as DISCOUNT_PCT,
           null as DISCOUNT_DAYS,
           null as NET_DAYS,
           null as ACTIVE_FLAG,
           null as CREATE_SOURCE,
           null as CREATE_DATE,
           null as LAST_UPDATE_SOURCE,
           null as LAST_UPDATE_DATE,
            -1 as SORTED
    FROM dual) QRSLT  ORDER BY SORTED asc
    [757] Bind params for ViewObject: PaymentTermsView
    [758] EntityCache:add WARNING - ignoring row with no primary key
    [759] $$added root$$ id=-2
    [760] EntityRowSetImpl's jbo.assoc.consistent = true (1) This query is used as the lookup for a Combobox binding and we need a blank row to provide a null selection, so that is the reason for the union.
    What we are most curious about is what the meaning of lines 758, 759, and 760 is.
    I suspect that line 758 is caused by the unioned null row since it wouldn't have a valid primary key.
    Also, I would expect that line 759 might be ADF creating a row in the Entity cache for the null row and attempting to generate a temp id if the primary key was an attribute type of DbSequence, but that isn't the case here.
    Line 760 seems to be enforcing/setting the association consistency property for the view, but most of the other views don't have this entry. Seems like it might have been due to the Entity the view is based on having a Composition Association to another Entity, but that isn't the case for this view.
    Any help understanding these entries would be greatly appreciated.
    Thanks
    Erik

    After further review, I have discovered that line 760 does indeed correlate to the Composition setting of the Association. It also appears to come in the beginning when setting up the view's query, so it actually goes with the next view in our log, which does have a Composition Association.
    Also, I believe my assessment of line 758 is correct in that it is caused by the null row. This could explain why we have noticed that the trick of including a queried null row doesn't always work for some comboboxes. In some cases the null row still doesn't show in the list. Now, I believe that this is because those Views are based on an Entity. The Entity most contain the primary key for a row in order to cache it. For the null row, there is no valid primary key, so the cache ignores it. This would mean that the combobox wouldn't show the null row, because it doesn't get it back from the Entity cache. For the comboboxes based on Views that are ViewOnly, they would show the null row because the View cache has no requirement for a valid primary key. This is only speculation at this point. I'll try and confirm.
    If the above answers are correct, then we really only need clarification on what line 759 means.
    Erik

  • INPUTSELECTLOV jbo tag is not working  properly

    Hi,
    Developing BC4J/JSP application with struts framework in 9.0.3.1. I'm getting exceptions when i used InputSelectLOV tag.
    Here is my jsp code:
    <jbo:DataSource id="locProgSvcDS" appid="CSMSModule"
    viewobject="RGBModule.LocProgSvcsView"/>
    <jbo:DataSource id="programsDS" appid="CSMSModule"
    viewobject="RGBModule.ProgramsView"/>
    <jbo:InputSelectLOV datasource="locProgSvcDS" dataitem="ProgCd"
    displaydatasource="programsDS" displaydataitem="ProgName"
    displayvaluedataitem="ProgCd" formname="locProgSvcsForm" />
    When click on LOV small button I'm getting popup but with the following exception:
    500 Internal Server Error
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    java.lang.String java.lang.String.substring(int, int)
    String.java:1525
    int oracle.jbo.html.jsp.datatags.ApplicationModuleTag.doStartTag()
    ApplicationModuleTag.java:142
    void rgb.lovcomp._jspService(javax.servlet.http.HttpServletRequest,
    javax.servlet.http.HttpServletResponse)
    [rgb/lovcomp.jsp]
    lovcomp.jsp:80
    void com.orionserver[Oracle9iAS (9.0.3.0.0) Containers for
    J2EE].http.OrionHttpJspPage.service(javax.servlet.ServletRequest,
    javax.servlet.ServletResponse)
    OrionHttpJspPage.java:56
    [SRC:/rgb/lovcomp.jsp:10]
    void
    oracle.jsp.runtimev2.JspPageTable.service(javax.servlet.http.HttpServletRequest,
    javax.servlet.http.HttpServletResponse, java.lang.String)
    JspPageTable.java:317
    void
    oracle.jsp.runtimev2.JspServlet.internalService(javax.servlet.http.HttpServletRe
    quest, javax.servlet.http.HttpServletResponse)
    JspServlet.java:465
    void
    oracle.jsp.runtimev2.JspServlet.service(javax.servlet.http.HttpServletRequest,
    javax.servlet.http.HttpServletResponse)
    JspServlet.java:379
    void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,
    javax.servlet.ServletResponse)
    HttpServlet.java:853
    void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
    J2EE].server.http.ServletRequestDispatcher.invoke(javax.servlet.ServletRequest,
    javax.servlet.ServletResponse)
    ServletRequestDispatcher.java:721
    void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
    J2EE].server.http.ServletRequestDispatcher.forwardInternal(javax.servlet.Servlet
    Request, javax.servlet.http.HttpServletResponse)
    ServletRequestDispatcher.java:306
    Text continued in next action...
    14-APR-04 14:37:58 GMT
    Text continued from previous action...
    boolean com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
    J2EE].server.http.HttpRequestHandler.processRequest(com.evermind[Oracle9iAS
    (9.0.3.0.0) Containers for J2EE].server.ApplicationServerThread,
    com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
    J2EE].server.http.EvermindHttpServletRequest, com.evermind[Oracle9iAS
    (9.0.3.0.0) Containers for J2EE].server.http.EvermindHttpServletResponse,
    java.io.InputStream, java.io.OutputStream, boolean)
    HttpRequestHandler.java:767
    void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
    J2EE].server.http.HttpRequestHandler.run(java.lang.Thread)
    HttpRequestHandler.java:259
    void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
    J2EE].server.http.HttpRequestHandler.run()
    HttpRequestHandler.java:106
    void EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run()
    PooledExecutor.java:797
    void java.lang.Thread.run()
    Thread.java:484
    Please help me out from this. Thank you in advance.
    Raj

    to further jdeline's answer:
    it is also possible your mail server requires authentication.
    try adding
    username="FROM_account_user_name" and
    password="FROM_account_user_password" to your cfmail tag.
    there is also such thing as cf logs. and it crates one for
    mail it
    sends, too... you look there for errors if you have access to
    the logs
    (i.e. if you are not on a shared hosting)
    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com

  • Strange action of InputSelectLOV

    Hi,
    I am facing this problem when inserting a new record. The error : "No row available for editing" occured from time to time whenever i try to insert a record. Till lately, i noticed the culprit that cause the error. It is at times that when i select a value from the LOV and click insert, the error message will be displayed. However, if i manually type in the value, the insert record process just go smoothly. Well, the create new record with value from LOV does work at times, but the frequency of failure is scary!
    Is there anyone out there could help me on this?
    I would attach my Request.jsp (Insert Form) and SubmitRequest.jsp (Submit Form) here.
    Request.jsp
    <%@ taglib uri="fileaccess.tld" prefix="fileaccess" %>
    <%@ taglib uri="http://xmlns.oracle.com/uix/ui" prefix="uix" %>
    <%@ taglib uri="/webapp/DataTags.tld" prefix="jbo" %>
    <%@ page contentType="text/html;charset=windows-1252"%>
    <!--<%@ page import="oracle.jbo.html.*" %> -->
    <HTML>
    <HEAD>
    <link REL="StyleSheet" HREF="jdeveloper.css">
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
    <TITLE>
    Customer Request Form
    </TITLE>
    </HEAD>
    <BODY>
    <jbo:ApplicationModule id="RequestModule" configname="Request.RequestModule.RequestModuleLocal" releasemode="Stateful" />
    <jbo:DataSource id="CmmDir" appid="RequestModule" viewobject="CmmDirView" />
    <jbo:DataSource id="CmtRequest" appid="RequestModule" viewobject="CmtRequestView" />
    <jbo:DataSource id="CmrType" appid="RequestModule" viewobject="CmrTypeView" />
    <jbo:DataSource id="CmrStatus" appid="RequestModule" viewobject="CmrStatusView" />
    <jbo:DataSource id="CmrClosed" appid="RequestModule" viewobject="CmrClosedView" />
    <jbo:DataSource id="CmrUrgency" appid="RequestModule" viewobject="CmrUrgencyView" />
    <jbo:DataSource id="CmmUser" appid="RequestModule" viewobject="CmmUserView" />
    <jbo:Row id="NewRow" datasource="CmtRequest" action="Create" ></jbo:Row>
    <form name="RequestForm" method="post" action="SubmitRequest.jsp">
    <table border="0" width="790">
    <tr>
    <td width="790"><font color="#336699"><b><i>Create Request</i></b></font>
    </td></tr>
    <table border="0" width="700" cellpadding="0" cellspacing="0">
    <tr>
    <td width="250"><font color="#339966"><b>Customer ID</b></font></td>
    <td width="450"><jbo:InputSelectLOV datasource="CmtRequest" dataitem="Dircd" displaydatasource="CmmDir" displaydataitem="Dircd, Flname" displayvaluedataitem="Dircd" formname="RequestForm"/>
    </td>
    </tr>
    <tr>
    <td width="250"><font color="#339966"><b>Contact</b></font></td>
    <td width="450"><jbo:InputText datasource="CmtRequest" dataitem="Contact" cols="15" maxlength="15"/>
    </td>
    </tr>
    <tr>
    <td width="250"><font color="#339966"><b>Email</b></font></td>
    <td width="450"><jbo:InputText datasource="CmtRequest" dataitem="Email" cols="30" maxlength="30"/>
    </td>
    </tr>
    </table>
    <tr>
    <td><p><i><b><font color="#336699">Request Details</font></b></i></td>
    </tr>
    <table border="0" width="700" cellpadding="0" cellspacing="0">
    <tr>
    <td width="250"><b><font color="#339966">Request Title</font></b></td>
    <td width="450"><jbo:InputTextArea datasource="CmtRequest" dataitem="Subject" rows="2" cols="50"/></jbo:InputTextArea>
    </td>
    </tr>
    <tr>
    <td width="250"><b><font color="#339966">Request Type</font></b></td>
    <td width="450"><jbo:InputSelect multiple="false" datasource="CmtRequest" dataitem="Type" displaydatasource="CmrType" displaydataitem="Flname" displayvaluedataitem="Type">
    <jbo:SetHtmlAttribute name="VALUE" value="S"/></jbo:InputSelect>
    </td>
    </tr>
    <tr>
    <td width="250"><b><font color="#339966">Request Status</font></b></td>
    <td width="450"><jbo:InputSelect multiple="false" datasource="CmtRequest" dataitem="Status" displaydatasource="CmrStatus" displaydataitem="Flname" displayvaluedataitem="Status">
    <jbo:SetHtmlAttribute name="VALUE" value="O"/></jbo:InputSelect>
    </td>
    </tr>
    <tr>
    <td width="250"><b><font color="#339966">Request Urgency</font></b></td>
    <td width="450"><jbo:InputSelect multiple="false" datasource="CmtRequest" dataitem="Priority" displaydatasource="CmrUrgency" displaydataitem="Flname" displayvaluedataitem="Urgency">
    <jbo:SetHtmlAttribute name="VALUE" value="H"/></jbo:InputSelect>
    </td>
    </tr>
    <tr>
    <td width="250"><b><font color="#339966">Issued By</font></b></td>
    <td width="450"><jbo:InputSelectLOV datasource="CmtRequest" dataitem="Issuedby" displaydatasource="CmmUser" displaydataitem="Userid,Flname" displayvaluedataitem="Userid" formname="RequestForm"/>
    </td>
    </tr>
    <tr>
    <td width="250"><b><font color="#339966">Assigned To</font></b></td>
    <td width="450"><jbo:InputSelectLOV datasource="CmtRequest" dataitem="AssignTo" displaydatasource="CmmUser" displaydataitem="Userid,Flname" displayvaluedataitem="Userid" formname="RequestForm"/>
    </td>
    </tr>
    <tr>
    <td width="250"><b><font color="#339966">Problem Details</font></b></td>
    <td width="450"><jbo:InputTextArea datasource="CmtRequest" dataitem="ProblemDetail" rows="5" cols="50"/>
    </jbo:InputTextArea></td>
    </tr>
    <tr>
    <td width="250"><b><font color="#339966">File Attachment</font></b></td>
    <td width="450"><jbo:InputTextArea datasource="CmtRequest" dataitem="FileLocation" rows="2" cols="50"/>
    </jbo:InputTextArea><INPUT TYPE="FILE" NAME="example"></td>
    </tr>
    <tr>
    <td width="250"><b><font color="#339966">Expected Resolution Date</font></b></td>
    <td width="450"><jbo:InputDate datasource="CmtRequest" dataitem="ResolutionDate" formname="RequestForm"/>
    </td>
    </tr>
    <tr>
    <td width="250"><b><font color="#339966">Resolution Details</font></b></td>
    <td width="450"><jbo:InputTextArea datasource="CmtRequest" dataitem="ResolutionDetail" rows="5" cols="50"/>
    </td>
    </tr>
    <tr>
    <td width="250"><b><font color="#339966">Actual Resolution Date</font></b></td>
    <td width="450"><jbo:InputDate datasource="CmtRequest" dataitem="ActualResolutionDate" formname="RequestForm"/>
    </td>
    </tr>
    </table>
    </table>
    <input name="MyRowKey" type="hidden" value="<jbo:ShowValue datasource="CmtRequest" dataitem="RowKey"/>"/>
    <br>
    <input type="submit" value="Insert"/>
    <input type="reset" value="Reset"/>
    <p>Cancel Insert Form</p>
    </form>
    </BODY>
    <jbo:ReleasePageResources />
    </HTML>
    SubmitRequest.jsp
    <%@ page errorPage="errorpage.jsp" language="java" contentType="text/html;charset=WINDOWS-1252" %>
    <%@ taglib uri="/webapp/DataTags.tld" prefix="jbo" %>
    <HTML>
    <HEAD>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
    <TITLE>
    Submit New Request to Database
    </TITLE>
    </HEAD>
    <BODY>
    <jbo:ApplicationModule id="RequestModule" configname="Request.RequestModule.RequestModuleLocal" releasemode="Stateful" />
    <jbo:DataSource id="CmtRequest" appid="RequestModule" viewobject="CmtRequestView" />
    <jbo:Row id="myrow" datasource="CmtRequest" action="Update" rowkeyparam="MyRowKey" >
    <jbo:SetAttribute dataitem="*" />
    </jbo:Row>
    <jbo:PostChanges appid="RequestModule" />
    <jbo:Commit appid="RequestModule" />
    <p><font size=3>The curent time is:</font></p>
    <P>
    <% out.println((new java.util.Date()).toString()); %>
    </P>
    <P>Click here to edit request.</P>
    </BODY>
    <jbo:ReleasePageResources releasemode="Stateful"/>
    </HTML>
    JDev team, is it a hidden bug (RowKey) from LOV??
    Thanks,
    Sin Leng

    Please look at the recent posting on this thread:
    Re: client_win_api_environment.read_registry does not work: error frm-40734
    315684
    Charles.Charles,
    The above link is broken. Could you locate the link or repost the article please? Thank you very much.
    ZD

  • J9.03,InputSelectLOV :why the lov Jsp can't return the selected value?

    I puted a InputSelectLOV in my dataeditcompenents.jsp to display the lov Jsp,but when i selected a row,it didn't display the value i selected in my edit Jsp,how can i do?
    and can i return more values from lov to put in my editform?
    the following is my dataeditcompentents.jsp

    the following is my dataeditcompenents.jsp:
    <%@ page language="java" import = "oracle.jbo.html.*" %>
    <%@ taglib uri="/webapp/DataTags.tld" prefix="jbo" %>
    <%-- This JSP component build an edit form for a single record and
    generates an update submit event.
    It is called by the DataEdit tag --%>
    <%
    // Retrieve all request parameters using our routine to handle multipart encoding type
    RequestParameters params = HtmlServices.getRequestParameters(pageContext);
    String amId = params.getParameter("amId");
    String dsParam = params.getParameter("datasource");
    String formName = dsParam + "_form";
    String rowAction = "Current";
    String event = "Update";
    %>
    <%-- Restore the data binding to the datasource passed as parameter --%>
    <jbo:DataSourceRef id="dsEdit" reference="<%=dsParam%>" />
    <jbo:DataSource id="lov" appid="<%=amId%>" viewobject="View1" />
    <%-- Select the way to retrieve the row to edit based on the event --%>
    <jbo:OnEvent name="edit" datasource="dsEdit">
    <% rowAction = "Get"; %>
    </jbo:OnEvent>
    <jbo:OnEvent name="create" datasource="dsEdit">
    <% rowAction = "CreateOnly"; event = "Create"; %>
    </jbo:OnEvent>
    <%-- Build a form with an editable field for each of the attributes of the row --%>
    <form name="<%=formName%>" action="<%=params.getParameter("targetURL")%>" enctype="<%=params.getParameter("encType")%>" method="POST">
    <%-- Retrieve the row to edit --%>
    <jbo:Row id="rowEdit" datasource="dsEdit" rowkeyparam="jboRowKey" action="<%=rowAction%>">
    <table border="0">
    <%-- Iterate through all the Attribute of the row --%>
    <jbo:InputSelectLOV datasource="dsEdit" dataitem="RecieveId" displaydatasource="lov" displaydataitem="SysId,UserName" displayvaluedataitem="SysId" formname="<%=formName%>" lovurl="lovcomp.jsp" />
    <jbo:AttributeIterate id="def" datasource="dsEdit">
    <tr>
    <td title="<jbo:ShowHint hintname='TOOLTIP'></jbo:ShowHint>" align="right"><jbo:ShowHint hintname="LABEL"></jbo:ShowHint><%
    // Mark all the mandatory attributes with '*'
    if (def.isMandatory())
    %>*<%
    } %>
    </td>
    <td wrap="soft" title="<jbo:ShowHint hintname='TOOLTIP'></jbo:ShowHint>"><jbo:InputRender datasource="dsEdit" formname="<%=formName%>" />
    </td>
    </tr>
    </jbo:AttributeIterate>
    </table>
    <%-- Generate an "Update" event as part of the Form --%>
    <jbo:FormEvent event='<%=event%>' datasource='dsEdit' addrowkey='true' />
    </jbo:Row>
    <jbo:OnEvent name="create">
    <% rowEdit.remove(); %>
    </jbo:OnEvent>
    <%-- Pass along originURL request parameters using a hidden field--%>
    <input type="hidden" name="originURL" value="<%=params.getParameter("originURL")%>">
    <input type="submit" value="Update">
    <input type="reset" value="Reset">
    </form>
    <jbo:ReleasePageResources />

  • LOVS in JSP - No Combo

    Is it possible to create a LOV opening a "search window" in wich the user can search and select the value he wants and have back the value in the main form ?
    Any suggestion will be appreciated.
    TIA
    Tullio

    Here is a sample page that shows usage of the datags. It shows various input tags including LOV:
    <%@ taglib uri="/webapp/DataTags.tld" prefix="jbo" %>
    <jbo:ApplicationModule configname="OnlineOrders.OnlineOrdersModule.LocalConfig" id="OnlineOrdersModule" username="bc4j" password="bc4j" />
    <jbo:DataSource id="Orders" appid="OnlineOrdersModule" viewobject="OrdView" ></jbo:DataSource>
    <jbo:DataSource id="customers" appid="OnlineOrdersModule" viewobject="CustomerView" ></jbo:DataSource>
    <jbo:RowsetNavigate datasource="Orders" action="First" />
    <form name="form1">
    Order Id:<jbo:InputText datasource="Orders" dataitem="Id" /><br>
    Order Date:<jbo:InputDate datasource="Orders" dataitem="Orderdate" formname="form1" /><br>
    Customer Name:<jbo:InputSelect datasource="Orders" dataitem="CustomerId" displaydatasource="customers" displaydataitem="Lastname" displayvaluedataitem="Id" /><br>
    Customer Name:<jbo:InputSelect multiple="yes" datasource="Orders" dataitem="Id" displaydatasource="customers" displaydataitem="Lastname" displayvaluedataitem="Id" /><br>
    <hr>
    <jbo:InputSelectLOV datasource="Orders" dataitem="Contactname" displaydatasource="customers" displaydataitem="Lastname" displayvaluedataitem="Id" formname="form1" /><br>
    <jbo:InputSelectGroup multiple="yes" datasource="Orders" dataitem="Id" displaydatasource="customers" displaydataitem="Email" displayvaluedataitem="Id" /><br>
    <jbo:InputSelectGroup datasource="Orders" dataitem="Id" displaydatasource="customers" displaydataitem="Email" displayvaluedataitem="Id" /><br>
    </form>
    </BODY>
    </HTML>
    <jbo:ReleasePageResources releasemode="Stateless" />
    null

  • Calculations in Jsp form - Urgent Please

    Hi,
    I have 3 fields in my table, Quantity,Price and Total. Quantity * Price gives Total. Price is the Column of another table and I display the values of Price using <jbo:InputSelectLOV>. So,my requirement is when I input the value for Quantity and select the values from list in the Edit.jsp form I need the value of Quantity * Price to be displayed in the Total field on Browse form. Could someone please help me. I am new to JSP and any help is appreciated.
    Thank You

    It's not related to JDeveloper this is a generic thing for HTML pages - if you want to do client side (menaing no traffic to the server) actions you use Javascript.
    You just need to stick the Javascript into the JSP page you have inside JDeveloper.

  • How to display another table's field value with an LOV?

    Hi all!
    On my JSP application I'm using an LOV based on 2 tables (datasources). I take the EMP and DEPT tables as an example:
    The user can click on the LOV button to select a department for a specific employee. I use the following code for the LOV:
    <jbo:DataSource id="dsEmp" appid="am" viewobject="EmpView" />
    <jbo:DataSource id="dsDept" appid="am" viewobject="DeptView" />
    <jbo:InputSelectLOV datasource="dsEmp" dataitem="DeptId" displaydatasource="dsDept" displaydataitem="Id,Dname" displayvaluedataitem="Id" formname="my_form" />
    So, the LOV windows shows the ID and Department Name from the DEPT table and returns Dept.Id into Emp.DeptId. This works fine but in the Edit JSP I want to display the Department Name instead of the Department Number. I don't know how I can pick the Department Name from the DEPT table. I tried to change the displayvaluedataitem="Name" but, as I thought, this didn't work.
    Is there any possibility to handle this problem?!
    PS: I'm using Oracle9i JDeveloper.
    Thanks a lot!

    Tim,
    See may answer to your other thread:
    Re: constant value
    Charles.

  • Update and Reset Button

    HI Experts
    I am using given bellow code to Edit Employee data. i dont know how to update this data and go back to Brose Form and want also place ReSet Button
    i know i can easily do that using DataEdit Tag but using DataEdit Tag i am not been able to customize data entry
    The Code is
    <body>
    <h2>Employee Edit Form</h2>
    <jbo:ApplicationModule id="Bssbc4jModule" definition="BSSJSP.Bssbc4jModule" releasemode="Stateful" />
    <jbo:DataSource id="DeptData" rangesize="6" appid="Bssbc4jModule" viewobject="DeptView1" />
    <jbo:DataSource id="EmpData" rangesize="6" appid="Bssbc4jModule" viewobject="EmpView1" />
    <jbo:DataSource id="JobData" rangesize="6" appid="Bssbc4jModule" viewobject="JobsView1" />
    <form action="/EmpEdit.jsp" name="emp_form" method="post">
    <table cellspacing="2" cellpadding="1" border="0" width="50%">
    <tr>
    <td>Employee ID</td>
    <td><jbo:InputRender datasource="EmpData" dataitem="Empno" formname="emp_form" ></jbo:InputRender>
    </td>
    </tr>
    <tr>
    <td>Employee Name</td>
    <td><jbo:InputRender datasource="EmpData" dataitem="Ename" formname="emp_form" ></jbo:InputRender>
    </td>
    </tr>
    <tr>
    <td>Job Description</td>
    <td><jbo:InputSelect multiple="false" datasource="EmpData" dataitem="Job" displaydatasource="JobData" displaydataitem="Jobtitle" displayvaluedataitem="Jobid" ></jbo:InputSelect>
    </td>
    </tr>
    <tr>
    <td>Hire Date</td>
    <td><jbo:InputDate datasource="EmpData" dataitem="Hiredate" formname="emp_form" readonly="true" ></jbo:InputDate>
    </td>
    </tr>
    <tr>
    <td>Salary</td>
    <td><jbo:InputText datasource="EmpData" dataitem="Sal" maxlength="5" readonly="false" ></jbo:InputText>
    </td>
    </tr>
    <tr>
    <td>Department</td>
    <td><jbo:InputSelectLOV datasource="EmpData" dataitem="Deptno" displaydatasource="DeptData" displaydataitem="Dname" displayvaluedataitem="Deptno" formname="emp_form" ></jbo:InputSelectLOV>
    </td>
    </tr>
    </table>
    </form>
    // i use this but its not working
    <uix:submitButton id="Update" formName="emp_form" destination="EmpBrowse.jsp" name="Update" text="Update" />
    <uix:resetButton id="ReSet" formName="emp_form" name="ReSet" />
    <jbo:ReleasePageResources />
    </body>

    See this thread for customizing the layout of a DataEdit component:
    Working with DataEdit Tag
    The DataEdit is intended to render all fields in the datasource on the screen. If you only want one field you can simply open a form tag, add an input field, add submit buttons (html submit buttons) and close the form tag. If you add a DataHandler to the page it will even do the DML for you.

  • CreateViewObject and LOV

    Hi all,
    I am trying to create a LOV from a datasource which i created using the CreateViewObject.
    When i click on the LOV button the pop up screen shows an error where it cannot find the viewobject in the application module..
    Help pls
    Pritty

    Hi Frank,
    Thnks for the reply.
    Ok, in my jsp page i have created a view using the createViewobject tag
    <jbo:CreateViewObject appid="AppModCases" name="AssocCases" >
    SELECT a, b,c
    FROM test
    </jbo:CreateViewObject>
    <jbo:DataSource id="dsList" appid="AppModCases" viewobject="AssocCases" />
    i want to populate a LOV from this view..
    <jbo:InputSelectLOV datasource="dsEdit" dataitem="x" displaydatasource="dsList" displaydataitem="a,b,c" displayvaluedataitem="a" formname="<%=formName%>" ></jbo:InputSelectLOV>
    Now when i run my form and click on the LOV button the page crashes:
    500 Internal Server Error
    oracle.jbo.JboException: Could not locate View Object AssocCases in application AppModCases.
         void oracle.jbo.JboException.<init>(java.lang.String)
         void oracle.jbo.html.DataSourceImpl.setApplicationModule(java.lang.String, oracle.jbo.ApplicationModule)
         int oracle.jbo.html.jsp.datatags.DataSourceTag.doStartTag()
         void lovcomp.jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
         [lovcomp.jsp]
         void oracle.jsp.runtime.HttpJsp.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
         void oracle.jsp.runtimev2.JspPageTable.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String)
         void oracle.jsp.runtimev2.JspServlet.internalService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
         void oracle.jsp.runtimev2.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
         void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
         void com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
         void com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(javax.servlet.ServletRequest, javax.servlet.http.HttpServletResponse)
         boolean com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.HttpRequestHandler.processRequest(com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.ApplicationServerThread, com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.EvermindHttpServletRequest, com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.EvermindHttpServletResponse, java.io.InputStream, java.io.OutputStream, boolean)
         void com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(java.lang.Thread)
         void com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].util.ThreadPoolThread.run()

Maybe you are looking for