How to reference a saw:param in javascript

Hi everyone,
Not sure if this is possible but I have a need to reference the value computed in <sawm:param name="addViewState"/>. Does anyone have experience referencing these values?
I've been trying to work on a way to display a dynamic breadcrumb using OBIEE's DrillBack function. That function requires two values, a viewpath and a viewstate. I can get the view path but I've been stuck on retrieving the viewstate for about the last week. After a bit of digging, I found the above reference in dashboardtemplates.xml.
I know Sunil has implemented a static version of a breadcrumb using navigate, but I was hoping to achieve something more dynamic.
thanks for the help!
-Joe

I would recommend using Firebug to determine what functions are called during the standard drill-down. Replace the existing onClick with your own new onClick that executes both your custom code and OBIEE's code.
I did something similar recently when making a modification to writeback functionality. I needed to display a select list for my writeback instead of a text box. I created a Answers field with the html code for the select list. This included a call to a custom function triggered onClick. The custom function wrote the selected value from the select list to the text box. This didn't work initially because OBIEE was making use of the onFocus and onChange function of the writeback text box. These functions needed to be called in order for the writeback to execute properly. My behind the scenes assignment to the text box was not triggering the onFocus and onChange functions like it needed to. My solution was to determine what code was executing from onFocus and onChange and then execute it explicitly from my custom function.
Here's an excerpt from my custom onClick function from the select list. The functions WBFocus and WBChange are what OBIEE was executing onFocus and onChange for the writeback text box.
if( aElm.type == "text" && aElm[i].size ==50) {
WBFocus(event);
aElm[i].value="n/a";
WBChange(event);

Similar Messages

  • How to reference html form element in javascript ?

    Dear all,
    My DPK portlet is like this:
    I created a html form within it there a several textfields, a hidden field and a SUBMIT button.
    The application will call itself to insert a new record to database table on pressing the SUBMIT button.
    My problem is that since all the form textfields and the hidden field ara all the qualified names, and I want to set the hidden field to some value, say "ADD" on the onsubmit event in the form. How can I reference the hidden field in javascript ?
    Or can you suggest another strategy to do that ?
    Many thanks
    George (HK)
    Here are the code fragment:
    String portletParamSubmit = "mSubmit";
    String portletParamTitle = "mTitle";
    String portletParamURL = "mURL";
    String portletParamAction = "mAction";
    //Fully qualified URL.
    String fSubmit = HttpPortletRendererUtil.portletParameter(request, portletParamSubmit);
    String formName = UrlUtils.htmlFormName(pReq, null);
    String fTitle = HttpPortletRendererUtil.portletParameter(request, portletParamTitle);
    String fURL = HttpPortletRendererUtil.portletParameter(request, portletParamURL);
    String fAction = HttpPortletRendererUtil.portletParameter(request, portletParamAction);
    String vl_Title = "";
    String vl_URL = "";
    String vl_Action = "";
    String vl_result = "";
    if( pReq.getQualifiedParameter(portletParamAction) == "ADD")
    vl_Title = pReq.getQualifiedParameter(portletParamTitle);
    vl_URL = pReq.getQualifiedParameter(portletParamURL);
    //Add News.
    try{
    CallableStatement cs_2 = conn_erp03.prepareCall("{call XXCT_PORTAL_NEWS_PKG.P_ADD_NEWS(?,?,?,?,?,?)}");
    cs_2.setString(1, "ADD");
    cs_2.setString(2, pReq.getUser().getName());
    cs_2.setString(5, vl_Title);
    cs_2.setString(6, vl_URL);
    cs_2.registerOutParameter(10,Types.VARCHAR);
    cs_2.execute();
    vl_result = cs_2.getString(10);
    cs_2.close();
    catch (SQLException se) {
    sb.append("Query: SQL Exception: " + se.toString());
    System.out.println(sb);
    %>
    <head>
    <script language = "Javascript">
    <!--
    function SetAction() {
    document.<NAME THE OF HIDDEN FIELD>.value = 'ADD'; <====How to refer it ?
    return 1;
    // -->
    </script>
    </head>
    <body>
    <form name="<%=formName%>" method= "POST" action="<%=UrlUtils.htmlFormActionLink(pReq, UrlUtils.PAGE_LINK)%>" onSubmit="return SetAction()">
    <%= UrlUtils.htmlFormHiddenFields(pReq, UrlUtils.PAGE_LINK, formName)%>
    <table>
    <tr>
    <td>Title</td>
    <td><input type="text" length=100 name="<%=fTitle%>"></td>
    <td> </td>
    <td> </td>
    </tr>
    <tr>
    <td>URL</td>
    <td><input type="text" name="<%=fURL%>"></td>
    <td> </td>
    <td> </td>
    </tr>
    <tr>
    <td><INPUT type="submit" name="mysubmit" value="ADD NEWS"></td>
    <td><input type="hidden" name="<%=fAction%>"></td>
    <td> </td>
    <td> </td>
    </tr>
    </table>
    </body>

    hi Neeraj Sidhaye,
    After trying your suggest codings,
    I come to the problem of null pointer exception message captured in the application log file as:
    06/08/11 11:48:57 Prj_News: [instance=212602_PORTLET_NEWS_49519249, id=79187977878,4] ERROR: AbstractResourceRenderer.renderBody - recieved ServletException. Root cause is
    java.lang.NullPointerException
    What's wrong ?
    George (HK)
    Here is my coding:
    <%@page contentType="text/html; charset=Big5"
    import="javax.naming.*"
    import="javax.sql.*"
    import="java.sql.*"
    import="oracle.jdbc.*"
    import="java.sql.Date"
    import="java.util.*, oracle.portal.provider.v2.*"
    import="oracle.portal.provider.v2.http.HttpCommonConstants"
    import="oracle.portal.provider.v2.render.PortletRendererUtil"
    import="oracle.portal.provider.v2.render.PortletRenderRequest"
    import="oracle.portal.provider.v2.render.http.HttpPortletRendererUtil"
    import="oracle.portal.provider.v2.url.UrlUtils"
    %>
    <%
    StringBuffer sb = new StringBuffer();
    PortletRenderRequest pReq = (PortletRenderRequest)request.getAttribute(HttpCommonConstants.PORTLET_RENDER_REQUEST);
    %>
    <%
    //Database connection.
    InitialContext ic = new InitialContext();
    DataSource ds_erp03 = null;
    Connection conn_erp03 = null;
    try {     
    ds_erp03 = (DataSource)ic.lookup("jdbc/ERP03_DS");
    conn_erp03 = ds_erp03.getConnection();
    catch (SQLException se) {
    sb.append("Connection: SQL Exception: " + se.toString());
    System.out.println(sb);
    catch (NamingException ne) {
    sb.append("Connection: Naming Exception: " + ne.toString());
    System.out.println(sb);
    %>
    <%
    //Self defined names.
    String portletParamSubmit = "mSubmit";
    String portletParamMainCat = "mMainCat";
    String portletParamSubCat = "mSubCat";
    String portletParamTitle = "mTitle";
    String portletParamURL = "mURL";
    String portletParamDescription = "mDescription";
    String portletParamEffDateFm = "mEffDateFm";
    String portletParamEffDateTo = "mEffDateTo";
    String portletParamAction = "myAction";
    //Fully qualified URL.
    String fSubmit = HttpPortletRendererUtil.portletParameter(request, portletParamSubmit);
    String formName = UrlUtils.htmlFormName(pReq, null);
    String fMainCat = HttpPortletRendererUtil.portletParameter(request, portletParamMainCat);
    String fSubCat = HttpPortletRendererUtil.portletParameter(request, portletParamSubCat);
    String fTitle = HttpPortletRendererUtil.portletParameter(request, portletParamTitle);
    String fURL = HttpPortletRendererUtil.portletParameter(request, portletParamURL);
    String fDescription = HttpPortletRendererUtil.portletParameter(request, portletParamDescription);
    String fEffDateFm = HttpPortletRendererUtil.portletParameter(request, portletParamEffDateFm);
    String fEffDateTo = HttpPortletRendererUtil.portletParameter(request, portletParamEffDateTo);
    // String fAction = HttpPortletRendererUtil.portletParameter(request, portletParamAction);
    String fAction="myAction";
    String vl_MainCat = "";
    String vl_SubCat = "";
    String vl_Title = "";
    String vl_URL = "";
    String vl_Description = "";
    String vl_EffDateFm = "";
    String vl_EffDateTo = "";
    String vl_Action = "";
    String vl_result = "";
    %>
    <%
    if( pReq.getQualifiedParameter(portletParamAction).equals("ADD")) <= This line cause the null pointer exception <<<<<<<<
    vl_MainCat = pReq.getQualifiedParameter(portletParamMainCat);
    vl_SubCat = pReq.getQualifiedParameter(portletParamSubCat);
    vl_Title = pReq.getQualifiedParameter(portletParamTitle);
    vl_URL = pReq.getQualifiedParameter(portletParamURL);
    vl_Description = pReq.getQualifiedParameter(portletParamDescription);
    vl_EffDateFm = pReq.getQualifiedParameter(portletParamEffDateFm);
    vl_EffDateTo = pReq.getQualifiedParameter(portletParamEffDateTo);
    //Add News.
    try{
    CallableStatement cs_2 = conn_erp03.prepareCall("{call XXCT_PORTAL_NEWS_PKG.P_ADD_NEWS(?,?,?,?,?,?,?,?,?,?)}");
    cs_2.setString(1, "ADD");
    cs_2.setString(2, pReq.getUser().getName());
    cs_2.setString(3, pReq.getQualifiedParameter(portletParamMainCat));
    cs_2.setString(4, pReq.getQualifiedParameter(portletParamSubCat));
    cs_2.setString(5, pReq.getQualifiedParameter(portletParamTitle));
    cs_2.setString(6, pReq.getQualifiedParameter(portletParamURL));
    cs_2.setString(7, pReq.getQualifiedParameter(portletParamDescription));
    cs_2.setString(8, pReq.getQualifiedParameter(portletParamEffDateFm));
    cs_2.setString(9, pReq.getQualifiedParameter(portletParamEffDateTo));
    cs_2.registerOutParameter(10,Types.VARCHAR);
    cs_2.execute();
    vl_result = cs_2.getString(10);
    cs_2.close();
    catch (SQLException se) {
    sb.append("Query: SQL Exception: " + se.toString());
    System.out.println(sb);
    %>
    <SCRIPT SRC="<%=HttpPortletRendererUtil.absoluteLink(pReq,"clock.js")%>"></SCRIPT>
    <LINK REL=stylesheet TYPE="text/css" HREF="<%=HttpPortletRendererUtil.absoluteLink(pReq,"tables_style.css")%>">
    <head>
    <script language = "Javascript">
    <!--
    function doSubmit(myAction)
    // alert(myAction);
    if(myAction == 'ADD')
    document.forms[0].<%=fAction%>.value="ADD";
    else if(myAction == 'DELETE')
    document.forms[0].<%=fAction%>.value="DELETE";
    document.forms[0].submit();
    // -->
    </script>
    </head>
    <body>
    <form name="<%=formName%>" method= "POST" action="<%=UrlUtils.htmlFormActionLink(pReq, UrlUtils.PAGE_LINK)%>">
    <%= UrlUtils.htmlFormHiddenFields(pReq, UrlUtils.PAGE_LINK, formName)%>
    <table>
    <tr>
    <td style="color:#fff;font-family:'Arial';font-size:14px;text-align:right;">Page</td>
    <td>
    <select name="<%=fMainCat%>">
    <option value="X">-- Please select --
    <option value="FAE">FAE
    <option value="PM">Product Marketing
    <option value="RD">R&D
    <option value="BU">Business Unit
    </select>
    </td>
    <td style="color:#fff;font-family:'Arial';font-size:14px;text-align:right;">Region</td>
    <td>
    <select name="<%=fSubCat%>">
    <option value="X">-- Please select --
    <option value="1">Region 1
    <option value="2">Region 2
    <option value="3">Region 3
    <option value="4">Region 4
    </select>
    </td>
    </tr>
    <tr>
    <td style="color:#fff;font-family:'Arial';font-size:14px;text-align:right;">Date From</td>
    <td><input type="text" size="6" maxlength="10" name="<%=fEffDateFm%>"></td>
    <td style="color:#fff;font-family:'Arial';font-size:14px;text-align:right;">Date To</td>
    <td><input type="text" size="6" maxlength="10" name="<%=fEffDateTo%>"></td>
    </tr>
    </table>
    <table>
    <tr>
    <td style="color:#fff;font-family:'Arial';font-size:14px;text-align:right;">Title</td>
    <td><input type="text" size="100" maxlength="100" name="<%=fTitle%>"></td>
    </tr>
    <tr>
    <td style="color:#fff;font-family:'Arial';font-size:14px;text-align:right;">URL</td>
    <td><input type="text" size="100" maxlength="200" name="<%=fURL%>"></td>
    </tr>
    <tr>
    <td style="color:#fff;font-family:'Arial';font-size:14px;text-align:right;">Description</td>
    <td><textarea id="description" rows="5" cols="76" maxlength="500" name="<%=fDescription%>"></textarea></td>
    </tr>
    <tr>
    <td><input type="hidden" id="<%=fAction%>" name="<%=HttpPortletRendererUtil.portletParameter(request, portletParamAction)%>"></td>
    <td><input type=button value="Add" onClick="doSubmit('ADD')"></td>
    </tr>
    </table>
    </form>
    </body>

  • How to reference variable values in a BW Web Template

    Hi All,
    I'm having a problem which I hope someone can help me with.
    OVERVIEW
    I've developed a BW Web template with (among other things) a TEXTELEMENTS Web Item and a TABLE Web Item. I've enhanced the context menu so that when a user selects a row within the TABLE, they can start a SEM-BPS Web interface (which displays a manual planning layout). I've used the 'How to call a BPS Web Interface with Predefined Selections' document to get the basic mechanism working. The JavaScript function I've written successfully passes the variable (DFCOST_PL) value to the planning layout.
    THE PROBLEM
    The problem is twofold....
    1. I need to pass the value for a variable (FEPCVERS) to the layout. However I do not know how to make reference to the variable in JavaScript. The variable is available within the TEXTELEMENTS_1 object but how do I address it?
    2. On a similar vein, I need to pass the value for a field within the table row to the planning layout. The TABLE_2 object contains the fields (DFCOST_PL and DFGROUPS). When the user selects a line the value for DFCOST_PL is available to the JavaScript function (ZAJT_JS_Maintain_Rules) in the 'parameter1' field. However, how do I make the DFGROUPS field available?
    Below is the HTML code for my Web Template. Any help would be greatly appreciated.....
    <!-- BW data source object tags -->
    <object>
             <param name="OWNER" value="SAP_BW">
             <param name="CMD" value="SET_DATA_PROVIDER">
             <param name="NAME" value="DATAPROVIDER_2">
             <param name="QUERY" value="ZAJT3_COST_BASE_BY_COST_POOL">
             <param name="INFOCUBE" value="Z_FEPC_CB">
             DATA_PROVIDER:             DATAPROVIDER_2
    </object>
    <!--BW HTML data source object tags: -->
    <object>
             <param name="OWNER" value="SAP_BW">
             <param name="CMD" value="SET_PROPERTIES">
             <param name="TEMPLATE_ID" value="ZAJT_RULES_ENTRY">
             <param name="VARIABLE_SCREEN" value="X">
             <param name="CMENU_LABEL_1" value="ZAJT Maintain Rules">
             <param name="CMENU_FUNCTION_1" value="ZAJT_JS_Maintain_Rules">
             <param name="CMENU_PARAMETER_1" value="1">
             <param name="CMENU_CELL_TYPE_1" value="CHARACTERISTIC_VALUE">
             <param name="CMENU_FILTER_1" value="DFCOST_PL">
             <param name="CMENU_VISIBILITY_1" value="X">
             <param name="CMENU_POSITION_1" value="TOP">
             TEMPLATE PROPERTIES
    </object>
    <object>
             <param name="OWNER" value="SAP_BW">
             <param name="CMD" value="SET_DATA_PROVIDER">
             <param name="NAME" value="DATAPROVIDER_1">
             <param name="QUERY" value="ZAJT3_COST_BASE_BY_PC_NODE">
             <param name="INFOCUBE" value="Z_FEPC_CB">
             DATA_PROVIDER:             DATAPROVIDER_1
    </object>
    <html>
      <head>
        <title>BW Web Application</title>
        <link href= "/sap/bw/mime/BEx/StyleSheets/BWReports.css" type=text/css rel=stylesheet>
      </head>
    <!--ZAJT Test code start -->
    <SCRIPT language="JavaScript">
    function ZAJT_JS_Maintain_Rules(parameter,cell_type,filter,parameter1,parameter2,item,dataprovider,x,y)
      var url;
      var cpool=parameter1;
      switch (parameter)
        case "1":
          url="http://dknborisdev.dcb.defence.gov.au:3280/sap/bc/bsp/sap/zbps_var_set/zbps_var_set.htm?area=ZFERULES&bps-appl=ZAJT_RULES3&var1=ZWEBCP&value1_1=" + cpool;
         SAPBWOpenWindow(url ,"MaintainRules" ,600,400);
         break;
    </SCRIPT>
    <!--ZAJT Test code end -->
      <body>
    <object>
             <param name="OWNER" value="SAP_BW">
             <param name="CMD" value="GET_ITEM">
             <param name="NAME" value="TEXTELEMENTS_1">
             <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_TEXT_ELEMENTS">
             <param name="DATA_PROVIDER" value="DATAPROVIDER_1">
             <param name="CLOSED" value="X">
             <param name="SHOW_COMMON_ELEMENTS" value="">
             <param name="SHOW_FILTERS" value="">
             <param name="ELEMENT_TYPE_1" value="VARIABLE_K">
             <param name="ELEMENT_NAME_1" value="FEPCVERS">
             <param name="ELEMENT_TYPE_2" value="VARIABLE_K">
             <param name="ELEMENT_NAME_2" value="DF_GRP">
             <param name="ELEMENT_TYPE_3" value="VARIABLE_K">
             <param name="ELEMENT_NAME_3" value="ZCSTCNTR">
             ITEM:            TEXTELEMENTS_1
    </object>
    <object>
             <param name="OWNER" value="SAP_BW">
             <param name="CMD" value="GET_ITEM">
             <param name="NAME" value="NAVIGATIONBLOCK_2">
             <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_NAV_BLOCK">
             <param name="DATA_PROVIDER" value="DATAPROVIDER_2">
             <param name="CLOSED" value="X">
             <param name="TARGET_DATA_PROVIDER_1" value="DATAPROVIDER_1">
             <param name="TARGET_DATA_PROVIDER_2" value="DATAPROVIDER_2">
             ITEM:            NAVIGATIONBLOCK_2
    </object>
    <object>
             <param name="OWNER" value="SAP_BW">
             <param name="CMD" value="GET_ITEM">
             <param name="NAME" value="PC_HIERARCHY">
             <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_FILTER_HIERDD">
             <param name="DATA_PROVIDER" value="DATAPROVIDER_1">
             <param name="CLOSED" value="X">
             <param name="CAPTION" value="Profit Centre Hierarchy">
             <param name="BORDER_STYLE" value="BORDER">
             <param name="IOBJNM" value="0PROFIT_CTR">
             <param name="HIERARCHY_NAME" value="PROFIT_CTR_ZFEPCBP05">
             <param name="TARGET_DATA_PROVIDER_1" value="DATAPROVIDER_2">
             <param name="TARGET_DATA_PROVIDER_2" value="DATAPROVIDER_1">
             ITEM:            PC_HIERARCHY
    </object>
    <object>
             <param name="OWNER" value="SAP_BW">
             <param name="CMD" value="GET_ITEM">
             <param name="NAME" value="TABLE_1">
             <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_GRID">
             <param name="DATA_PROVIDER" value="DATAPROVIDER_1">
             <param name="TARGET_DATA_PROVIDER_1" value="DATAPROVIDER_1">
             <param name="TARGET_DATA_PROVIDER_2" value="DATAPROVIDER_2">
             ITEM:            TABLE_1
    </object>
    <object>
             <param name="OWNER" value="SAP_BW">
             <param name="CMD" value="GET_ITEM">
             <param name="NAME" value="TABLE_2">
             <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_GRID">
             <param name="DATA_PROVIDER" value="DATAPROVIDER_2">
             ITEM:            TABLE_2
    </object>
      </body>
    </html>

    Hi Heike,
    Thanks for your response. The example you gave me works nicely. I've tried to use the same concept on a FILTER object, but it does not seem to work. I declared the object as below:
    </span>
    <span style="display:none;visibility:hidden" id="0PROFIT_CTR_value">
    <object>
             <param name="OWNER" value="SAP_BW">
             <param name="CMD" value="GET_ITEM">
             <param name="NAME" value="FILTER_1">
             <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_FILTER">
             <param name="DATA_PROVIDER" value="DATAPROVIDER_1">
             <param name="HIDDEN" value="X">
             <param name="GENERATE_CAPTION" value="">
             <param name="PRESENTATION" value="KEY">
             <param name="ITEM_FILTER_IOBJNM_1" value="0PROFIT_CTR">
             <param name="PRESENTATION_1" value="KEY">
             <param name="ONLY_VALUES" value="X">
             ITEM:            FILTER_1
    </object>
    </span>
    and then use
    document.getElementById('0PROFIT_CTR_value').innerHTML.
    However, the value returned is blank. Is there a different method required for filters?
    Also, you mentioned that to access the second variable I will need to use the table interface. Is this difficult to do? I'm booked on the NET050 (Developing Web Applications) course, but it's not until late November. Do you think that this course would cover this kind of processing?

  • Custom icon strip - how to reference it in the HHC?

    I could not get the custom icon strip to work for me. I think that I understood the overall concept but I do not know how to reference the bmp file in the HHC.Ricks Tips and Tricks file only states "make the reference inside the HHC file". Where exactly do I place the <param name="..." value="C:..BMP"> reference?
    Perhaps there is an example?

    Rick,
    thanks for your efforts despite my ignorance! My HHC file does not look like that, it has a different structure without an HTML list. After some fiddeling I got it to work now, even though I still did not find out why my TOC structure does not match yours (the binary TOC option is not active).
    Instead of using the <param name="ImageList" value="C:tocimages.bmp"> line, I inserted the reference into the properties tag. My HHC looks like this now and it works:
    <?xml version="1.0" encoding="utf-8"?>
    <toc version="1.0">
    <properties imagelist="C:tocimages.bmp">
    </properties>
    <item name=".." link="...html">
    (here the TOC items follow)
    </item>
    </toc>

  • How to call jpf controller method from javascript

    Can any one help me how to call pageflow controller method from JavaScript.\
    Thanks.

    Accessing a particular pageflow method from Javascript is directly not possible unless we do some real funky coding in specifying document.myForm.action = xyz...Heres what I tried and it did not work as expected: I found another workaround that I will share with you.
    1. In my jsp file when I click a button a call a JavaScript that calls the method that I want in pageflow like this: My method got invoked BUT when that method forwards the jsp, it lost the portal context. I saw my returned jsp only on the browser instead of seeing it inside the portlet on the page of a portal. I just see contents of jsp on full browser screen. I checked the url. This does make the sense. I do not see the url where I will have like test1.portal?_pageLabe=xxx&portlet details etc etc. So this bottom approach will notwork.
    document.getElementById("batchForm").action = "/portlets/com/hid/iod/Batches/holdBatch"; // here if you give like test1.portal/pagelable value like complete url...it may work...but not suggested/recommended....
    document.getElementById("batchForm").submit;
    2. I achieved my requirement using a hidden variable inside my netui:form tag in the jsp. Say for example, I have 3 buttons and all of them should call their own action methods like create, update, delete on pageflow side. But I want these to be called through javascript say for example to do some validation. (I have diff usecase though). So I created a hidden field like ACTION_NAME. I have 3 javascript functions create(), update() etc. These javascripts are called onclick() for these buttons. In thse functions first I set unique value to this hiddent field appropriately. Then submit the form. Note that all 3 buttons now go to same common action in the JPF. The code is like this.
    document.getElementById("ACTION_NAME").value = "UPDATE";
    document.getElementById("batchForm").submit.
    Inside the pageflow common method, I retriev this hidden field value and based on its value, I call one of the above 3 methods in pageflow. This works for me. There may be better solution.
    3. Another usecase that I want to share and may be help others also. Most of the time very common usecase is, when we select a item in a drop bos or netui:select, we want to invoke the pageflow action. Say we have 2 dropdown boxes with States and Cities. Anytime States select box is changed, it should go back to server and get new list of Cities for that state. (We can get both states and cities and do all string tokenizer on jsp itself. But inreality as per business needs, we do have to go to server to get dynamic values. Here is the code snippet that I use and it works for all my select boxes onChange event.
    This entire lines of code should do what we want.
    <netui:anchor action="selectArticleChanged" formSubmit="true" tagId="selectPropertyAction"/>                    
    <netui:select onChange="document.getElementById(lookupIdByTagId('selectPropertyAction',this )).onclick();" dataSource="pageFlow.selectedArticleId" >
    <c:forEach items="${requestScope.ALL_ARTICLE}" var="eachArticle">
    <%-- workshop:varType="com.hid.iod.forms.IoDProfileArticleRelForm" --%>
    <netui:selectOption value="${eachArticle.articleIdAsString}">${eachArticle.articleItemName}</netui:selectOption>
    </c:forEach>               
    </netui:select>
    See if you can build along those above lines of code. Any other simpler approches are highly welcome.
    Thanks
    Ravi Jegga

  • OWSM: How to reference Custom Step properties/parameters?

    Hi,
    When you define a Custom Step via a XML file. You can define properties/parameters. In the sample files that comes with OWSM (CustomAuthenticationStep.xml) Username and Password are defined. My problem is that I cannot figure out how to reference these in the Java Step source. In the sample file CustomAuthenticationStep.java there are no references. There are two class variables called expectedUsername and expectedUserPassword, but they are never set in the source? There are nothing in the Extensibility Guide about this. Anybody know how it works?
    Regards Peter

    I've made a couple of these now. It somehow walks through the xml file you upload and then the properties defined are matched with the appropriate get/set methods in the actual java code.
    One example I had to make was to add HTTP Basic Auth headers to a request. Here is the section of the xml file.
    <csw:PropertyDefinitionSet name="HTTP Basic Auth Params">
    <csw:PropertyDefinition name="httpBasicAuthUsername" type="string" isRequired="true">
    <csw:DisplayName>Username</csw:DisplayName>
    <csw:Description>Http Basic Auth Username</csw:Description>
    <csw:DefaultValue>
    <csw:Absolute>USERNAME</csw:Absolute>
    </csw:DefaultValue>
    </csw:PropertyDefinition>
    <csw:PropertyDefinition name="httpBasicAuthPassword" type="string" isRequired="true" displayType="password">
    <csw:DisplayName>Http Basic Auth Password</csw:DisplayName>
    <csw:Description>Password to access Private Key</csw:Description>
    <csw:DefaultValue>
    <csw:Absolute>PASSWORD</csw:Absolute>
    </csw:DefaultValue>
    </csw:PropertyDefinition>
    </csw:PropertyDefinitionSet>
    You then have these get/set methods at the bottom of the class I created.
    public String gethttpBasicAuthUsername() {
    return this._httpBasicAuthUsername;
    public void sethttpBasicAuthUsername(String username) {
    this._httpBasicAuthUsername = username;
    public String gethttpBasicAuthPassword() {
    return this._httpBasicAuthPassword;
    public void sethttpBasicAuthPassword(String password) {
    this._httpBasicAuthPassword = password;
    Then I had this and the properties were available for use.
    public class BasicAuthStep extends AbstractStep {
    private String _httpBasicAuthUsername = null;
    private String _httpBasicAuthPassword = null;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to reference table rows added using addInstance?

    OK, this one's probably quite simple, but I'm at wit's end . . . .
    I have a table with body rows that can be added using addInstance.  what I can't figure out is how to reference the newly added rows and teh fields within them.  If the row reference for the inital row before addInstance is:
    Table.Row1.CellName before the addInstance, after the addInstance wouldn't it be Table1.Row1[0].CellName and the newly added row be Table1.Row[1].CellName?  I try that and the debugger tells me that Table1.Row1[1].CellName has no properties.
    I basically need to determine whether the user has filled out anything in the added rows and I'm having a devil of time figuring out how to reference the added rows and their cells.  Thanks in advance!

    Your logic is correct but to reference that som expression you woudl have to use this notation:
    xfa.resolveNode("Table1.Row[1].CellName").method or property
    The reason for this is the use of the square brackets. Javascript interprets this an an array. When you use the resolveNode method you can pass a string and hence the square brackets get interpretted correctly.
    Paul

  • How to reference objects with same name?

    Probably another easy one, but again, couldn't find the answer in old discussions...
    I have some objects with the same name on my form. Designer has made them unique by making an array out of them...object[0], object[1], object[2] etc. How can I reference the individual objects in javascript?  I tried the obvious by referencing them as an array, but to no avail.  I suppose it'd be just as easy, if not better, to just have unique names, but in this case, the objects are related and having them in an array would be handy.

    You can try like below.
         var oObject = xfa.resolveNode("Object[1]");
         xfa.host.messageBox("" + oObject.rawValue);
    Thanks
    Srini

  • How to use an if statement in javascript code

    Hello,
    I have a batch processing script to search for text "employee signature" on each page in a multiple page file and to then list in the console any pages that do not have the "Employee Signature" text included.
    The script is not yet functional as an if statement needs to be included.
    Can anyone please advise how to use an if statement in javascript code?
    var numpages = this.numPages;
    for (var i=0; i < numpages; i++)
    search.query("Employee Signature", "ActiveDoc");
    console.println('Pages that do not include an employee signature: ' + this.pageNum +' ');
    Any assistance will be most appreciated.

    Thank you very much for your assistance try.
    I have modified the code as suggested and the page numbers are now listing correctly, thank you, but....................,
    The console  lists every page as having an "employee signature" when there are pages in the document that do not have an employee signature.
    The code (revised as follows) is not processing the "getPageNthWord part of the statement" in the console report?
    Can you please advise where the code needs reworking?
    var ckWords; // word pair to test
    var bFound = false; // logical status of found words
    // loop through pages
    for (var i = 0; i < this.numPages; i++ ) {
       bFound = false; // set found flag to false
       numWords = this.getPageNumWords(i); // number of words on page
       // loop through the words on page
       for (var j = 0; j < numWords; j++) {
          // get word pair to test
          ckWords = this.getPageNthWord(i, j) + ' ' + this.getPageNthWord(i, j + 1); // test words
          // check to see if word pair is 'Employee' string is present
          if ( ckWord == "Employee") {
             bFound = true; // indicate found logical value
             console.println('Pages that includes an employee signature: ' + (i + 1) +' ');
             break; // no need to further test for this page
          } // end Employee Signature
       } // end word loop
       // test to see if words not found
       if(bFound == false) {
             console.println('Pages that do include an employee signature: ' + (i + 1) +' ');
        } // end not found on page  
    } // end page loop
    Thank you

  • How to get the value from a JavaScript and send the same to Java file?

    Hi.
    How to get the value from a JavaScript (this JS is called when an action invoked) and send the value from the JS to a Java file?
    Thanks and regards,
    Leslie V

    Yes, I am trying with web application.
    In the below code, a variable 'message' carries the needed info. I would like to send this 'message' variable with the 'request'.
    How to send this 'message' with and to the 'request'?
    Thanks for the help :-)
    The actual JS code is:
    function productdeselection()
    var i=0;
    var j=0;
    var deselectedproduct = new Array(5);
    var message = "Are you sure to delete Product ";
    mvi=document.forms[0].MVI;
    mei=document.forms[0].MEI;
    lpi=document.forms[0].LPI;
    if(null != mvi)
    ++i;
    if(null != mei )
    ++i;
    if(null != lpi)
    ++i;
    if(null != mvi && mvi.checked)
    deselectedproduct[++j]="MVI?";
    if(null != mei && mei.checked)
    deselectedproduct[++j]="GAP?";
    if(null != lpi && lpi.checked)
    deselectedproduct[++j]="LPI?";
    if( 0!=j)
    if(i!=j)
    for (x=0; x<deselectedproduct.length; x++)
    if(null != deselectedproduct[x])
    message =message+ "-" +deselectedproduct[x];
    alert(message);
    else
    //alert(" You cannot remove all products!");
    return false;
    return true;
    }

  • How to reference the Parent view Object attribute in Child View object

    Hi , I have the requirememt to generate Tree like struture to display Salary from joining date to retirement date in yearly form.I have writtent two Pl/SQL function to return parent node and child nodes(based on selected year).
    1.First function --> Input paramter (employee id, retirement date , joining date) --> return parent node row with start_date and end_date
    2. 2nd function --> input paarmter(employee id, startDate, end_date) --> return child node based on selected parent node i.e. start date and end date
    I have created two ADF view object based on two function return
    Parent Node --> select * from Table( EUPS.FN_GET_CONTR_SAL_BY_YR(employeeId,retirement Date, dateOf joining)) ;
    Child Node --> select * FROM TABLE( EUPS.FN_GET_CONTR_SAL_FOR_YEAR( employeId,startDate, endDate) ) based on selected parent node.
    I am giving binding variable as input for 2nd function (child node) . I don't know how to reference the binding variable value in child view from parent view.
    Like I have to refernce employeId,startDate, endDate values in 2nd function from parent view object. some thing like parentNode.selectedStart_date parentNode.employeeId.
    I know we can achive this writing the code in backing bean.But i want to know how can we refernce parent view object attribute values in child view object using Groovy or otherway?
    I will appreciate your help.
    Thanks

    I have two view com.ContractualSalaryByYearlyView for Parent Node and com.ContractualSalaryByYearlyView for child Node.
    I have created view link(ContractualSalYearlyByYearViewLink) betweem two view by giving common field empId, stDate , endDate.(below is the view link xml file).
    I tried give the binding attribute values using parent object reference like below in com.ContractualSalaryByYearlyView xml file but getting error
    Variable ContractualSalaryByYearlyView not recognized.I think i am using groovy expression.
    Thanks for quick response.
    com.ContractualSalaryByYearlyView xml
    <ViewObject
    <DesignTime>
    <Attr Name="_isExpertMode" Value="true"/>
    </DesignTime>
    <Variable
    Name="empId"
    Kind="where"
    Type="java.lang.Integer">
    <TransientExpression><![CDATA[adf.object.ContractualSalaryByYearlyView.EmpId]]></TransientExpression>
    </Variable>
    ContractualSalYearlyByYearViewLink.xml file
    <ViewLinkDefEnd
    Name="ContractualSalaryByYearlyView"
    Cardinality="1"
    Owner="com.ContractualSalaryByYearlyView"
    Source="true">
    <DesignTime>
    <Attr Name="_finderName" Value="ContractualSalaryByYearlyView"/>
    <Attr Name="_isUpdateable" Value="true"/>
    </DesignTime>
    <AttrArray Name="Attributes">
    <Item
    Value="com.ContractualSalaryByYearlyView.EmpId"/>
    <Item
    Value="com.ContractualSalaryByYearlyView.StDate"/>
    <Item
    Value="com.ContractualSalaryByYearlyView.EndDate"/>
    </AttrArray>
    </ViewLinkDefEnd>
    <ViewLinkDefEnd
    Name="ContractualSalaryForYearView"
    Cardinality="-1"
    Owner="com.ContractualSalaryForYearView">
    <DesignTime>
    <Attr Name="_finderName" Value="ContractualSalaryForYearView"/>
    <Attr Name="_isUpdateable" Value="true"/>
    </DesignTime>
    <AttrArray Name="Attributes">
    <Item
    Value="com.ContractualSalaryForYearView.EmpId"/>
    <Item
    Value="com.ContractualSalaryForYearView.StDate"/>
    <Item
    Value="com.ContractualSalaryForYearView.EndDate"/>
    </AttrArray>
    </ViewLinkDefEnd>

  • How can I access xml document from javascript whithin a JSP page

    how can I access xml document from javascript whithin a JSP page?
    I have a JSP that receives an XML document from a JavaBean, so I can access it within the entire JSP, but I need to access it from the javascript inside the JSP... and I have no idea how i can do this.
    Thanks in advance!

    The solution would only work on MS IE browsers, as other browsers do not support an XML DOM.
    It can be done, but you would be stuck with using the Microsoft broswer. If that is acceptable, I have some example code, and a book recommendation.

  • How to call a bean method from javascript event

    Hi,
    I could not find material on how to call a bean method from javascript, any help would be appreciated.
    Ralph

    Hi,
    Basically, I would like to call a method that I have written in the page java bean, or in the session bean, or application bean, or an external bean, from the javascript events (mouseover, on click, etc...) of a ui jsf component. I.e., I would like to take an action when a user clicks in a column in a datatable.
    Cheers,
    Ralph

  • How to reference a user parameter in program unit

    I tried to define a user parameter in Oracle Report 6i and I could reference it (&p_where_clause) in the main query but I failed to reference it in one of the program units. Here is the logic:
    function CF_OTHER_COURSESFormula return Char is
    cnt           number;
    priority     number;
    class_code     varchar2(8);
    oc           varchar2(100) := null;
    cursor oc_cur is
    select class_code, branch_priority
    from nominations n, employments e
    where n.hkic_no = e.hkic_no
    and e.staff_status_code = 'EMP'
    and &p_where_clause --> contain "n.course_code in ('A','B','C')"
    and n.hkic_no = :hkic_no
    and n.class_code != :class_code;
    begin
    cnt := 1;
    open oc_cur;
    loop
    fetch oc_cur into class_code, priority;
    if oc_cur%notfound then
         exit;
    end if;
    if cnt = 1 then
    oc := oc||class_code||'('||priority||')';
    else
    oc := oc||', '||class_code||'('||priority||')';
    end if;
    cnt := cnt + 1;
    end loop;
    close oc_cur;
    return oc;
    exception
    when no_data_found then      
    return '';
    end;
    Does anyone tell me how to reference it in program unit? Does Oracle Reports 6i support this operation?

    There hasn't been any changes to the way lexicals and bind variables work in Reports between 2.5 and 6i. There are different versions of PL/SQL and you might be hitting some problem here.
    In your case, you shouldn't be using the query lexical "&p_where_clause" just the PL/SQL bind variable syntax ":p_where_clause". Since you're creating a PL/SQL cursor, you should probably use dynamic sql creation with a concatenation of the where clause to build up the SQL for the cursor. Check out the PL/SQL documentation for 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

Maybe you are looking for

  • Allowing end users to build search queries?

    We have several large document libraries that have a significant amount of metadata columns tied to them. I'd like to create away for users to build queries based on those columns. I'm picturing a page that displays all of the properies for a given l

  • How to make files written to the workbench server visible

    Hi All, I am using dotnet proxyclass to access livecycle server . I am using 'WriteResource' method of liveCycle to write files to the Workbench server.The files are successfully written to the server and I am able to see the files through 'ListMembe

  • Reading the context of Excel File

    Dear Experts I want to read the content of excel file that is avaliable in my desktop, I want to use file upload UI Element to pick the file. Please help me with sutiable code Regards Noel

  • Help for an Oracle Newbie???

    Hi there, Sorry for probably a ridiculously stupid question but my boss has asked me to ask on here! Here goes - We have a network with around 100 users. Previously we have used MS Access to report on our database, the users then logged into Access R

  • How to embed printer profile for professional lab

    I am a professional photographer and I send my jpegs out to a lab (BayPhoto) to be printed. The lab has developed a printer profile that should be used when preparing the jpegs they print so they will look the same on my monitor as the resulting prin