How to pass var P decimasl 4 to var P decimals 2 without round ?

Hi all,
How to pass var P decimasl 4 to var P decimals 2 without round ?
Example;
DATA: num  TYPE p DECIMALS 2,
          num2 TYPE p DECIMALS 4.
      num2 = '23.3367'.
      num = num2.
'num' would be 23.34, but I do not want round it, I want that it be 2,33.
is it possible ?
Thanks.

Hi,
You cannot avoid the rounding here.
If you want to do so increase the decimal place of num to 4.
Cheers,
Hakim

Similar Messages

  • How to pass an argument to a standalone java class in JDeveloper

    To the experienced:
    In JDeveloper when you write a java class with a main() method that takes no argument, you just right click the java file and select Run to run the program. But suppose the main() method takes arguments, how do you pass your arguments to the program? This is especially a problem as I use the studio version of JDeveloper (Versions 10.1.3.4 and 11.1.1.3) that each uses the version of JDK bundled with it, rather than the JDK (which is yet another different version) installed at the OS level of the PC.
    Many thanks for your help!
    Newman

    Hi, Puthanampatti,
    Suppose a java class has a main() method:
    <pre>
    public class FormatTerm {
    public static void main(String[] args) {
    String year = args[0];
    String semester = args[1];
    </pre>
    What I want to know is how to pass the arguments when invoking FormatTerm within JDeveloper (i.e., without going out of JDeveloper to invoke FormatTerm on a command line in DOS). I would appreciate it very much if you know how to do that in JDeveloper 11g (I use Version 11.1.1.3) and could help me out.
    Thank you very much for your help!
    Newman

  • How to pass a JSP var to a Script function called in a netui:checkbox

    How to pass a JSP variable to a Java Script function called in a netui:checkbox onSelect?
    I have a requirement where based on the checkBox selected or deselected in a repeater tag I would have to select or deselect other checkboxes in a netui:form. I am trying to pass the index or unique name of the checkbox to the JavaScript function. When I try this code I am getting a Syntax Error!! and getting a " item undefined" in the javascript. This works when I use just the html form tag but when I use the <netui:form> tag I am facing this issue. Any help would be highly appreciated.
    function selectACheckBoxOnClick(name) {
    alert ("called selectACheckBoxOnClick ");
    alert ("called name "+name);
    <netui-data:repeater dataSource="{pageFlow.unregisteredContractAssetsDTOArr}">
    <netui-data:repeaterItem>
    <% String checkboxName = "selectACheckBox_"+i;
    String serialNum = "serialNum_"+i;
    String hidenboxName = "hiddenACheckBox_"+i;
    String loopNo = new Integer(i).toString();
    System.out.println("Loop String :"+ loopNo);
    System.out.println("CheckBox Name:"+ checkboxName);
    System.out.println("serialNum :"+serialNum); %>
    <tr bgcolor="#ffffff">
    <td align="center">
    <netui:checkBox dataSource="{container.item.selectedAssetFlag}" onSelect="selectACheckBoxOnClick(<%=checkboxName%>);" tagId="<%=checkboxName%>"/>
    </td>
              <td class="small"><netui:label value="{container.item.model}"/></td>
              <td class="small">
    <netui:hidden dataSource="{container.item.splitAssetNo}" tagId="<%=serialNum%>"/>
    <netui:label value="{container.item.serial}"></netui:label></td>
              <td class="small"><netui:label value="{container.item.equpimentId}"/></td>
              <td class="small">
    <netui-data:getData resultId="siteId" value="{container.item.siteNo}" />
    <%String siteId = (String) pageContext.getAttribute("siteId");%>
    <netui:anchor action="getSiteLevelAssets" formSubmit="true">
    <netui:parameter value="{container.item.siteNo}" name="siteNo" />
    <netui:label value="{container.item.siteNo}" />
    </netui:anchor>
    </td>     </tr>
    <%i++;%>
    </netui-data:repeaterItem>
    </netui-data:repeater>
    This code works within a form:
                   <td align=center>
                        <input type=image name="unassign" onclick="javascript:unassignReplacement(<%=replacementSupply.getPMSupplyId()%>)" src="<%=request.getContextPath()%>/images/bt_sm_x.gif" border=0 alt="Unassign">
                        </td>
    Thanks,
    Salome

    hi
    i did not go thru your code completly
    but u can use the following for your problem
    the checkbox in the repeater must have unique TagID
    counter = 0; (initialize)
    <netui-data:repeaterItem>
    <netui:checkBox dataSource="" tagId='<%="count"+String.valueOf(counter)%>' onClick="some function()" />
    <%counter++;%>
    </netui-data:repeaterItem>
    here if u have 3 checkbox
    They will have Tagid's as count1 , count2 and count3
    now in the javascript somefunction()
    use the following line
    for(j=0;j<<%=counter%>;j++)
    document.forms(0)[getNetuiTagName"count"+j)].checked=false;     
    }

  • JSP -- how to pass a variable

    Hi,
    I am relatively new to JSP/Java and am currently trying to figure out how to pass a value gotten from running a query into another query.
    My code is below .. I am trying to pass 'tsid'. For simplicity I have hard-coded some values. I have tried 2 different methods (c:set & String) and bolded them below. I wanted to pass the tsid into the sql2 query.
    <%@ page import="java.sql.*"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <%
        Connection connection = null;
        try{
            String tpid="1";
            String tdate="2005-11-11";
            String tsr01="3";
            String tsr02="54";
            String tsr03="64";
            String tsr04="90";
            String tsr05="54";
            String tsr06="17";
            String tsr07="null";
            String tsr08="null";
            String tsr09="null";
            String tsr10="null";
            String tsr11="null";
            String tsr12="null";
            String tsr13="null";
            String tsr14="null";
            String tsr15="null";
            String tz_1l1="111";
            String tz_1u1="111";
            String tz_1l2="111";
            String tz_1u2="111";
            String tz_1l3="111";
            String tz_1u3="111";
            String tz_1l4="111";
            String tz_1u4="111";
            String tz_1l5="111";
            String tz_1u5="111";
            String tz_2l1="111";
            String tz_2u1="111";
            String tz_2l2="111";
            String tz_2u2="111";
            String tz_2l3="111";
            String tz_2u3="111";
            String tz_2l4="111";
            String tz_2u4="111";
            String tz_2l5="111";
            String tz_2u5="111";
            Class.forName("org.postgresql.Driver");
            connection = DriverManager.getConnection("jdbc:postgresql:dbName","postgres","dbPassword");
            Statement stmt1 = connection.createStatement();
            Statement stmt2 = connection.createStatement();
            Statement stmt3 = connection.createStatement();
            String sql1="INSERT INTO t_test_setup_results (tsr_tpid, tsr_tester, tsr_athlete, tsr01, tsr02, tsr03, tsr04, tsr05, tsr06, tsr07, tsr08, tsr09, tsr10, tsr11, tsr12, tsr13, tsr14, tsr15, tsr_date) VALUES ('"+tpid+"' , '15', '9', "+tsr01+", "+tsr02+", "+tsr03+", "+tsr04+", "+tsr05+", "+tsr06+", "+tsr07+", "+tsr08+", "+tsr09+", "+tsr10+", "+tsr11+", "+tsr12+", "+tsr13+", "+tsr14+", "+tsr15+", '"+tdate+"' );";
         stmt1.executeUpdate(sql1);
         ResultSet rs2 = stmt2.executeQuery("SELECT tsr_id FROM t_test_setup_results WHERE tsr_date='"+tdate+"' AND tsr_tpid='"+tpid+"' AND tsr_athlete='9';");
            %>
         <c:set param="tsid2" value="${rs2.rows[0].tsr_id}" />
         <%
            String tsid="$rs2.rows[0].tsr_id}";
            String sql2="INSERT INTO t_test_zones (tz_tsrid,  tz_1l1, tz_1u1, tz_1l2, tz_1u2, tz_1l3, tz_1u3, tz_1l4, tz_1u4, tz_1l5, tz_1u5, tz_2l1, tz_2u1, tz_2l2, tz_2u2, tz_2l3, tz_2u3, tz_2l4, tz_2u4, tz_2l5, tz_2u5) VALUES ('"+tsid+"', "+tz_1l1+", "+tz_1u1+", "+tz_1l2+", "+tz_1u2+", "+tz_1l3+", "+tz_1u3+", "+tz_1l4+", "+tz_1u4+", "+tz_1l5+", "+tz_1u5+", "+tz_2l1+", "+tz_2u1+", "+tz_2l2+", "+tz_2u2+", "+tz_2l3+", "+tz_2u3+", "+tz_2l4+", "+tz_2u4+", "+tz_2l5+", "+tz_2u5+");" ;
            stmt2.executeUpdate(sql2);
    %>
         <result>success</result>
    <%
        catch (Exception e) {
            e.printStackTrace();
    %>
         <result>failure</result>
    <%
        } finally {
            try {
                connection.close();
            } catch (SQLException e) {
    %>this is the error I get with the above:
    org.apache.jasper.JasperException: /my-apps/Peak/Jsp/submitNewTestData.jsp(64,1) Attribute param invalid for tag set according to TLD
    org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
    org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:405)
    org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:234)
    org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:989)
    org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:710)
    org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441)
    org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
    org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
    org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
    org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
    org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
    org.apache.jasper.compiler.Validator.validate(Validator.java:1489)
    org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:157)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:296)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

    OK,
    here is what I currently have:
      %>
         <c:set var="tsid2" value="${rs2.rows[0].tsr_id}" />
         <%
            String tsid= tsid2;
            String sql2="INSERT INTO t_test_zones (tz_tsrid,  tz_1l1, tz_1u1, tz_1l2, tz_1u2, tz_1l3, tz_1u3, tz_1l4, tz_1u4, tz_1l5, tz_1u5, tz_2l1, tz_2u1, tz_2l2, tz_2u2, tz_2l3, tz_2u3, tz_2l4, tz_2u4, tz_2l5, tz_2u5) VALUES ('"+tsid+"', "+tz_1l1+", "+tz_1u1+", "+tz_1l2+", "+tz_1u2+", "+tz_1l3+", "+tz_1u3+", "+tz_1l4+", "+tz_1u4+", "+tz_1l5+", "+tz_1u5+", "+tz_2l1+", "+tz_2u1+", "+tz_2l2+", "+tz_2u2+", "+tz_2l3+", "+tz_2u3+", "+tz_2l4+", "+tz_2u4+", "+tz_2l5+", "+tz_2u5+");" ;
         stmt2.executeUpdate(sql2);NOW I get sucess (which is what it should be) OR that tsid2 could not be resolved. Why the back and forth errors? is it a timing thing? (ie it sometimes takes longer to query the database?? )
    If it is a timing thing, how can i fix this?

  • How to pass a jsp variable into javascript??

    <p><%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
    <p><%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
    <p><html>
    <p><c:set var="binrmapi" value="http://localhost/paas-api/bingorooms.action;jsessionid=XXXXXX?userId=TEST2&sessionId=1&key=1" />
    <p><c:import var="testbinrm" url="${fn:replace(binrmapi, 'XXXXXX', jsessionid)}"/>
    <p><c:set var="tuples" value="${fn:split(testbinrm, '><')}" />
    <p>Time until next game
    <p><c:forEach var="tuple" items="${tuples}">
    <p><c:if test="${fn:contains(tuple, 'row ')}">
    <p> <p><code>
    <p> <c:set var="values" value="${fn:split(tuple, '=\"')}" />
    <p> <font color="blue">
    <p> <c:out value="${values[17]}" />
    <p><c:set var="remainingtime" value="${values[17]}" />
    <p> </font>
    <p> </code>
    <p></c:if>
    <p></c:forEach>
    <p><form name="counter"><input type="text" size="8" name="d2"></form>
    <p><script>
    <p>var milisec=0
    <p>var seconds=eval("document.myForm.remaining").value;
    <p>function display(){
    <p> if (milisec<=0){
    <p> milisec=9
    <p> seconds-=1
    <p>}
    <p>if (seconds<=-1){
    <p> milisec=0
    <p> seconds+=1
    <p> }
    <br>else
    <p> milisec-=1
    <p> document.counter.d2.value=seconds+"."+milisec
    setTimeout("display()",100)
    <p>}
    <p>display()
    <p></script>
    <p></body>
    <p></html>
    <p>This is my code that i was working on, in the jsp part of the script, i get a api call and save a value of time in the variable remainingtime.. and in the javascript, i try to have a countdown clock counting down the remaining time.. but i guess it doesnt work.. how can i get that working? thanks alot
    Message was edited by:
    hamham3001
    Message was edited by:
    hamham3001
    Message was edited by:
    hamham3001
    Message was edited by:
    hamham3001

    Re: How to pass a jsp variable into javascript??Here is the sameple one, hope it will solves your problem.
    <html>
    <body>
    <form name=f>
    <%!
    String str = "A String"
    %>
    <script>
    var avariable = <%=str%>
    <script>
    </form>
    </body>
    </html>
    Let me know if you face any problem

  • How to pass java arraylist into javascript arrays

    Hi, i have declare an arraylist
    ArrayList list1 = new ArrayList();Inside the arraylist, there are elements. Now, i wan to pass the elements in the java arraylist into javascript arrays but i encounter javascript errors.
    This is how i code.
    var arr1 = new Array();
    <%
    for ( int x =0; x<list1.size(); x++)
    %>
         arr1[<%=x%>] = <%=(String)list1.get(x)%>;
    <%
    %>how do i solve this problem?
    Thanks for the guidance in advance

    JTech wrote:
    Hi,
    Use Quotes around string value ( arr1[indexposition] = "stringvalue";), when assign to javascript array as below.
    arr1[<%=x%>] = "<%=(String)list1.get(x)%>"; Regards,
    Ram.Hi Ram,
    How about using arr1 = <%=list.toArray()%> ??? Is this possible? I tried it but was not working on my IDE. Do you have any solutions for this??
    Regards,
    Thiagu

  • How To pass the value within the page using jsp?

    How to passing the textbox value within the jsp page without using javascript or reload the page.
    I have a scenario like this:
    I have a textbox named as "accno" which allow user to key in the accno. After key in the accno, this accno value will used to do a query from database using jstl.
    here is part of my code
    <input name="accno" type="text" onChange="checkLC()"/>
    <sql:query var="results" dataSource="${db}">
    select accno,name from account where accno = '<%=value get from accno textbox%>'          
    </sql:query>
    <c:out value="${result.rows[0].name}"/>
    note that onChange() is the javascript when user key in accno then automatically go to check database then only show out the name. So how can i get the '<%=value get from accno textbox%>' from accno textbox.

    How to passing the textbox value within the jsp page
    without using javascript or reload the page.No, jsp executes on the remoter server, the text box is on a client machine, you need to send information to the server over the network, http does this with a request, which will reload the page.....................

  • How to pass parameters to individual regions in multitaskflow

    I have a page, where the regions are added dynamically (using multiTaskFlow ). All the regions are of the same type( defined by same taskflow definition) and hence each region takes a different values for the same parameter type.
    How do we pass different parameter values, when creating TaskFlowBindingAttributes?
    Since TaskFlowBindingAttributes takes parametersMap as an EL string, I couldn't figure out , how to define the EL so that each region gets its parameter?
    Following are the code snippets:
    Java code for that is creating a List<TaskFlowBindingAttributes>
             for(MyRegion region: regionList)
                 TaskFlowBindingAttributes tfBindAttr = new TaskFlowBindingAttributes();
                 tfBindAttr.setId(region.getId());
                 tfBindAttr.setTaskFlowId(new TaskFlowId("/WEB-INF/core/custom_app_task-flow.xml", "custom_app_task-flow"));
                 tfBindAttr.setRefreshCondition("ifNeeded");
                 tfBindAttr.setParametersMap(""); //??? How to pass params here since this takes EL String.
                 list.add(tfBindAttr);
    Multitaskflow entry in pageDef file:
    <multiTaskFlow id="multiRegion1"
                        taskFlowList="#{viewScope.core_extensibility_cusapp_model.uiAppTemplate.taskFlowBindings}"
    xmlns="http://xmlns.oracle.com/adf/controller/binding"/>
    Jspx code:
    <af:forEach var="tf"
    items="#{bindings.multiRegion1.taskFlowBindingList}">
    <cust:showDetailFrame shortDesc="#{''}" id="sdf2">
    <af:region value="#{tf.regionModel}" id="r1"/>
    </cust:showDetailFrame>
    </af:forEach>
    thanks
    maher

    Hi,
    what if you create a managed bean property as shown below
    ManagedBean:
    Map<String, ? extends Map<String, Boolean>> parameters = new HashMap<String,HashMap<String,Object>>();
    then you create setter/getter for this map. This way you can address the HashMap for each region as
    #{scope.managedbean.parameters['nested_hashmap_string']}
    Frank

  • How to pass variable in a function

    I would like to ask how to pass the value "char" into the
    "onSoundComplete" function? many thanks! many thanks!
    _root.playVO = function(pageNum, char){
    var myVO:Sound = new Sound();
    myVO.loadSound("vo/vo" + pageNum + ".mp3", true);
    _root.myVO.onSoundComplete = function(char){
    _root.attachMovie("indicator", "indicator",
    _global.curLevel++);
    _root[char].mouth.gotoAndStop("mute");
    _root.indicator.clickIndicator_btn.onRelease = function(){
    _root.play();
    _root.currentPage++;
    _root.display(_root.currentPage);
    this._parent.removeMovieClip();
    }

    I don't think you can pass variables into the onSoundComplete
    handler function. But you don't really need to as you've written
    the code. You're passing it into the playVO function so it should
    be availble to the onComplete handler (which you've written inside
    playVO) without having to restate it. As long as you pass it in
    when calling playVO (e.g. playVO(myVar);)
    Hope that helps!

  • SSRS How to pass a value for Hidden parameter ?

    Hello,
    I have a SSRS report deployed on the Report server. This report is having an "Hidden" parameter.
    Could someone please guide me, how to pass the value to this internal parameter in each of the following case - 
    1. Report is accessed through a Desktop application/Web application in Report Viewer.
    2. Report is accessed through the Url.
    3. Report is accessed through the Report Manager.
    Any quick help on this is highly appreciated.
    Thanks!
    -Vinay Pugalia
    If a post answers your question, please click "Mark As Answer" on that post or
    "Vote as Helpful".
    Web : Inkey Solutions
    Blog : My Blog
    Email : Vinay Pugalia

    Hi Vinay Pugalia,
    Internal Parameters in SSRS are parameters that are not configurable by the end-user at run-time and values cannot be passed to this type of parameter (when present in the child report) in case of a drill-through report implementation. This
    type of parameter is read-only and not accessible in parent report.
    This varies from a Hidden Parameter, which the user is not prompted to provide, but can still be configured through the URL to the report server.
    So no matter you access the report through report manager, URL or Report Viewer. The passing value to the internal parameter will not work.
    As you have mentioned that I will also suggest you use the hidden parameter instead.
    More details information in this blog for your reference:
    SSRS – Understanding Report Parameter Visibility
    How to pass value to  hide parameter is the same as that of the visible parameter, similar thread for your reference:
    Passing the value in action property of a text box
    If you still have any problem, please feel free to ask.
    Regards,
    Vicky Liu
    If you have any feedback on our support, please click
    here.
    Vicky Liu
    TechNet Community Support

  • Passing vars to a component in as3

    This doesnt seem particulary easy... or poetic for once of a better word.
    I was hoping I could write something like....
    BookingCreator = new CreateBooking(myvar);
    But what do I put In the mxml constructor for that component?
    Its a panel so where does myvar go?
    If I could hand it myvar like that I would then use creationComplete.
    But because I dont no how to pass a var direct to the constructor Im doing it this way instead...
    BookingCreator = new CreateBooking();
    BookingCreator.addEventListener(FlexEvent.CREATION_COMPLETE,onCreated);
    mod.root.addElement(BookingCreator);
    private function onCreated(e:FlexEvent):void{
    BookingCreator.model = mod;
    BookingCreator.init();
    Is that the only way to do it?

    You can't use parameters in the constructor.
    I don't have an issue with what you are doing but I do have an issue with the way that you are naming object instances as though they are classes.
    BookingCreator is an instance, not a class - it should be named 'bookingCreator'.
    NEVER name variables with a capital letter at the start.
    If you type 'MXML constructor' into Google you will get plenty of hits about this subject.

  • Select/option with cfquery - how to pass selected value to field downform

    I have a form that has a basic select/option dropdown using a cfquery result.  I would like to use the value that the user selects to pre-populate an editable 'title' field further along on the form.  For example:
    <form action="index.cfm?fuseaction=sendEmail" method="POST" name="email_approval" enctype="multipart/form-data">
    <table width="500" border="1" cellspacing="0" cellpadding="2" align="center">
    <tr>
      <td align="left">Request ID:</td>
      <td align="left" width="100"><b><cfoutput>#RequestId#</cfoutput></b></td>
      <td align="left">Application:</td>
      <td align="left" width="400"><b><cfoutput>#this_request.app_abbrev#</cfoutput></b></td>
      <td align="left">WR/RD#:</td>
      <td align="left" width="400"><b><cfoutput>#this_request.request_number#</cfoutput></b></td>
    </tr>
    <tr>
      <td align="left">Email Type:</td>
      <td align="left" colspan="2">
          <select name="approval_type" size="1" >
          <cfoutput query="approval_types">
             <option value="#approval_types.approval_descrip#" style="font-size:8pt">#approval_types.approval_descrip#</option>
           </cfoutput>
         </select>
      </td>
      <td align="left"> </td>
      <td align="left">Date Sent:</td>
      <td align="left"><b><cfoutput>#dateformat(Now(), "MM/DD/YYYY")#</cfoutput></b></td>
    </tr>
      <cfset subjectLine = "#RequestId#" & " " & "#approval_types.approval_descrip#" & " Approval Request" >
    <script  type="text/javascript" language="JavaScript">
    <cfoutput>
      var #toScript(subjectLine, "jsLine")#;
    </cfoutput>
    </script>
    <script  type="text/javascript" language="JavaScript">
    function setValue()
      document.getElementById('subject').value =jsLine;
    </script>
    <tr>
      <td align="left">Subject:</td>
      <td align="left" colspan="5">
       <b><input type="Text" name="subject"  required="Yes" size="70" maxlength="70" onClick="setValue();"></b>
    </td>
    </tr>
    When the user gets to the subject field,the onClick will pre-populate the field with the combined value using <cfset subjectLine = "#RequestId#" & " " & "#approval_types.approval_descrip#" & " Approval Request" >.  regardless of what is selected, it uses the first item in the query list because that is what is rendered when the form is loaded (got that).  I figure that I need a javascript onChange event for the select statement for the dropdown, but can't figure out how to pass this javascript variable back to the CF form.  Any ideas, or am I stuck?
    Thanks in advance for your thoughts!

    You will need to do it with JS as the values you want to access are not set until the form is submitted. This should give you what you want.
    It uses a hidden form field to hold the requestID, that is then accessed with JS. (I am assuming this value is available when the page loads)
    <form action="index.cfm?fuseaction=sendEmail" method="POST" name="email_approval" enctype="multipart/form-data">
    <input type="hidden" name="requestID" id="reqID" value="1234" />
    <table width="500" border="1" cellspacing="0" cellpadding="2" align="center">
    <tr>
      <td align="left">Email Type:</td>
      <td align="left" colspan="2">
          <select name="approval_type" id="approval_type" size="1" >
             <option value="test" style="font-size:8pt">test</option>
         </select>
      </td>
      <td align="left"> </td>
      <td align="left">Date Sent:</td>
      <td align="left"><b><cfoutput>#dateformat(Now(), "MM/DD/YYYY")#</cfoutput></b></td>
    </tr>
    <script  type="text/javascript" language="JavaScript">
    function setValue(){
        var e = document.getElementById("approval_type");
        var approval_type_value = e.options[e.selectedIndex].value;
        var subjectLine = document.getElementById('reqID').value + ' ' + approval_type_value + ' Approval Request';
        document.getElementById("subject").value = subjectLine;
        alert(subjectLine); 
    </script> 
    <tr>
      <td align="left">Subject:</td>
      <td align="left" colspan="5">
       <b><input type="Text" name="subject"  required="Yes" size="70" maxlength="70" onClick="setValue();"></b>
    </td>
    </tr>

  • How to pass src value into img tag in ADF

    Hi,
    My Dev : 11.1.2.3.0
    How to pass row values into <img> tag.,I used the below code but it's taking empty.,
    I tried both ways like #{row.CdFilePath}   and   ${row.CdFilePath}
    <af:iterator var="row"
                      value="#{bindings.xxx.collectionModel}"
                     id="i2">
         <img src='/ShowImage?src=#{row.CdFilePath}' border='0' style="width:100px; height:100px; margin:5px;"/>
    </af:iterator>
    Please tell me any other option is there..
    Thanks

    This works if you use a normal table so I guess it should work here too.
    Are you sure the el #{row.CdFilePath} return something?
    Why don't you use the adf image tag <af:image source="/ShowImage?src=#{row.CdFilePath}".../> instead of the html img tag?
    Should the src property not be enclosed with " instead of your '?
    Timo

  • How to pass tabular report col reference in the onChange event of Txtfield

    Hi there
    I need to have Onchange event on Textfield Item.
    Whenever i change the text field value, the new value should go to particular column in my
    tabular report.
    So in the onchange event, i have to pass the tabular report column (target field) along with textfield value (this.value)
    something like this:
    onChange="javascript:changeColVal(this,rowid);"
    I have no clue how to pass row id / particular column of tabular report in textfield.
    Any pointers on this would be of great help.
    Thanks
    Vijay

    Hi Andy
    Thanks a ton for your reply.
    The above solution would work fine when we refer Text field within that tabular report.
    but if we refer text field Item from separate HTML region?
    I'm sorry, its my mistake for not providing OTN application for reference.
    I've come up with dummy application which shows you exact requirement.
    Please follow url: http://apex.oracle.com/pls/otn/f?p=47869:21
    login credentials:
    workspace: vsanthanam
    user: vijay
    pswd: apex_demo
    Application highlights the row whenever we move up/down or click the row.
    Here, i've NOTES in tabular report and Comments "text field" in separate HTML region.
    Whenever i type/update comments in textfeild, it should goto Notes column in Tabular report.
    so that when we move up/down the tabular report rows, it should show corresponding Notes in Comments text field.
    Approach i've took:
    1) Created a function hiliterow, that highlights the row clicked/move up or down and
    also displays the Notes Column of Tabular report into Comments Textfield.
    (this is to display Notes if already avail to that particular row, otherwise Null)
    2) Function passValues would assign the value we type in Comments Text field to
    Notes column of Tabular Report. (as of now, this is happening only when we click on that particular row after key-in the value in Comments txtfield,
    but this should happen when onChange event on comment textfield)
    3) In MoveupDown function, i'm refering the current row in var r. so i tought to have global var to hold current row, so that i can
    refer the same row in Onchange Event of Textfield. But this fails (please refer NotesToRow function)
    My requirement is to pass the Comments text field value to Tabular report when onChange event on Comments Text feild happens.
    I'm helpless in passing row reference to onChange function.
    Any pointer on this would be of immense help.
    Thanks
    vijay

  • How to pass the data from a input table to RFC data service?

    Hi,
    I am doing a prototype with VC, I'm wondering how VC pass the data from a table view to a backend data service? For example, I have one RFC in the backend system with a tabel type importing parameter, now I want to pass all the data from an input table view to the RFC, I guess it's possible but I don't know how to do it.
    I try to create some events between the input table and data service, but seems there is no a system event can export the whole table to the backend data service.
    Thanks for your answer.

    Thanks for your answer, I tried the solution 2, I create "Submit" button, and ser the mapping scope to  be "All data rows", it only works when I select at least one row, otherwise the data would not be passed.
    Another question is I have serveral imported table parameter, for each table I have one "submit" event, I want these tables to be submitted at the same time, but if I click the submit button in one table toolbar, I can only submit the table data which has a submit button clicked, for other tables, the data is not passed, how can I achieve it?
    Thanks.

Maybe you are looking for