This is example for dynamic script in jsp (to coimbatore) author

hai
coimbatore
me send ur doubts..
i forgot to put urs in watch list.. so i cant find where u post.. so i post newly .. sorry of inconvinence..
<%@page import="java.lang.*,java.sql.*" language="java" session="true" %>
<%@include file="dbconnect.txt" %>
<%!
String lname;
int i;
%>
<html>
<head>
<script language="javascript">
function enabletext(i)
//document.x.t+i+.disabled=false;
//alert (i); //document.x.c1.value);
</script>
<body>
<form name="x" method="get" action="#">
<table border="3" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="50%" align="center">
<tr bgcolor="#FFFF00">
<th> name </th>
<th>address </th>
</tr>
<%
i=0;
rs=stmt.executeQuery("select * from emp");
while(rs.next())
lname=rs.getString(1);
out.println("<tr><td> <input type='checkbox' name='c"+ i +"' value='" + i +"' onClick='document.x.t"+ i +".disabled=true;'> <br> " + lname + "</td> <td><textarea name='t" + i + "' cols='10' rows='2' disabled>"+ rs.getString(2) +" </textarea> </td> </tr>");
i++;
%>
</table>
</font>
<br>
<center> <input type="submit" value="go"> </center>
</form>
</body>
<%@include file="dbdisconnect.txt" %>
</html>

Thanks for ur reply..

