**URGENT** No getter method for property searchText of bean org.apache.stru

I'm implementing a query page as described in the HowTo ADF_ComplexMasterDetail.zip
When running the query page, I'm receiving the error:
javax.servlet.jsp.JspException: No getter method for property searchText of bean org.apache.struts.taglib.html.BEAN
I have my searchEmployees writen and 'exposed' (at least I can see it in the Data palette). But seems like something is missing, and can't find this searchText beam property specified in the html:text tag.
Can someone help in this one?
Here is the Help description inside the HowTo example:
Section 3
queryEmployees
queryEmployeesInDept provides an interface for entering a simple search criteria for querying a list of
employees. This does not use the Find mode Query By Example functionality that the other query screens
use, but rather presents a much simpler search interface. The actual search is carried out using a
function
searchEmployees that the underlying view object exposes. (See the EmployeesView view object in the
model project)
1. Drop a new Data Page onto the page flow diagram call it queryEmployees
2. In the page flow diagram, drag the searchEmployees operation from the AllEmployeesView
collection in the Data Control Palette and drop it on top of the new Data Page. This will cause the
framework to run a search whenever the page is called.
3. In the Structure pane, locate the queryEmployees node and expand it, select the child node
paramNames[0], and change it's value attribute to ${param.searchText}. This will pass the URL
parameter searchText on to the business method to qualify the query.
4. Drill down into the page and expand the Data Control Palette to select the AllEmployeesView
collection. Set the Drag and Drop as: list to Read-OnlyTable. Then drag the collection onto the page.
This will create a tabular containing the query results.
5. Select the Struts HTML component palette and drag a Form onto the page above the output table. Set
the handling action to this Data Page (queryEmployees.do)
6. Drag a text field from the component palette inside of this new form. Set the property attribute of
the
<html:text> tag to searchText (the same value you used in the paramNames[0] for the Data Page)
7. Create a new submit button in the form to submit the search. Set the property attribute of the button
to
event_search.
8. Finally we need to subclass the data page to prevent the search action from being fired when it is not
appropriate for the page ( for instance when we first display it). To do this we need to Go to Code on
the Data Page's context menu, and override the invokeCustomMethod() method:
* We only want to invoke the custom method i.e. the call to change
* the Where clause on the collection, if the Action has been called with
* a search event on the page with a search term supplied.
* If the user got here via a link or another event, we bypass the model call
* unless a URL parameter event=search is supplied, in which
* case the method will also be called.
protected void invokeCustomMethod(DataActionContext actionContext)
List events = actionContext.getEvents();
// If the event is "search" do the custom event call
if ((events != null) && (events.contains("search")))
String searchTerm = (String)((DynaActionForm)actionContext.getActionForm())
Get("searchText");
if (searchTerm != null)
super.invokeCustomMethod(actionContext);
}

Solved with Oracle JDeveloper HowTo:
Creating Search Pages with Both Fixed and Dynamic Criteria
Author: Steve Muench, Oracle ADF Development Team
Date: September 16, 2004
http://www.oracle.com/technology/products/jdev/howtos/10g/dynamiccrit/index.html

