Iterating through results

H i have a Mysql database that contains and ID and a rating. I would like to iterate through the results of the query and display a number of stras that relates to the rating.
JSP page code:
<%@ page contentType="text/html; charset=utf-8" errorPage="errorPage.jsp" language="java" import="java.sql.*" import="java.util.Date.*" %>
<%@ page language="java" import="java.sql.*" %>
<%!
// define variables
String portfolio_id;
int p_rating;
String conn;
%>
<%
Class.forName("com.mysql.jdbc.Driver");
//get parameter to search by
//String modelNO = request.getParameter("model_number");
// create connection string
//jdbc:mysql://host_name:port/dbname - MySQL Connector/J JDBC Driver.
conn = "jdbc:mysql://server/md_portfolio?user=user&password=password";
// pass database parameters to JDBC driver
Connection Conn = DriverManager.getConnection(conn);
// query statement
Statement SQLStatement = Conn.createStatement();
// generate query
String Query = "SELECT * FROM md_portfolio";
// get result
ResultSet SQLResult = SQLStatement.executeQuery(Query);
   while(SQLResult.next())
      portfolio_id = SQLResult.getString("portfolio_id");
       p_rating = SQLResult.getInt("p_rating");  
out.println("ID: " + portfolio_id + "<br>");
out.println("Rating: " + p_rating + "<br>");
//////////i want the stars to be out put here/////////////
     /*int value = p_rating;
     int i = 0;
        while (value[i] > 5)
            out.println(" * ");
               values[i++];
// close connection
SQLResult.close();
SQLStatement.close();
Conn.close();
%>My final plan is change the * for an actual image of a star. Please help i should know how to do this but i cant. Thanks.
Message was edited by:
JamesMorgan

My final plan is change the * for an actual image of
a star. Please help i should know how to do this but
i cant. Thanks.For a minute I thought you meant the * in your SQL statement. I had no idea how to advise you in that case.

Similar Messages

  • Iterating through results help please

    H i have a Mysql database that contains and ID and a rating. I would like to iterate through the results of the query and display a number of stras that relates to the rating.
    JSP page code:
    <%@ page contentType="text/html; charset=utf-8" errorPage="errorPage.jsp" language="java" import="java.sql.*" import="java.util.Date.*" %>
    <%@ page language="java" import="java.sql.*" %>
    <%!
    // define variables
    String portfolio_id;
    int p_rating;
    String conn;
    %>
    <%
    Class.forName("com.mysql.jdbc.Driver");
    //get parameter to search by
    //String modelNO = request.getParameter("model_number");
    // create connection string
    //jdbc:mysql://host_name:port/dbname - MySQL Connector/J JDBC Driver.
    conn = "jdbc:mysql://server/md_portfolio?user=user&password=password";
    // pass database parameters to JDBC driver
    Connection Conn = DriverManager.getConnection(conn);
    // query statement
    Statement SQLStatement = Conn.createStatement();
    // generate query
    String Query = "SELECT * FROM md_portfolio";
    // get result
    ResultSet SQLResult = SQLStatement.executeQuery(Query);
       while(SQLResult.next())
          portfolio_id = SQLResult.getString("portfolio_id");
           p_rating = SQLResult.getInt("p_rating");  
    out.println("ID: " + portfolio_id + "<br>");
    out.println("Rating: " + p_rating + "<br>");
    //////////i want the stars to be out put here/////////////
         /*int value = p_rating;
         int i = 0;
            while (value[i] > 5)
                out.println(" * ");
                   values[i++];
    // close connection
    SQLResult.close();
    SQLStatement.close();
    Conn.close();
    %>My final plan is change the * for an actual image of a star. Please help i should know how to do this but i cant. Thanks.
    Message was edited by:
    JamesMorgan

    Thankyou it has kinda given me what i want.
    I have chanegd the code slightly to output like this for testing purposes:
    out.println("ID: " + portfolio_id + "<br>");
    out.println("Rating: " + p_rating + "<br>");//to be reomved once completed
    while (p_rating < 5) {
                p_rating++;
                 out.println("* ");
              out.println("<br>");
              out.println("--------------------<br>");which output this
    ID: 1
    Rating: 2
    ID: 2
    Rating: 2
    ID: 3
    Rating: 2
    ID: 4
    Rating: 3
    --------------------However if you see it ouputs the number of stars left not the actual rating its self.
    Any idea. i have changed the operators of the loop i.e. <= >= etc and has no luck. if i change it to -- not ++ then the pages just continuously fills with stars.
    any ideas please.

  • Avoid iterating through everything

    Hello all,
    Hope you guys can help me with this problem. I have a program that draws anywhere from 1-300,000 letters on a canvas. Each letter is created from a class called StringState which extends Rectangle. What I would like to do is have each letter respond when the user moves the mouse over the letter by growing bigger. I figured I can just see if the letters bounds contains the point where the mouse moved to and if it does change the letters size and repaint around that letter to update the display. This works great from 1-5000 letters but getting up to 10,000 or even higher creates a very visible lag while the program is iterating through the letters to check if the mouse location intersects the letters bounds. What I was wondering is there a way to get this result without iterating through the entire collection of letters to see if it contains the mouse location? Like can I attach some kind of mouse listener to each letter or something like that? The following program just demonstrates how I create and display the letters I haven't really had a chance to create a demonstration of how they would grow when hovered over. The program i'm working on that actually demonstrates this is very large and hard to trim down to show an example so the following code is actually from a previous question I asked and was provided by Aephyr. Thanks in advance for your guys help :)
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.*;
    import java.util.List;
    public class PaintSurface implements Runnable, ActionListener {
         public static void main(String[] args) {
              SwingUtilities.invokeLater(new PaintSurface());
         Tableaux tableaux;
         Random random = new Random();
    //        Point mouselocation = new Point(0,0);
         static final int WIDTH = 1000;
         static final int HEIGHT = 1000;
            JFrame frame = new JFrame();
         public void run() {
              tableaux = new Tableaux();
              for (int i=15000; --i>=0;)
                   addRandom();
              frame.add(tableaux, BorderLayout.CENTER);
              JButton add = new JButton("Add");
              add.addActionListener(this);
              frame.add(add, BorderLayout.SOUTH);
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.setSize(WIDTH, HEIGHT);
              frame.setLocationRelativeTo(null);
    //                frame.addMouseMotionListener(new MouseListener());
              frame.setVisible(true);
         public void actionPerformed(ActionEvent e) {
              addRandom();
         void addRandom() {
              tableaux.add(
                        Character.toString((char)('a'+random.nextInt(26))),
                        UIManager.getFont("Button.font"),
                        random.nextInt(WIDTH), random.nextInt(HEIGHT));
    //        class MouseListener extends MouseAdapter {
    //            public void mouseMoved(MouseEvent e) {
    //                mouselocation = new Point(e.getX(),e.getY());
    //                frame.repaint();
            class StringState extends Rectangle {
                    StringState(String str, Font font, int x, int y, int w, int h) {
                            super(x, y, w, h);
                            string = str;
                            this.font = font;
                    String string;
                    Font font;
            class Tableaux extends JComponent {
                 Tableaux() {
                      this.enableEvents(MouseEvent.MOUSE_MOTION_EVENT_MASK);
                      lagState = createState("Lag", new Font("Arial",Font.BOLD,20), 0, 0);
                 protected void processMouseMotionEvent(MouseEvent e) {
                      repaint(lagState);
                      lagState.setLocation(e.getX(), e.getY());
                      repaint(lagState);
                      super.processMouseMotionEvent(e);
                 StringState lagState;
                    List<StringState> states = new ArrayList<StringState>();
                    StringState createState(String str, Font font, int x, int y) {
                        FontMetrics metrics = getFontMetrics(font);
                        int w = metrics.stringWidth(str);
                        int h = metrics.getHeight();
                        return new StringState(str, font, x, y-metrics.getAscent(), w, h);
                    public void add(String str, Font font, int x, int y) {
                         StringState state = createState(str, font, x, y);
                            states.add(state);
                            repaint(state);
                    protected void paintComponent(Graphics g) {
                            Rectangle clip = g.getClipBounds();
                            FontMetrics metrics = g.getFontMetrics();
                            for (StringState state : states) {
                                    if (state.intersects(clip)) {
                                            if (!state.font.equals(g.getFont())) {
                                                    g.setFont(state.font);
                                                    metrics = g.getFontMetrics();
                                            g.drawString(state.string, state.x, state.y+metrics.getAscent());
                            if (lagState.intersects(clip)) {
                            g.setColor(Color.red);
                            if (!lagState.font.equals(g.getFont())) {
                                g.setFont(lagState.font);
                                metrics = g.getFontMetrics();
                            g.drawString("Lag", lagState.x, lagState.y+metrics.getAscent());
    }Here is the code that iterates through the letters to see if a letter contains the mouse location:
                if(e.getSource()==canvas&&edit) {
                    for(Letter l : letters) {
                        Rectangle rec = new Rectangle(l.x+l.xoffset,l.y+l.yoffset,l.width,l.height);
                        if(rec.contains(new Point(e.getX(),e.getY()))&&l.resizing==false&&l.defaultSize==l.font.getSize()) {
                            l.resizing = true;
                            new Thread(new ExpandLetter(l)).start();
                        else if(!rec.contains(new Point(e.getX(),e.getY()))&&l.resizing==false){
                            l.font = new Font(l.font.getName(),l.font.getStyle(),l.defaultSize);
                            l.resizeLetter(l.text);
                }However I just learned that this loop itself is taking up a huge amount of memory by saying
    l.font = new Font(l.font.getName(),l.font.getStyle(),l.defaultSize); When I take that line out the lag is reduced by a lot. Also I think that it isn't forgetting the "old" letters font that it is replacing by saying new Font() and after running this loop once my program runs slow and laggy as if it doesn't have enough memory to run fast anymore. Is there something I am doing wrong by initiating a new Font. I would have thought that it wouldn't take up anymore memory because it replaces the old font the the letter "l" has. The loop seems to have some kind of memory leak if someone could point it out to me that would be great. Thanks :)
    Edited by: neptune692 on Feb 16, 2010 8:18 PM

    neptune692 wrote:
    can I attach some kind of mouse listener to each letterTry this:
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.font.*;
    import java.awt.geom.*;
    import javax.swing.*;
    import java.util.*;
    import javax.swing.event.*;
    public class SimplePaintSurface implements Runnable, ActionListener {
        private static final int WIDTH = 1250;
        private static final int HEIGHT = 800;
        private Random random = new Random();
        private JFrame frame = new JFrame("SimplePaintSurface");
        private JPanel tableaux;
        public void run() {
            tableaux = new JPanel(null);
            for (int i = 15000; --i >= 0;) {
                addRandom();
            frame.add(tableaux, BorderLayout.CENTER);
            JButton add = new JButton("Add");
            add.addActionListener(this);
            frame.add(add, BorderLayout.SOUTH);
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.setSize(WIDTH, HEIGHT);
            frame.setLocationRelativeTo(null);
            frame.setVisible(true);
            tableaux.requestFocusInWindow();
        public void actionPerformed(final ActionEvent e) {
            addRandom();
            tableaux.repaint();
        void addRandom() {
            Letter letter = new Letter(Character.toString((char) ('a' + random.nextInt(26))));
            letter.setBounds(random.nextInt(WIDTH), random.nextInt(HEIGHT), 16, 16);
            tableaux.add(letter);
        public static void main(final String[] args) {
            SwingUtilities.invokeLater(new SimplePaintSurface());
    class Letter extends JLabel {
        Font font1;
        Font font2;
        private final FontRenderContext fontRenderContext1;
        private final FontRenderContext fontRenderContext2;
        public Letter(final String letter) {
            super(letter);
            setFocusable(true);
            setBackground(Color.RED);
            font1 = getFont();
            font2 = font1.deriveFont(48f);
            fontRenderContext1 = getFontMetrics(font1).getFontRenderContext();
            fontRenderContext2 = getFontMetrics(font2).getFontRenderContext();
            MouseInputAdapter mouseHandler = new MouseInputAdapter() {
                @Override
                public void mouseEntered(final MouseEvent e) {
                    Letter.this.setOpaque(true);
                    setFont(font2);
                    Rectangle bounds = getBounds();
                    Rectangle2D stringBounds = font2.getStringBounds(getText(), fontRenderContext2);
                    bounds.width = (int) stringBounds.getWidth();
                    bounds.height = (int) stringBounds.getHeight();
                    setBounds(bounds);
                @Override
                public void mouseExited(final MouseEvent e) {
                    Letter.this.setOpaque(false);
                    setFont(font1);
                    Rectangle bounds = getBounds();
                    Rectangle2D stringBounds = font1.getStringBounds(getText(), fontRenderContext1);
                    bounds.width = (int) stringBounds.getWidth();
                    bounds.height = (int) stringBounds.getHeight();
                    setBounds(bounds);
            addMouseListener(mouseHandler);
    }

  • SharePoint Online Iterating through Document Libraries CSOM

    Hi,
    I am trying to iterate though a document library and set each document/items whithin to inherit permissions (at the moment each doc/item is using uniquer permissions).
    I am able to get the specific document library that I am interesting in, however I cannot at the moment iterate though each of the items/documents within it, but here is what I have so far:
    Add-Type -Path "Libraries\Microsoft.SharePoint.Client.dll"
    Add-Type -Path "Libraries\Microsoft.SharePoint.Client.Runtime.dll"
    Add-Type -Path "Libraries\Microsoft.SharePoint.Linq.dll"
    Add-Type -Path "Libraries\Microsoft.SharePoint.dll"
    $webUrl = "https://test.sharepoint.com/sites/testsite"
    $username = "####"
    $password = "####"
    $securePass = ConvertTo-SecureString $password -AsPlainText -Force
    $listname = "TestDoc";
    $ctx = New-Object Microsoft.SharePoint.Client.ClientContext($webUrl)
    $ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($username, $securePass)
    #variables
    $web = $ctx.Web
    $lists = $web.Lists
    $ctx.Load($lists)
    $ctx.Load($web)
    $ctx.ExecuteQuery()
    #print web URL
    write-host `n "Web Url:" `n $web.Url
    foreach ($list in $lists)
    if ($list.Title -eq "TestDoc")
    #print list name if found
    write-host `n "Found the list:" `n $list.Title `n
    #attempting to iterate through items in the document library
    foreach ($item2 in $list.Items)
    #list the items/documents in the document library
    write-host $item2.Title
    It is the foreach loop I am having trouble at the moment as I am not sure how to loop though each of the items/documents in the document library.
    Any suggestions on the approach I should take would be much appreciated.

    Thanks for the heads up, I have re-worked my script which is simpler and now works like a charm:
    Add-Type -Path "Libraries\Microsoft.SharePoint.Client.dll"
    Add-Type -Path "Libraries\Microsoft.SharePoint.Client.Runtime.dll"
    Add-Type -Path "Libraries\Microsoft.SharePoint.Linq.dll"
    Add-Type -Path "Libraries\Microsoft.SharePoint.dll"
    $webUrl = "https://test.sharepoint.com/sites/testsite"
    $username = "####"
    $password = "####"
    $securePass = ConvertTo-SecureString $password -AsPlainText -Force
    $listname = "TestDoc"
    $ctx = New-Object Microsoft.SharePoint.Client.ClientContext($webUrl)
    $ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($username, $securePass)
    #get the List/DocLib and load it for use
    $listUpdate = $ctx.Web.Lists.GetByTitle($listname)
    $ctx.Load($listUpdate)
    $ctx.ExecuteQuery()
    #CAML Query to get all items inclusing sub-folders
    $spQuery = New-Object Microsoft.SharePoint.Client.CamlQuery
    $spQuery.ViewXml = "<View Scope='RecursiveAll' />";
    $itemki = $listUpdate.GetItems($spQuery)
    $ctx.Load($itemki)
    $ctx.ExecuteQuery()
    #iterating through the items and reseting permission inheritence
    for($j=0; $j -lt $itemki.Count; $j++)
    $itemki[$j].ResetRoleInheritance()
    $ctx.ExecuteQuery()

  • Concurrent modification exception while iterating through list

    Hi,
    I have a list of objects. I use for each loop in java to iterate through that list of objects and display them.
    The problem is that while iterating other thread can add or remove some objects from that list, and I get ConcurrentModificationException.
    How can I handle this problem. How can I be sure that I am iteration through the updated list.
    Thank you

    Synchonize on the list before iterating through it, and make sure that other code also synchronizes on the list before adding to it or removing from it. Using a list implementation that simply synchronizes all the methods (e.g. Vector) will not do that, you have to do it yourself.

  • Iterating through View Object RowIterator Bug.

    I use this code to loop through the rows of a view object (As described in javadoc of RowIteratior).
    public String checkIterations() {
    String res = "Iterated through : ";
    RowIterator view = this.getDepartmentsView1();
    view.reset();
    Row row;
    while ((row = view.next()) != null) {
    System.out.println("rownum: " + row.getAttribute("RowNum"));
    res += row.getAttribute("RowNum") + " ";
    return res;
    Yet this code never goes through the first row if the executequery has been performed for view object.
    details:
    [http://adfbugs.blogspot.com/2009/07/iterating-through-view-object.html]
    Is this a bug?
    Edited by: mkonio on Jul 28, 2009 11:41 PM

    Thanks Andrejus and Steve.
    Its a development bug
    problem and solution described in:
    Fusion Developer's Guide for Oracle ADF
    9.7.6 What You May Need to Know About Programmatic Row Set Iteration

  • Iterating through RWBTreeOnDisk

    Is there any way to Iterating through RWBTreeOnDisk, My problem is that i have 100 records in RWBTreeOnDisk and i want to fetch only first 20 records, how should i proceed to do the same, instead of getting all the records using applyToKeyAndValue(), i need to fetch particular number of records in the tree.
    Plz suggest me the way to proceed.
    Thanx

    We use sqlite for this sort of application. It gives you the power of sql but acts on files directly rather that via a server. see www.sqlite.org

  • Iterating through a generic list of unknown type

    Hi,
    I am in the process of creating pdf reports for my project.I have to deal with a persistence api to get the data for the report.The data will be in the form of a list,like List<SomeObject>,all these lists returned by the persistence framework contains object of some type which implements a common interface.But through that interface I wont be able to get all the data for my reports.So I am looking for a generic way for iterating through the list,by providing some metadata for the data within the list. I am planning to use reflection to query through the list.Is there any feature of generic,through which I can easily iterate through this unknown type,preferrably a combination of reflection and generics,I want to reduce the LOC.Any suggestions??

    If the List returned by the framework isn't parameterized, Like
    public List<K> getList(Class<K> classType);
    then you have to cast it to the appropriate type. If you are not sure about the type of the Objects in the list, and you have a bunch of class types you could expect from the list, then you could use instanceof operator.
    If it could be Class A or B, then
    if (obj instanceof A){
    A castObject = (A) obj;
    else if(obj instanceof B){
    B castObject = (B)obj;
    }Even to do reflection to invoke methods, you need to know the method Names. Which tells me you have the knowledge of what could come out of the list. So cast them. Invoking methods using reflection is really slow.

  • Revenue Recognition Functionality through Result Analysis (RA) key

    Hi all,
    We have a requirement for Revenue recognition, Can anyone guide me Revenue recognition functionality through Result Analysis (RA) key  and functions of RA Key .
    Regards,
    Lal Maheswararao

    Hi Makrand,
    Thank you for your Valuable reply. Actually I am looking Specifically for the Revenue Recognition functionality in Cloud computing Business Scenarios. Like the income has to be recognized over the period of time on the basis of service provided. And it should calculate Percentage of completion for calculating revenues and Cost and how much profit it has to be recognised over the period.
    These functions will possible through Result Analysis method. but i have very limited knowledge about RA method.
    Can you please explain in general how Result analysis method will work and if possible with necessary configuration.
    Regards,
    Lal Maheswararao

  • Iterating through entrys of HashMap

    I have a HashMap that is already populated. I'm iterating through the entrySet and want to get the keys and values and use them to create another object. I've searched the forum and googled but can't quite seem to find what I need. Here's the code I have so far.
    Iterator iterator = map.entrySet().iterator();
    while (iterator.hasNext()) {
    if (iterator.next() != null) {
         reasonsList.add(new DropDownData(key, value)); // here's where I'm not sure what to do
    }The DropDownData object accepts twos strings, one for the key and one for the displayed value. These strings should be the key and value from my current HashMap entry. But I can't seem to figure out how to do it.
    thanks for any help/suggestions

    iterating over the not-null entries or iteratingover
    gotten entries that are not null is equivalent,maps
    return "null" for unexisting keys...
    I do not understand what you are saying here.
    It is not required that Map implementations return "null" for non-existent keys.
    It just happens to be the way the implementations in the JDK are implemented.
    The documentation specifically says that Map.get(key) could be allowed to throw a NullPointerException.
    http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html#get(java.lang.Object )
    >
    I would add that map's structure suggests it's the
    way to go (I mean, mine of course ;))
    That's a matter of interpretation.
    what's the point in iterating over the values when
    you need the key ?When you need the keys and the values (as in the case of the OP), then there is plenty of point in it.
    >
    the only way (the API should define) to iterate over
    a map is through the key (hence the "map" name),
    entrySet is (as far as a I reckon) a twisted bypass...It's in the API. It works well. It's useful. So there's no reason not to use it when it is applicable.

  • Iterating through the result of a multiple row sql statement

    Hi all,
    I would like to access the results of a multiple row sql-statement. However I can't find out how to do this, can you help me here?
    I have tried using the "node-set" functions in xpath, but I can't seem to get it right.
    How should I approach this scenario?
    Sincerely
    Kim

    The jdbc service has the option of returning xml back to you ...if you do it this way then you can interogate the xml

  • Looping through results of a Select through a DB adapter

    I am selecting an unknown number of rows from a database through the DB adapter into my process. When I get these results I need to loop through them, but the examples I have seen require an attribute to define each row for the loop to work . My result set is not giving me an attribute and I do not see how to define one in the wizard used to define the adapter.
    Is there a way to assign an attribute to each row automatically as it comes out or after the fact? Or is there another way to attack this problem that I do not see?
    Thank you in advance for the help.
    --Mike                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    you can take the results payload and loop thru with the while statement, then you can iterate thru each result and doing whatever you need to. Just make a counter variable of type int and count the number of records in the payload, then initialize a iterator varible on int and set to 0.
    then just loops thru the payload and add +1 to iterator until it reaches the count number. This allows you to hit each records one by one, and do any kind of analysis on the current record set.

  • Iterating through HashMap

    I found a tutorial and am wrote this into my code:
    for (Iterator i=m.entrySet().iterator(); i.hasNext(); ) {
    Map.Entry e = (Map.Entry) i.next();
    System.out.println(e.getKey() + ": " + e.getValue());
    Now I get the exception:
    Exception in thread "main" java.lang.ClassCastException
    on the line
    Map.Entry e = (Map.Entry) i.next();
    Is there another way to iterate through the Hashmap so I can print the keys and values?

    Results are
    java.util.Collections$UnmodifiableMap
    java.lang.Integer
    I used keySet and my Keys are Integers
    Maybe I should have used entrySet
    When I use entrySet I get:
    java.util.Collections$UnmodifiableMap
    java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet$UnmodifiableEntry
    java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet$UnmodifiableEntry
    java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet$UnmodifiableEntry
    java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet$UnmodifiableEntry
    java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet$UnmodifiableEntry
    java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet$UnmodifiableEntry
    java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet$UnmodifiableEntry
    java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet$UnmodifiableEntry
    Exception in thread "main" java.util.NoSuchElementException
    at java.util.HashMap$HashIterator.nextEntry(HashMap.java:765)
    at java.util.HashMap$EntryIterator.next(HashMap.java:804)
    at java.util.Collections$3.next(Collections.java:1324)

  • Personisation of Columns coming from Iterator in Result List

    Hi,
    We have a custom-developed search view and search result view. The columns of the search result view are dynamically generated through an Iterator object. So these aren't available in Personalization. The customer would like to, at least, modify the width (because there are too many columns and so the contents aren't displayed fully).
    Any idea how we can achieve this functionality?
    Thanks in advance,
         Rohan.

    Could not find an answer...

  • Iterating through List View Items using Group By and Jquery

    In my listview to my document library, I am using grouping. For each group (using month), it lists all the documents pertaining to that particular month.
    Using JQuery, I need to go through each item and parse them, but I'm having trouble finding a usable selector for the for/each function. My parsing code (JQuery) works, but since it uses the class of the table cell with a child anchor, it basically
    finds the first item and then all the subsequent file names are named the same (instead of different names, like it should be).
    Here's my current code that doesn't work (only the iteration and naming separately for each file - the parsing I'm doing seems to work):
    $(".ms-wpContentDivSpace" ).each(function( index ) {
    var val=$(".ms-vb2 a").html();
    var val2=val.replace(/_/g," ");
    $(".ms-vb2 a").html(val2);
    any ideas?

    That's because
    $(".ms-vb2 a").
    is bringing back all the pieces that have that class with an anchor on the whole page, not just the ones in the .ms-wpContentDivSpace
    I don't know the exact syntax, but I think you need to iterate through all the '.ms_vb2 a' items as well - there are multiple ones, and do something like this inside your other grouping
    $(".ms-vb2 a").each(function(index) {
        var val=$(this).html();
       var val2=val.replace(/_/g," ")
       $(this).html(val2);
    That's not quite right but maybe that will help.
    Robin

Maybe you are looking for

  • Table maintenance generator - + symbol instead of field label

    Hi All, I have created the table maintenance generator for the table and I have created theh transaction code the same as like SM30 and if I execute that transaction ocde, I can see all the fields with the correct description at the initial screen le

  • The operation couldn't be completed. (kSMErrorDomainLaunchd error 6 - The specified job could not be found.)

    Boot camp 4, When download win7 support software problem " The operation couldn't be completed.(kSMErrorDomainLaunchd error 6 -The specified job could not be found.) And unable to download "Can'tinstall Windows Support Software because it is not curr

  • Iview Personalization Transport

    Hi, I have personalized 'Time Accounts' and Leave requests Iviews to restrict "Deductible From & Deductible to" columns following the SAP Note 1243273. These changes are working fine in development system  but when i transport these changes to test s

  • Backup terminated in qulity system.

    Hi Experts, When i am trying to take the backup of our quality system it alway's termintates with error. I am taking  backup using BRTOOLS. error message:---- BR0278E Command output of 'LANG=C dd obs=1024k bs=1024k if=/oracle/DCQ/sapdata5/dcp_38/dcp.

  • Transport request failure

    My BEx request failed with errors while moving to Q. I just want to collect those queries again and make sure all their elements are captured. How do I do that? Once I have moved the queries with new request to Q,  Will I have to include the old requ