Similar Messages

  • Need code example for dynamicly changing UI Propertey

    Hello,
    Can someone show me a simple code example that does the following:
    A view which contains a button and a label.
    Each press on the button changes the color (or other visible property) of the label.
    But note: Don't bind the property to the Context for that, I want to do it through the doModifyView method.

    hi Roy Cohen,
    I think u r not looking for the visibility property they have mentioned.
    I think u r looking for a procedure to change the way the element looks..is it..
    The problem is if u want any change to be visible when the button is pressed u can only change the length or the width.There is no option to change the semantic color or whatever.
    To change the size u can try this code
    IWDInputField in = (IWDInputField)view.getElement("<element name>");
    in.setWidth(some value which is set when the button is pressed);
    Is this wat u r looking for?
    Jus mention it if there is something  else.
    Regards
    Bharathwaj

  • What incorrect syntax found in this query for dynamic search

    I make this stored procedure for dynamic search by date from date to employee no employee name
    but it give me error why
    Create proc CollectsearchData15
    @StartDate datetime,
    @EndDate datetime,
    @EmployeeID NVARCHAR(50),
    @EmployeeName nvarchar(50)
    as
    Begin
    DECLARE @SQLQuery as nvarchar(max)
    SET @SQLQuery = N'SELECT * from ViewEmployeeTest Where (1=1)'
    If @StartDate Is Not Null
    SET @SQLQuery = @SQLQuery + N' And (joindate >= @StartDate)'
    If @EndDate Is Not Null
    SET @SQLQuery = @SQLQuery + N' And (joindate <= @EndDate)'
    If @EmployeeID Is Not Null And @EmployeeID != ''
    SET @SQLQuery = @SQLQuery + N' And (EmployeeID = @EmployeeID)'
    If @EmployeeName Is Not Null And @EmployeeName != ''
    SET @SQLQuery = @SQLQuery + N' And (DriverName Like ''%'' + @EmployeeName + ''%'')'
    Print @SQLQuery;
    Exec sp_executesql @SQLQuery,
    N'@StartDate datetime, @EndDate datetime, @EmployeeID nvarchar(50), @EmployeeName nvarchar(50)',
    @StartDate, @EndDate, @EmployeeID, @EmployeeName;
    but it give me this error why
    Msg 102, Level 15, State 1, Procedure CollectsearchData15, Line 28
    Incorrect syntax near ';'.

    I think you are missing an END. Perhaps with no dynamic sql :
    SELECT * from ViewEmployeeTest
    WHERE
    (joindate >= @StartDate OR @StartDate IS NULL)
    AND
    (joindate <= @EndDate OR @EndDate IS NULL)
    AND
    (EmployeeID = @EmployeeID OR @EmployeeID IS NULL)
    AND
    (DriverName Like '%' + @EmployeeName + '%' OR @EmployeeName IS NULL)
    Thanks and regards, Rishabh K
    Please keep in mind that this might cause proc to generate bad plans
    http://sqlinthewild.co.za/index.php/2009/03/19/catch-all-queries/
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Any example for Timed ShellScript Discovery with PowerShell Discovery Probe?

    Hi all,
    Kris Bash provided a unix authoring library with many examples for dynamic discoveries for Unix/Linux (Unix/Linux Authoring
    Library). What I am missing here is a timed shell script discovery, using a powershell discovery probe for creating discovery data. There is only a PropertyBag Discovery available.
    Maybe one of you has already implemented such a discovery and can provide this as an example? I tried some things but so far it is not working.
    The idea behind this is to execute a shell script on a linux host that returns several lines. The output should then be parsed by a powershell script that - depending on the output - creates different class instances. Any ideas?
    Regards,
    Holger

    Holger,
    See the blog post here (http://operatingquadrant.com/2011/03/24/operations-manager-%e2%80%93-extending-unixlinux-monitoring-with-mp-authoring-%e2%80%93-part-iii/)
    for an example of using the PowerShellDiscoveryProbe.  It doesn't matter whether this follows a Shell Command or a Shell Script probe, as in both cases you are passing the StdOut output as a parameter to the PowerShell script.  You would parse StdOut
    just as you do in the PropertyBag examples, but use the MOMApi calls to create and return the class instances and properties.
    I hope this helps,
    Kris
    www.operatingquadrant.com

  • Error in User defined function for dynamic file naming

    Hi,
    While creating User Defined function with this following code for dynamic fieldname
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String ourSourceFileName = conf.get(key);
    return ourSourceFileName;
    which options should i select for cache Value, Context, Queue
    for Augument , what name shd i mention.
    Regards,
    Varun

    Hi Varun,
    I guess I have answered a similar question just a few minutes before on very similar post from you. Just pasting the same here .................
    Are you trying to access the ASMA values from the SOAP header of the XI message for the source file name?
    First of all you need to Set the Sender File Adapter for Set ASMA and then file name. So it will work fine when you actually run the scenario end to end.
    But in the mapping tool when you test the mapping - there is not message header updated with the actual source filename - and whenever you try to read the FileName attribute in the message header from the UDF - it cannot find the object and returns a NullPointerException.
    I would suuggest for your mapping tool testing to be successful, have a check in the java code for null values,
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String ourSourceFileName = conf.get(key);
    If (ourSourceFileName != null)
       Return ourSourceFileName;
    Return "NoFileName.txt";
    Let us know if this works.
    Regards,
    Suddha

  • Help required in changing to str for dynamic sql

    Hi
    I am trying to make this to string for dynamic sql, this is a part of the sql which is giving problem with p_..as parameters from proc. Help me in this , iam also seeing dbms _output but stil unable to format it to required error free string.
    || ' AND ( po.abbreviationprojectopportid LIKE '
    || '%'
    || 'NVL'
    || '('
    || p_opp_code
    || ', ''NULL'')'
    || '%'
    || ' OR co.companyname LIKE '
    || '%'
    || 'NVL'
    || '('
    || p_client_name
    || ', '' NULL'')'
    || '%'
    || ' OR le.line_item_amount = NVL '
    || ' ('
    || p_booking_amt
    || ', -0.197) '
    || 'OR po.dealcurrency = NVL '
    || '('
    || p_currency
    || ',''NULL'')'
    || 'OR be.booking_entry_id LIKE '
    || '%'
    || 'NVL ('
    || p_entry_id
    || ',''NULL'')'
    || '%'
    || ' OR le.line_item_id LIKE '
    || '%'
    || 'NVL ('
    || p_line_item
    || ',''null'')'
    || '%'
    || ' OR be.ticket_num LIKE '
    || '%'
    || 'NVL ('
    || p_ticket_num
    || ',''NULL'')'
    || '%'
    || ' OR be.updatedby LIKE '
    || '%'
    || 'NVL ('
    || p_user_name
    || ',''NULL'')'
    || '%'
    || ' OR credittransaction.acct_code ='
    || 'NVL ('
    || p_gl_account
    || ','
    || '-0.197)'
    || 'OR debittransaction.acct_code ='
    || 'NVL ('
    || p_gl_account
    || ', '
    || '-0.197) '
    || 'OR credittransaction.profit_ctr_code ='
    || 'NVL ('
    || p_profit_center
    || ','
    || ' -0.197)'
    || 'OR debittransaction.profit_ctr_code ='
    || 'NVL ('
    || p_profit_center
    || ','
    || '-0.197)'
    || ' OR le.sap_posting = NVL ('
    || p_sap_posting
    || ',''$'')'
    || 'OR cmis.cmis_code = NVL ('
    || p_cmis_nominal
    || ','' -0.197)'
    || 'OR sa.sap_code = NVL ('
    || p_sap_booking_entity
    || ', -0.197)'
    || ' OR (be.booking_date BETWEEN '
    || v_booking_date_from
    || 'AND '
    || v_booking_date_to
    || ')'
    || ' )'
    || 'ORDER BY '
    || p_sort_by
    || ' '
    || p_order;

    some errors.. Try this...
    ' SELECT be.booking_date bookingdate, '
    || ' be.booking_entry_id entryid, le.line_item_id itemid,'
    || ' po.abbreviationprojectopportid opportunitycode,'
    || ' co.companyname clientname, '
    || ' le.line_item_amount bookingamount,'
    || ' be.ticket_num ticketnum, po.dealcurrency currency,'
    || ' cmis.cmis_code cmis_nominal,'
    || ' sa.sap_code sap_booking_entity,'
    || ' (SELECT full_name '
    || ' FROM iba_employee '
    || ' WHERE TO_CHAR (employeeid) = be.updatedby) updatedby,'
    || ' be.updateddate updateddate, '
    || ' (SELECT le.line_item_amount * rate '
    || ' FROM iba_currencyconversion '
    || ' WHERE tocurrencycd = '
    || 'USD'
    || ' AND currencycd = po.dealcurrency '
    || ' AND conversiondate = be.booking_date) amountusd,'
    || 'debittransaction.acct_code debitglaccount,'
    || ' credittransaction.acct_code creditglaccount,'
    || ' debittransaction.profit_ctr_code debitprofitcenter,'
    || ' credittransaction.profit_ctr_code creditprofitcenter,'
    || ' debittransaction.amt debitamount,'
    || ' credittransaction.amt creditamount'
    || ' FROM rb_booking_entry be, '
    || ' rb_line_item le, '
    || ' rb_booking_period bp,'
    || ' rb_cmis_gl_account cmisgl,'
    || ' rb_cmis_account cmis,'
    || ' iba_projectopportunity po,'
    || ' iba_company co,'
    || ' rb_sap_account sa,'
    || ' (SELECT acctr.line_item_id line_item,'
    || ' sapgl_acc.account_code acct_code,'
    || ' acctr.amount amt,'
    || ' sappr.profit_center_code profit_ctr_code'
    || ' FROM rb_account_transaction acctr,'
    || ' rb_sap_profit_center sappr,'
    || ' rb_sap_gl_account sapgl_acc'
    || ' WHERE acctr.profit_center_id = sappr.profit_center_id '
    || ' AND acctr.gl_account_id = sapgl_acc.gl_account_id '
    || ' AND acctr.transaction_type = ''D'') debittransaction,'
    || ' (SELECT acctr.line_item_id line_item,'
    || ' sapgl_acc.account_code acct_code,'
    || ' acctr.amount amt,'
    || ' sappr.profit_center_code profit_ctr_code '
    || ' FROM rb_account_transaction acctr, '
    || ' rb_sap_profit_center sappr, '
    || ' rb_sap_gl_account sapgl_acc '
    || ' WHERE acctr.profit_center_id =sappr.profit_center_id '
    || ' AND acctr.gl_account_id = sapgl_acc.gl_account_id '
    || ' AND acctr.transaction_type = ''C'') credittransaction '
    || ' WHERE po.projectopportunityid = be.projectopportunityid '
    || ' AND be.booking_entry_id = le.booking_entry_id '
    || ' AND po.companyid = co.companyid '
    || ' AND bp.booking_period_id = be.booking_period_id '
    || ' AND cmis.cmis_id = cmisgl.cmis_id '
    || ' AND le.sap_id = sa.sap_id '
    || ' AND le.cmis_id = cmis.cmis_id '
    || ' AND debittransaction.line_item(+) = le.line_item_id '
    || ' AND credittransaction.line_item(+) = le.line_item_id '
    || ' AND ( po.abbreviationprojectopportid LIKE ' || '''%' || NVL(p_opp_code,'NULL') || '%'''
    || ' OR le.line_item_id LIKE '
    || '''%'
    || NVL (
    || p_line_item
    || ,'null')
    || '%'''
    | ' OR le.line_item_amount = '
    ||NVL(|| p_booking_amt, -0.197)
    || ' OR po.dealcurrency ='
    || NVL(p_currency,'NULL')
    || ' OR be.booking_entry_id LIKE '
    || '''%'
    || NVL (p_entry_id,'NULL')
    || '%'''
    || ' OR be.ticket_num LIKE '
    || '''%'
    || NVL (p_ticket_num,'NULL')
    || '%'''
    || ' OR be.updatedby LIKE '
    || '''%'
    || NVL (p_user_name,'NULL')
    || '%'''
    || ' OR credittransaction.acct_code ='
    || NVL (p_gl_account,-0.197)
    || ' OR debittransaction.acct_code ='
    || NVL (p_gl_account,  -0.197)
    || ' OR credittransaction.profit_ctr_code ='
    || NVL (p_profit_center, -0.197)
    || ' OR debittransaction.profit_ctr_code ='
    || NVL (p_profit_center, -0.197)
    || '  OR le.sap_posting = '
    ||NVL (p_sap_posting,'$')
    || ' OR cmis.cmis_code = '
    ||NVL (p_cmis_nominal, -0.197)
    || ' OR sa.sap_code = '
    || NVL (p_sap_booking_entity, -0.197)
    || '  OR (be.booking_date BETWEEN to_date('''
    || v_booking_date_from
    || ''') AND  to_date('''
    || v_booking_date_to
    || ''')'
    || ' OR co.companyname LIKE '
    || '''%'
    || NVL(p_client_name,'NULL')
    || '%'''
    || ' )'
    || 'ORDER BY  ' || p_sort_by || ',' || p_order;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to create two level dynamic list using JSP , Java Script and Oracle

    I am new in JSP. And i am facing problem in creating two level dynamic list using JSP ,Java Script where the listdata will come from Oracle 10g express edition database. Is there any easy way in JSP that is available on in ASP.NET.
    Plz response with details.

    1) Learn JDBC API [http://java.sun.com/docs/books/tutorial/jdbc/index.html].
    2) Create DAO class which contains JDBC code and do all SQL queries and returns or takes ID's or DTO objects.
    3) Learn Servlet API [http://java.sun.com/javaee/5/docs/tutorial/doc/].
    4) Create Servlet class which calls the DAO class, gets the list of DTO's as result, puts it as a request attribute and forwards the request to a JSP page.
    5) Learn JSP and JSTL [http://java.sun.com/javaee/5/docs/tutorial/doc/]. Also learn HTML if you even don't know it.
    6) Create JSP page which uses the JSTL c:forEach tag to access the list of DTO's and iterate over it and prints a HTML list out.
    You don't need Javascript for this.

  • Web application with RAD tool inside for dynamic JSP building

    I would realize a J2EE Web application based on JSP,Struts and eventually Spring for transaction management and iBatis for data access in my opinion very complex.
    The application presents search, list and detail pages, and the information visibility depends on the user.
    Each edit page could be based on a single page or many tabs, and a tab could contain entity's information or information associated to the entity subject of the page, displayed as list. The informations in editing phase will be controlled by javascript rules.
    A web application administrator will set the information's grants (hidden, readonly, read and write) for each entity managed inside the application.
    Now there is the complication: each page (search, list, detail) must be built by the web application administrator with a configurator/builder directy inside the same web application on the server!
    For example, for a detail page:
    1) each tab must be defined and named: so I can't develop a static number of tabs, in which I managed a fixed set of data inside each of these tabs. I must develop a page with all the entity's fields and all the rules, and then the web application administrator set which informations must be available for each tab from the same page detail developed. The tabs in which there's a list could be displayed or not, and the data in the list follow the grants setted by the web application administrator.
    2) the web application administrator can specify all the data inside a tab: every tab will be built indicating which fields show or edit if the user has the grants. For example for entity1, we could define a detail page for user1 with field1, field3 and field2, while for user2 we could define the detail page with tab1 within field2, and a second tab, tab2 within field3.
    3) the web application administrator can specify the layout inside the tab, indicating the pixel position inside the tab, or the application could provide a visual tool, in HTML, in which there is a design area, and in which the web application administrator clicks in a point and positions in it an information, and even specify the style's properties (color, font, background,...)
    4) the application must provide to the users the possibility to define new fields for an entity, and must manage them adding in whichever tab for that entity. For such informations will be possible only management without controls except the controls of type (data, int, money, ...)
    In my opinion point 3 I think it's part of a report tool and not of detail visualization; moreover all the styles of a page must be personalized, not only the informations contained inside the tabs. I think the only solution in a highly configurabile application is to show the search/detail fields 1 for row, and not with a positioning based on pixel coordinates or positioning with a RAD tool.
    I ask to you:
    - have you ever seen or realized web application that they supply application design tools within the same application, realized in HTML+Javascript?
    - is realizable this kind of application?
    - ...any suggestion to supply for proceeding?
    Honestly my ideas are to realize points 1 and 2; I suppose point 3 is not feasible and that the result of the styles customization is little appropriated; for point 4 I suppose to simplify the management of new data by managing all the new ones inside the same tab, or I will have to think another possible solution...
    Thanks to everyone has interesting ideas or suggestions to give.

    have you ever seen or realized web application that they supply >application design tools within the same application, realized in >HTML+Javascript? Yes, Oracle HTML DB is one such purchasable off the shelf :)
    is realizable this kind of application? I would think so - yes. It requiresa good team - 4 or 5 developers with excellent jsp/servlet knowledge :)
    - ...any suggestion to supply for proceeding? Such kind of functionality is achievable only in 1 way-DB, always. You would store the information for each entity and the permissions for each attribute of that entity per user in the db. You can consider having roles (teams), assign permissions to the roles and then add users to the roles so that they inherit the permissions. You should be able to ovderride the permissions per individual user too.
    I would say you first plan this out in a piece of paper, convert it into relationships in the db. Implementing the jsp solution is by far the easist (& tedious :)), IMO
    ram.

  • FOR XML to generate dynamic script to drop multiple tables

    Log_Table has a column named Col1 where we have table names
    Col1
    TableA1
    TableA2
    TableA3
    TableB1
    TableC1
    TableC2
    Generate dynamic script to drop tables that are in Log_Table and starts with TableA.
    Instead of using the loop, use For XML

    Thanks Visakh16 [+1],
    you are right there was typo mistake :-) I forgot the variable in the end, and Thanks Naomi [+1],
    this is true and better to use quotename or just add brackets. Actually I will not choose this approach since we chould use schema as well. the DDL in the OP is not something that I will create probably.
    In any case, here is the fixed query (current approach):
    declare @SQLString NVARCHAR(MAX)
    SELECT
    @SQLString = (select
    N'IF OBJECT_ID (N''' + CAST([Col1] AS VARCHAR(MAX)) + N''') IS NOT NULL drop table [' + CAST([Col1] AS VARCHAR(MAX)) + N']; '
    FROM Log_Table
    WHERE (Col1 like 'TableA%')
    FOR XML PATH (''))
    --print @SQLString
    EXECUTE sp_executesql @SQLString
    GO
      Ronen Ariely
     [Personal Site]    [Blog]    [Facebook]

  • Dynamic Scripting for Call Center Surveys

    Hi All,
    I need to create dynamic scripting for Call Centres. Any idea how dynamic scripting can be done.
    Thanks a lot.
    Amiga

    Hi Raja,
    Basically, there should be a provision to create/modify a transaction and questions based on the response provided. So if a question is asked in a survey and the response is "Yes", the next question should be different to the one for a "No" answer. Similarly there should be a provision to create actions based on responses.
    Hope this makes it a bit clearer.
    Thanks
    Amiga

  • Help With dynamic scripting for Dervied Property

    Hi,
    I am trying to get the the list of child nodes and then loopthorugh those nodes to do some calculation in a derived propety using dynamic scripting. I tried with below script.
    var childEnumerator = node.GetChildEnumerator();
    while(childEnumerator.MoveNext())
        var propValue = childEnumerator.GetCurrent().PropValue("Custom.Salary");
        print(propValue);
    While Evaluating this script I am getting below mentioned error. Any idea what i am missing here?
    DRM-16008: There was an error calculating Script property Custom.TotalSalaryExp for EMP_Zone/Emp/PPD1: TypeError: 'GetChildEnumerator' is not a function
    Please help me out. thanks fr your co-operation
    Regards,
    Sudipta

    Try this instead...
    var childEnumerator = node.GetChildEnumerator();
    childEnumerator.MoveNext();
    while(childEnumerator.GetCurrent() != null)
        var propValue = childEnumerator.GetCurrent().PropValue("Custom.Salary");
        print(propValue);
    childEnumerator.MoveNext();

  • Mapviewer svg jsp - example for enableFeatureSelect ?

    hi,
    can anybody give me a simple example for enableFeatureSelect/getSelectedIdList (or even for enablePolygonSelect to get some highway-id's)? in the demo mapinit.jsp with svg you can zoomin and recenter.
    i want to create a new radio button for clicking on the svg and not to zoomin or recenter, but for selecting and highlighting a county.
    how can i select a county so it changes its color and i can get the id for this county?
    greetings
    thomas

    There is a SVG Territory Manager Demo that comes with MapViewer that can be downloaded from OTN. It alows you to select a county on the map and it uses the enableFeatureSelect and getSelectedIdList functioins. If you have not downloaded the latest 10.1.2 mapviewer and the demo data, you can download it from here, http://www.oracle.com/technology/software/products/mapviewer/index.html.
    Basically you need to do the following things to make it work.
    1. In the XML base map definition, set "selectable_in_svg" attribute and onclick function for the theme on which you want feature selection to be enabled . Here is an example,
    <?xml version="1.0" standalone="yes"?>
    <map_definition>
    <theme name="STATES" min_scale="50.0" max_scale="4.0"/>
    <theme name="COUNTIES" min_scale="4.0" max_scale="0.0" min_dist="0.5" selectable_in_svg="true" onclick="selectCounty"/>
    <theme name="STATES_LINE" min_scale="4.0" max_scale="0.0"/>
    <theme name="HIGHWAYS" min_dist="1.0"/>
    <theme name="CITIES" min_scale="1.2" max_scale="0.0" />
    </map_definition>
    2. Define the onclick javascript function in your jsp/html page where the svg map is embedded. For example, if you have created a base map using the sample XML shown above, you should define a javacript function called "selectCounty" to handle the mouse click event when the feature is clicked. Inside this javascript function, you can call getSelectedIdList to get the id of the clicked feature.
    3. In your jsp/html page, call javascript function enableFeatureSelect to enable single feature selection.

  • JSP example for Tree requirement

    hi, I can find many Java application example about the Tree in the internet, does any one know where I can find an example for show out a Tree in JSP?
    Regards

    There is a SVG Territory Manager Demo that comes with MapViewer that can be downloaded from OTN. It alows you to select a county on the map and it uses the enableFeatureSelect and getSelectedIdList functioins. If you have not downloaded the latest 10.1.2 mapviewer and the demo data, you can download it from here, http://www.oracle.com/technology/software/products/mapviewer/index.html.
    Basically you need to do the following things to make it work.
    1. In the XML base map definition, set "selectable_in_svg" attribute and onclick function for the theme on which you want feature selection to be enabled . Here is an example,
    <?xml version="1.0" standalone="yes"?>
    <map_definition>
    <theme name="STATES" min_scale="50.0" max_scale="4.0"/>
    <theme name="COUNTIES" min_scale="4.0" max_scale="0.0" min_dist="0.5" selectable_in_svg="true" onclick="selectCounty"/>
    <theme name="STATES_LINE" min_scale="4.0" max_scale="0.0"/>
    <theme name="HIGHWAYS" min_dist="1.0"/>
    <theme name="CITIES" min_scale="1.2" max_scale="0.0" />
    </map_definition>
    2. Define the onclick javascript function in your jsp/html page where the svg map is embedded. For example, if you have created a base map using the sample XML shown above, you should define a javacript function called "selectCounty" to handle the mouse click event when the feature is clicked. Inside this javascript function, you can call getSelectedIdList to get the id of the clicked feature.
    3. In your jsp/html page, call javascript function enableFeatureSelect to enable single feature selection.

  • How can i  apply this  java program for  a jsp page?

    import java.io.*;
    import java.util.*;
    public class FileProcessing
      //create a vector container  for the input variables
         Vector variables = new Vector();
      //create a vector container for the constants
         Vector constants = new Vector();
      /*create a string expression container for the equation
         as read from the file */
         String expression = " ";
      //create double result container for the final result
         double result = 0;
         public boolean processFile(String filename,String delim)
          //index for values vector
              int num_values = 0;
          //index for constants vector
              int num_constants = 0;
          //current line being read from the external file.
              String curline = " ";
          //start reading from the external file
              try
                   FileReader fr = new FileReader(filename);
                   BufferedReader br = new BufferedReader(fr);
                   while(true)
                        curline = br.readLine();
                        if(curline == null)
                             break;
                    //determine the type of current interaction
                        boolean variable = curline.startsWith("input");
                        boolean constant = curline.startsWith("constant");
                        boolean equation = curline.startsWith("equation");
                        boolean output = curline.startsWith("result");
                   //on input variables
                        if(variable)
                          StringTokenizer st = new StringTokenizer(curline,delim);
                          int num = st.countTokens();
                          int count=0;
                          while(st.hasMoreTokens())
                               String temp = st.nextToken();
                               if(count==1)
                                    byte b[]= new byte[100];
                                    System.out.println(temp);
                                    System.in.read(b);
                                    String inputval = (new String(b)).trim();
                                    variables.add(num_values,inputval);
                                    num_values++;
                               count++;
                        // on constant values
                        if(constant)
                             StringTokenizer st = new StringTokenizer(curline,delim);
                             int num = st.countTokens();
                             int count = 0;
                             while(st.hasMoreTokens())
                                  String temp = st.nextToken();
                                  if(count==1)
                                       byte b[]= new byte[100];
                                       System.out.println(temp);
                                       System.in.read(b);
                                       String cons = (new String(b)).trim();
                                       constants.add(num_constants,cons);
                                       num_constants++;
                                  count++;
                        // on equation
                        if(equation)
                             StringTokenizer st = new StringTokenizer(curline,delim);
                             int num = st.countTokens();
                             int count = 0;
                             while(st.hasMoreTokens())
                                  String temp = st.nextToken();
                                  if(count==2)
                                       this.expression = temp;
                                  count++;
              // now we are ready to evaluate the expression
                       if(output)
                          org.nfunk.jep.JEP  myparser= new org.nfunk.jep.JEP();
                          myparser.setAllowAssignment(true);
                          for(int i=1;i<variables.size()+1;i++)
                             String name = "arg"+Integer.toString(i);
                             myparser.addVariable(name,new Double(variables.get(i-1)
                                                .toString()).doubleValue());
                          for(int i=1;i<constants.size()+1;i++)
                               String name = "arg" +Integer.
                                         toString(i+variables.size());
                               myparser.addConstant(name,new Double(constants.get(i-1).toString()));
                   //output is obtained as follows
                          myparser.parseExpression(expression);
                          result = myparser.getValue();
                          System.out.println("Assay value: "+result);
              catch(Exception e)
                   System.out.println(e.toString());
              return true;
         public static void main(String[] args)
              FileProcessing fp = new FileProcessing();
              fp.processFile("input.eqn",":");
    }//my text file name is: "input.eqn" (given below)
    input:Enter Value1:arg1
    input:Enter Value2:arg2
    input:Enter Value3:arg3
    constant:arg4
    constant:arg5
    Equation:arg1+arg2+arg3
    result:

    how can i apply this java program for a jsp pagewhy do you want to do this ?
    Your program reads from a file on the disk and formats based on a patterm.
    Jsp is not intended for such stuff.
    ram.

  • I recently start using Firefox panorama. If I create a tab group that contains, for example, my favorite stack exchange websites, can I save ("bookmark") this tab group for easy access if I start a new session?

    <blockquote>Locking duplicate thread.<br>
    Please continue here: [/questions/813855]</blockquote><br>
    I recently start using Firefox panorama. If I create a tab group that contains, for example, my favorite stack exchange websites, can I save ("bookmark") this tab group for easy access if I start a new session?

    You can bookmark all those tabs and place them in a folder.
    * "Bookmark This Page" and "Bookmark All Tabs" no longer show in the Bookmarks menu unless you open the Bookmarks menu via the keyboard (Alt + B).
    * "Bookmark All Tabs" can be accessed via the right-click context menu of a tab on the tab bar.

Maybe you are looking for

  • Creation of New Default Rule in OPL8

    Hi, In TC : OPL8, in cost accounting tab we maintain the default rule. Can we create our own default rule? The issue is we are using the CO-Product scenario in IS MILL. There the two default rules are PP5 and PP6. Both are Full settlement type. But a

  • How can I restore a document/file to my iPad from the iCloud backup without restoring the whole device from the iCloud backup?

    My iPad has a number of documents, including pdf, xls, doc, ppt files.  Some are associated with Documents to Go - Premium, which froze on the device attempting to download an update and had to be deleted (which also deleted the files that only were

  • Receiver SOAP adapter SSL error - client certificate required?

    Hi all, Problem configuring SSL in XI 3.0 NW04 SP17.... I have followed the config steps from Rahul's excellent weblog at <a href="/people/rahul.nawale2/blog/2006/05/31/how-to-use-client-authentication-with-soap-adapter">How to use Client Authenticat

  • Dataloading Shortdump

    hai Im trying to load the data from ODS to InfoCube . But im getting the shortdump like below <b>Short dump in the Warehouse Diagnosis The data update was not completed. A short dump has probably been logged in BW providing information about the erro

  • Java installation under Linux

    Hi I've got a problem with the installation of somme Java Packages under Linux. What must I do with the "*.jar" file? I wont to install the neu Open Xchange Server under SuSE 9.1, but there are somme Problems with the Java Packages! Can someone help