Similar Messages

  • No getter method for property user of bean Problem

    Hi everyone,
    I am new to this struts. I have a samll application to check login. When I run my application I get this message in my server console
    No getter method for property user of bean org.apache.struts.taglib.html.BEAN
    I saw the previous forum for the same topic. I have checked my property names start with appropriate cases. Here is my code
    %@ page language="java" %>
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <html>
    <head><title>Login</title></head>
    <body>
    <html:form action="submit.do">
    <table width="100%" border="0" height=75%>
    <tr>
    <td align="right" >UserName: </td>
    <td><html:text property="user"/></td>
    <tr>
    <tr>
    <td align="right" >Password: </td>
    <td><html:text property="password"/></td>
    </tr>
    <tr>
    <td colspan=2 align="center"><html:submit/></td>
    </tr>
    <tr>
    <td colspan=2 align="center"><html:errors/></td>
    </tr>
    </table>
    </html:form>
    </body>
    </html>
    import javax.servlet.http.HttpServletRequest;
    import org.apache.struts.action.*;
    import java.util.*;
    * @author skannan
    * To change this generated comment edit the template variable "typecomment":
    * Window>Preferences>Java>Templates.
    * To enable and disable the creation of type comments go to
    * Window>Preferences>Java>Code Generation.
    public class LoginForm extends ActionForm
    private String user = null;
    private String password = null;
    /* user */
    public String getUser()
    return (this.user);
    public void setUser(String user)
    this.user = user;
    /* password */
    public String getPassword()
    return (this.password);
    public void setPassword(String password)
    this.password = password;
    public ActionErrors validate(ActionMapping mapping,
    HttpServletRequest request) {
    // Log the forms data
    servlet.log("Lastname:" + user);
    servlet.log("Address:" + password);
    // Check for mandatory data
    ActionErrors errors = new ActionErrors();
    if (user == null || user.equals("")) {
    errors.add("User", new ActionError("error.user"));
    if (password == null || password.equals("")) {
    errors.add("Password", new ActionError("error.password"));
    return errors;
    I am missing anything in my config files. Please I need help.
    Thanks!

    I did check my struts-config file
    Here is the part of my file
    <!-- ========== Form Bean Definitions ================= -->
    <form-beans>
    <form-bean name="loginForm"
    type="kannan.struts.trailer.checkin.LoginForm"/>
    <form-bean name="checkInForm"
    type="kannan.struts.trailer.checkin.CheckInForm"/>
    </form-beans>
    <!-- ========== Action Mapping Definitions ============ -->
    <action-mappings>
    <action path="/submit"
    type="kannan.struts.trailer.checkin.LoginAction"
    name="loginForm"
    input="/login.jsp"
    scope="request">
    <forward name="success" path="/checkIn.jsp"/>
    <forward name="failure" path="/login.jsp"/>
    </action>
    Still I am getting the error

  • Oracle.jbo.AttrValException: JBO-27019: Get method for attribute

    Hi Guys,
    I am trying to add a new column to Oracle quoting.It has already been customized by some consultant few years back. I followed the note 392728.1 on metalink and also have the documentation by the previous consultant but getting the error oracle.jbo.AttrValException: JBO-27019: Get method for attribute Draft in HeaderVO could not be resolved after adding my column, when I try to print the quote.
    Here are the steps I took
    1) added a column to the query (at the end) in HeaderVO.xml
    2) added the below code in the HeaderVO.xml
    <ViewAttribute
    Name="DRAFT"
    IsQueriable="false"
    IsPersistent="false"
    Precision="100"
    Type="java.lang.String"
    AliasName="DRAFT"
    ColumnType="VARCHAR2"
    Expression="DRAFT"
    SQLType="VARCHAR" >
    <DesignTime>
    <Attr Name="_DisplaySize" Value="100" />
    </DesignTime>
    </ViewAttribute>
    3). Modify HeaderVORowImpl.java file to add setters and getters for the newly added view attribute. For example,
    a) case 67: //
    setDRAFT((String)obj);
    return;
    b) case 67:
    return getDRAFT();
    c) ublic void setDRAFT(String s)
    setAttributeInternal(67, s);
    public String getDRAFT()
    return (String)getAttributeInternal(67);
    d) protected static final int DRAFT = 67;
    Everything is dont exactly as per the manual but not sure why I am getting this issue. Any help will be appreciated.

    a) case 67: //
    setDraft((String)obj);
    return;
    b) case 67:
    return getDraft();
    c)public void setDraft(String s){
    setAttributeInternal(67, s);
    public String getDraft(){
    return (String)getAttributeInternal(67);
    d) protected static final int DRAFT = 67;
    can u change it as explained above.. setDRAFT should be setDraft.. and getDRAFT should be getDraft..
    and make sure that the index.. number is exactly matching with the attribute order in the VO

  • [svn:fx-trunk] 10891: Fix for ASDoc throws error when using getter methods for pseudo-inheritance of static constants

    Revision: 10891
    Author:   [email protected]
    Date:     2009-10-06 09:46:47 -0700 (Tue, 06 Oct 2009)
    Log Message:
    Fix for ASDoc throws error when using getter methods for pseudo-inheritance of static constants
    QE notes: None.
    Doc notes: None
    Bugs: SDK-22676
    Tests run: checkintests
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-22676
    Modified Paths:
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/AsDocUtil.java

    Have you tried using com.adobe.air.crypto.EncryptionKeyGenerator instead?

  • Getting error in POI like ""The import org.apache.poi cannot be resolved""

    Hi
    i am getting error like this."""The import org.apache.poi cannot be resolved"" so what i need do here. i think i have to get the jars for it .any one who worked with the concept of poi can help me here. i have been using eclipse ide here.i have down loded pio.3.0-final ,then i have added jar files to eclipse. still i am getting this error here

    HI
    i have checked that in build path it is saying it is there os it can't add them,here i have taken as a class proj not as web proj.
    i have started this topic today only.so idon't know much abt this.i have got this code from poi downloads.here is the code for
    import org.apache.poi.hssf.usermodel.HSSFWorkbook;
    import org.apache.poi.hssf.usermodel.HSSFSheet;
    import org.apache.poi.hssf.usermodel.HSSFRow;
    import org.apache.poi.hssf.usermodel.HSSFCell;
    import java.io.FileInputStream;
    * This is a sample to Read an Excel Sheet using
    * Jakarta POI API
    * @author Elango Sundaram
    * @version 1.0
    public class ReadXl {
    /** Location where the Excel has to be read from. Note the forward Slash */
    public static String fileToBeRead="D:/JTest/JPOI/Read.xls";
    public static void main(String argv[]){      
    try{
                        // Create a work book reference
                        HSSFWorkbook workbook = new HSSFWorkbook(new FileInputStream(fileToBeRead));
                        // Refer to the sheet. Put the Name of the sheet to be referred from
                        // Alternative you can also refer the sheet by index using getSheetAt(int index)
                        HSSFSheet sheet = workbook.getSheet("Sheet1");
                        //Reading the TOP LEFT CELL
                        HSSFRow row = sheet.getRow(0);
                        // Create a cell ate index zero ( Top Left)
                        HSSFCell cell = row.getCell((short)0);
                        // Type the content
                        System.out.println("THE TOP LEFT CELL--> " + cell.getStringCellValue());
    }catch(Exception e) {
    System.out.println("!! Bang !! xlRead() : " + e );
    }

  • Getter method for Generic type in BinarySearchTree

    Hi, I had to write an implementation of a BinarySearchTree for an assignment.
    I have the two classes, one 'BinarySearchTree' which basicly just points to the root, and the node that does most of the work:
    public class BinaryNode<K extends Comparable<K>,V>
         public K _key;
         public V _val;
         private BinaryNode _left;
         private BinaryNode _right;
         public V getVal() //getter
              return _val;
    }In my BinarySearchTree class I use this getter method like so:
    V nodeValue;
    nodeValue = (V) oldNode.getVal();The thing I don't understand is why I have to cast the value returned? If I don't it won't compile!
    It is working fine as is, but my lecturer is always saying to avoid casts.
    Thanks,
    Austin.

    Your BinaryNode class looks OK.
    Could you post a small piece of code I can compile and run and results in the compile error you described? (Don't post the entire thing!)
    Thanks.

  • Urgent Help - Getting Org_id for where clause

    HI All,
    I am trying to customise "Out of office rule" - Delegate LOV sql, it works fine from responsibility e.g. iProcurment etc. but not from HomePage worklist. The problem is getting the Org_id of the user logged-in I have tried following different methods:
    From VO:
    (1) FND_GLOBAL.ORG_ID
    (2) fnd_profile.value('ORG_ID')
    From CO: by setting the where clause
    (1) oadbtransaction.getOrgId()
    (2) oapagecontext.getOrgId()
    But every time same problem some how it's not working from Application HomePage but it will work fine if user will click on any responsibility and then come back to homepage.
    Please help it's an urgent issue.
    Thanks!

    Anoop,
    That what are the options to get the Org id on the home page for the user logged-in as user can set "Out of Office Rules" with out clicking on any responsibility ...directly from the home page.
    Thanks

  • No Getter Method Error

    I had a working JSP/Struts application. I added a new data page and struts forward, and started getting:
    No getter method for property Fullname6 of bean org.apache.struts.taglib.html.BEAN
    errors.
    I have confirmed that the Fullname6 is referenced in the UIModel.xml file. My changes were only to add a read-only table to the jsp that is failing, so I don't see how that could be causing this error. I made no changes to the struts action that forwards to this page.
    What is going on here? Anybody have any ideas?

    I know about the link that you've sent.
    We don't have a specific form bean for this, as we have 'DataForm' which takes care of get/setter method for the attributes. I am using ADF, JSP, Struts and parameterized where clause in my VO. I do not know how to procede as it doesn't allow me to create the form bean.
    Thanks,

  • No getter method when used html:text

    hi frnds,
    this is the way i ve written-->
    <html:text name="bdgtmastForm" property="publicity_code" size="5" maxlength="5">
    but its giving me an error which seems irrelevent..
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Exception in JSP: /pages/admin/addbdgt.jsp:61
    58: <tr>
    59: <td width="50%" height="25"><strong><small><font face="Verdana">Publicity Code </font></small></strong></td>
    60: <td width="50%" height="25">
    61: <html:text name="bdgtmastForm" property="publicity_code" size="5" maxlength="5"></html:text>
    62: <!-- <input type="text" size="5" maxlength="5" name="publicity_code"></td> -->
    63:
    64: </tr>
    Stacktrace:
    org.apache.jasper.servlet.JspServletWrapper.handle JspException(JspServletWrapper.java:467)
    org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:371)
    org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:315)
    org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:265)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:803)
    root cause
    javax.servlet.ServletException: No getter method for property publicity_code of bean bdgtmastForm
    org.apache.jasper.runtime.PageContextImpl.doHandle PageException(PageContextImpl.java:846)
    org.apache.jasper.runtime.PageContextImpl.handlePa geException(PageContextImpl.java:779)
    org.apache.jsp.pages.admin.addbdgt_jsp._jspService (addbdgt_jsp.java:89)
    org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:98)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:803)
    org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:328)
    org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:315)
    org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:265)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:803)
    root cause
    javax.servlet.jsp.JspException: No getter method for property publicity_code of bean bdgtmastForm
    org.apache.struts.util.RequestUtils.lookup(Request Utils.java:968)
    org.apache.struts.taglib.html.BaseFieldTag.doStart Tag(BaseFieldTag.java:176)
    org.apache.jsp.pages.admin.addbdgt_jsp._jspx_meth_ html_005ftext_005f0(addbdgt_jsp.java:577)
    org.apache.jsp.pages.admin.addbdgt_jsp._jspx_meth_ html_005fform_005f0(addbdgt_jsp.java:184)
    org.apache.jsp.pages.admin.addbdgt_jsp._jspx_meth_ html_005fhtml_005f0(addbdgt_jsp.java:116)
    org.apache.jsp.pages.admin.addbdgt_jsp._jspService (addbdgt_jsp.java:82)
    org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:98)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:803)
    org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:328)
    org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:315)
    org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:265)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:803)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.23 logs.
    Apache Tomcat/5.5.23
    my bean class is--->
    public String getPublicity_Code()
    return(this.publicity_code);
    why am i getting this error when i ve already declared publicity_code in the bean class????
    regards,
    a_joseph

    hi guyz,
    herz my jsp page for submiting the values,
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <%@taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <%@taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
    <%@taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <html:html>
    <head>
    <title>Budget Master Administration</title>
    <meta name="GENERATOR" content="Microsoft FrontPage 3.0">
    <SCRIPT LANGUAGE="JavaScript" SRC="bscript.js"></SCRIPT>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    </head>
    <body topmargin="0" leftmargin="0" bgproperties="fixed">
    <div align="left">
    <html:form action="/BdgtMastAction" name="bdgtmastForm" type="publicity.BdgtMastForm" method="get">
    <table border="0" width="100%">
    <tr>
    <td width="100%" bgcolor="#DFDFFF" background="images/niceblue.gif"><font face="Tahoma"
    color="#000000"><strong>B u d g e t   M a s t e r</strong></font></td>
    </tr>
    </table>
    <div align="left">
    <table width="60%" height="127">
    <tr>
    <td valign="top" width="50%" height="34"><strong><small><font face="Verdana"></font></small></strong></td>
    <td width="50%" height="34"></td>
    </tr>
    <tr>
    <td valign="top" width="50%" height="27"><strong><small><font face="Verdana">Branch</font></small></strong></td>
    <td width="50%" height="27">
    <!-- <input type=hidden name="option" value="new"> -->
    <html:hidden name="bdgtmastForm" property="option" value="new"/>
    <p>
    <html:select property="branch" size="1">
    <html:option value="Bombay"></html:option>
    <html:option value="Ahmedabad"></html:option>
    <html:option value="Madras"></html:option>
    <html:option value="Bangalore"></html:option>
    <html:option value="Calcutta"></html:option>
    <html:option value="Hyderabad"></html:option>
    <html:option value="Pune"></html:option>
    <html:option value="Lucknow"></html:option>
    <html:option value="Jaipur"></html:option>
    <html:option value="Patna"></html:option>
    <html:option value="Cochin"></html:option>
    <html:option value="Chandigarh"></html:option>
    <html:option value="Bhopal"></html:option>
    </html:select>
    </p>
    </td>
    </tr>
    <tr>
    <td width="50%" height="25"><strong><small><font face="Verdana">Publicity Code </font></small></strong></td>
    <td width="50%" height="25">
    <html:text name="bdgtmastForm" property="publicity_Code" size="5" maxlength="5"></html:text>
    <!-- <input type="text" size="5" maxlength="5" name="publicity_code"></td> -->
    </tr>
    <tr>
    <td width="50%" height="25"><strong><small><font face="Verdana">Annual Budget Alloted (<em>Rs</em>)</font></small></strong></td>
    <td width="50%" height="25">
    <!-- <input type="text" size="10" maxlength="10" name="budget"> -->
    <html:text property="budget" name="bdgtmastForm" size="10" maxlength="10" ></html:text>
    </td>
    </tr>
    </table>
    </div>
    <p align="left">
    <html:submit value="Submit" property="thesubmit" onclick="everything(form)"> </html:submit>
    </p>
    <hr>
    <strong><small><font color="#0080C0">
    <p align="center">�</font><font color="#0080C0" face="Verdana">Response - Corporate
    1998-1999</font></small></strong>
    </html:form>
    </div>
    </body>
    </html:html>
    and the exceptions that im getting when clicked on submit
    when i click on submit normally the javascript validation shud check for improper values,instead its getting submitted,and the below exceptions r the result..
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Column 'Publicity_Code' cannot be null
         org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:545)
         org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:486)
         org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
         org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    root cause
    com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Column 'Publicity_Code' cannot be null
         com.mysql.jdbc.SQLError.createSQLException(SQLError.java:931)
         com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
         com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)
         com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
         com.mysql.jdbc.Connection.execSQL(Connection.java:3256)
         com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1313)
         com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1585)
         com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1500)
         com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1485)
         org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:101)
         publicity.BdgtMastAction.execute(BdgtMastAction.java:57)
         org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
         org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
         org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.23 logs.
    Apache Tomcat/5.5.23

  • Urgent , Post or Get method?

    hello all;
    when i deploy a servelt on growser with the GET method , the servlet is working all right, but when i use POST method (to change database) , i have error , please tell me how and when i use Post method?

    GET and POST are two different ways of passing data from a browser to a server. With the GET method, the browser constructs a Query String (?var1=val&var2=val...) which is passed to the server as part of the URL. With the POST method, the data from the browser is passed via standard input to the server. You determine which method is used when you build the HTML form:
    <FORM ACTION="/path/action_servlet" METHOD="POST">
    OR
    <FORM ACTION="/path/action_servlet" METHOD="GET">
    <INPUT TYPE="TEXT" NAME="var1">
    <INPUT TYPE="TEXT" NAME="var2">
    <INPUT TYPE="SUBMIT">
    </FORM>
    In the case of servlets, either the doGet() or doPost() method will be executed depending on how the data is passed from the browser.
    In general, use the GET method for debugging or if you want the client to be able to bookmark the entire URL (with parameters). If you have an application where you are "changing the database", you probably want to use the POST method.
    -- Brian
    null

  • Help with efficiency for insert/get methods?

    I am not an expert when it comes to run times and I am wondering what the most efficient data structures would be for a program I am making. I need to:
    Go through a large document in which each line is formatted as: (String Integer), and add the string & integer to some sort of data structure. The list of string/integers is large and I need to be able to access the information in the data structure efficiently. Right now I am using a scanner to read the doc and a TreeMap<String, Integer> to store the info. The get method for the TreeMap is fine, but processing the document is a little slow.
    What do you think? TreeMap, hashing, balanced search tree? Remember, the insert and get methods are the two that need to be most efficient.

    Why are you using a TreeMap? Is the order of iteration important to you?
    If not, then you can probably get better performance using a HashMap, properly configured. The TreeMap has O(n) performance for get/put. while HashMap has constant-time performance. If you properly configure the initialCapacity and loadFactor for the HashMap you can get very efficient puts by reducing the number of re-hashes that are needed during map-growth. Note that if you retrieve the data from the Map using an iterator (rather than just calling get()) then you have to be more careful with these settings because they affect the total number of buckets - which can affect the speed of iteration.
    You should also run your code through a profiler. Are you sure that the put() operation is the slow step when reading from the file? It may be that your file access is really the slow step, and so modifying the data structure would have little or no effect. You might consider different methods for accessing the file data, perhaps something from thew NIO package would help speed things up (I am not particularly sure though - I am not very familiar with NIO).

  • "no setter method for ..."

              I got 7 same problems in compilation of different JSPs when I built petstore in
              the wls6.1.
              [execon] Error: translation of /productdetails.jsp failed: weblogic.servlet.jsp.JspException:
              (li
              ne 7): Error in using tag library uri='/WEB-INF/tlds/taglib.tld' prefix='j2ee':
              There is no setter m
              ethod for property 'numItems', for Tag class 'com.sun.j2ee.blueprints.petstore.taglib.list.SearchLis
              tTag'
              [execon] Error: translation of /product.jsp failed: weblogic.servlet.jsp.JspException:
              (line 10):
              Error in using tag library uri='/WEB-INF/tlds/taglib.tld' prefix='j2ee': There
              is no setter method
              for property 'numItems', for Tag class 'com.sun.j2ee.blueprints.petstore.taglib.list.SearchListTag
              I checked SearchListTag and there is setter method in there.
              Could anyone have solutions on them?
              Thanks.
              Jim
              

    I have found this same problem in weblogic 8.1 and the only work around I saw was to have the same class in getter and setter both. ie if your tag is setting a String then when you write 'getter' it should return a String object.
              See if that works out !
              goodluck
              Vijay
              Message was edited by:
              vjdeshmukh

  • Problem extending standard ViewReceiptsSearchVO view object with logic on get method

    Hi All,
    EBS 12.1.3
    Database 11.2.0.3
    I am trying to extend the 3 VOs related to ViewReceiptsSearch.  I extended a seeded ViewReceiptsSearchVO view object.  I haven't made any changes yet, no columns added, nothing altered.  When I run this substitution, the "Received" column is null.  This column in the view used for the view object only selects NULL and uses the getter method for the attribute to populate the value.  The generated extension getter calls getAttributeInternal and skips the logic in the standard getter and the substituted view object is displaying the null in the screen.  The below discussion explains the problem very well except that the original posted had the issue in 11.5.10.2.  I am having this issue with 12.1.3.
    Problem extending standard view object with logic on get method
    The 3 VOs that I am having the problem are:
    ViewReceiptsSearchVO
    ViewReceiptsSearchReqVO
    ViewReceiptsSearchSupplierVO
    What do I need to do to get the "Received" column populated?  Please let me know any additional information you want to troubleshoot the issue.
    Thanks.

    Hi,
    Can you Please Share Extended ViewReceiptsSearchVO.xml and .jpx File?
    Thanks,
    Dilip

  • MVC Problem with getter method of table attribute in model class

    Hi,
    I am on 620 SP34. I am writing a bsp application with mvc. One of the model classes has an attribute of type table. I use this attribute in a htmlb-tableview and '//MODEL/ZMY_TAB' for data binding. If I try to activate a getter method for this attribute, the application dumps with exception <i>BSP exception: Structure component with name "ZMY_TAB" does not exist</i>. I find the SAP source, that raising this exception (see below). The source code looks like: <i>"I don't support getter methods for tables in attribute path"</i>! The setter method works fine, so I am at a loss. Has anyone of you wrote a getter method for an table attribute in bsp-mvc? Have I to consider anything special?
    Thanks,
    Carsten
    Main Program CL_BSP_MODEL==================CP
    Source code of CL_BSP_MODEL==================CM00Z
    METHOD IF_BSP_MODEL_BINDING~GET_ATTRIBUTE_DATA_REF
           * check if attribute exists for binding!                                   
             if exists_attribute( l_name ) is initial.                                
               return.                                                                
             endif.                                                                               
    * setter or getter defined? Not supported for DATA REF requests            
             if get_getter( attribute_name = l_name ) is not initial.                 
               raise exception type cx_bsp_inv_component                              
                 exporting name = l_name.                                             
             endif.                                                   

    You have two options:
    1. Make your attributes public. It should work fine.
    2. If you need to process the attribute values before it is used, you can make the attribute private but will need three methods
    GET_T_ZMY_TAB that returns the table
    SET_T_ZMY_TAB that sets the values
    GET_M_T_ZMY_TAB that returns DDIC information about the attribute. The same holds good for structures(Change to GET_S_ and GET_M_S_ ) and simple attributes(Change to GET_ and GET_M_).
    The set and get methods are kind of documented at http://help.sap.com/saphelp_nw04/helpdata/en/fb/fbb84c20df274aa52a0b0833769057/content.htm but there is no mention of the GET_M_ methods. I could not find one single document on the Model part MVC.
    Once I added the GET_M_XYZ methods to my attributes, my BSPs started to work fine.
    Cheers
    Sreekanth

  • Whether private getter methods is Evil?

    Hi!
    I was wondering whether it is bad or good to use private getter methods in a class rather than directly accessing private fields?
    For instance, I have a getter method for each Swig component used in my program:
        private JButton run;
        private JButton getRun() {
             if (run != null) {
                  return run;
            run = new JButton("Run");
            run.setToolTipText("Run");
            run.setIcon(new ImageIcon(ResourceHelper.getImageResource("run.png")));
            run.setEnabled(false);
            run.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent event) {
                    MessageDialog.showPleaseWait(TestRunnerUI.this,
                        "creating logger", new Runnable() {
                            public void run() {
    // bla bla bla
            return run;
        }And so for each swing component....
    But for example I have such a method:
        private void disconnect() {
            mRunner = null;
            mLogger = null;       
            log.log(Logger.INFO, "disconnected");
            tree.setModel(defaultModel);
            tree.setEnabled(true);
            save.setEnabled(false);
            saveAs.setEnabled(false);
            load.setEnabled(false);
            options.setEnabled(false);
            run.setEnabled(false);
            breakTests.setEnabled(false);
            connect.setEnabled(true);
            disconnect.setEnabled(false);
        }which changes properties of a lot of components...
    I don't know whether I should use there private getter methods or not. From the design perspective it seems I should but it also adds some overhead I suppose...

    I use accessor methods when writing persistent
    classes and javabeans. The key is not to use them by
    default, only when required. IMO this does not
    violate encapsulation, it hides implementation. Agree. Inside the bean itself you shouldn't use it's accessors either.
    The
    main benefit being that should you need to refactor
    the way a value is retrieved or set you have
    localized the changes. Holub will tell you that if
    you are using an accessor method to retrieve a value
    from an object, in order to do some computation on
    that value, you should move the computation into the
    object's class instead (hence "getter and setter
    methods are evil").Summarized, the public accessors are evil when the code behind does not only return/set the encapsulated value. Solution: refactor, split and rename them to "createSomething", "lookupSomething", "buildSomething", or so.
    In this case the topicstarter was talking about private getters tho.

Maybe you are looking for

  • Java Mapping in pi 7.1 using pi 7.1 nwds

    I am writing a program to remove the special chars in NWDS Java mapping. this is for replacing the "&" with "&".. I am able to compile it and import the jar in PI.. but it does not do anything.. please check.. And also let me know where to check for

  • Export in FCP 7

    In FCP 7, when I try to export a project that plays fine in the timeline and has no offline indications in the browser, get an error message that files are offline.  Running reconnect media has no effect.  Project continues to play but not export and

  • Old data

    Can you restore old automatic back ups?because when i restore it only manual data is only available.

  • This vault could not be loaded.

    Hi, i have an 32GB Ultra USB 3.0. I was in the process of loading some files onto the vault and then deleting the source files on the computer when asked if i wanted to. I had loaded the files onto the computer and deleted most of the files when i go

  • 802.1x auth via ACS through unknown user policy - multiple directories?

    A customer has an LDAP directory as well as a Novell NDS directory. MAC clients authenticate to IPlanet LDAP. Windows users authenticate to Novell NDS. Is there any way to use multiple SSIDs and the unknown user policy to authenticate users against t