Iterating through fields in object

Is there a way for me to iterate through the fields in an object?
I have a helper class that basically contains several variables with assigned values.
How can I iterate through the variables in this class?
I basically want to check the contents and re-assign a value as I loop through.
Thanks

Here is what I am really trying to accomplish.
I have a jsp that is get back values from the database.
Before I attempt an update, I retrieve the record from the database.
The fields that are showing up blank in Oracle. Nulls are allowed.
When the record is retrieved, my jsp shows null in the text box after I do a setAttribute.
The problem is that the "null" is text. So now when I actually update to the database,
I end up with a text string that says "null" instead of actually having a null value in the database for that field.
So I need some sort of null check before I populate my jsp, so that I can just have a blank field and I think that would solve my problem.
Thanks

Similar Messages

  • Iterating through master view objects and child view objects in same page

    I am working on a project using ADF UIX and Business Components.
    I have an application module with two view objects one the master view object and the second the detail object. They are related via a view link.
    I would like to iterate through the master view objects displaying a customer name as bold text and then below each customer name I'd like to display the detail records in a table via the detail view object i.e. a seprate table for each customer.
    Is this possible - I haven't had much luck!?
    Thanks in advance.

    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

  • 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

  • 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()

  • Content server for Document attachment through "services for object" Icon.

    Guys,
    I have typical problem in installation of Content server for storing external documents.
    We all know that we can attach the document in SAP using the icon “SERVICES FOR OBJECT”. By this we can attach the document to the specific object we want.
    -Since my client wants only document attachment method not to completely implement SAP DMS, I proposed this method of attaching documents through services for object method.
    -If documents are stored though services for object ,The attached document will directly get stored in sap database(correct me if I am wrong) while  in  DMS it ask you to select the storage location while u check in for any document
    -By storing the doc thru "services for object " For long run when we store the documents in sap database our system will drastically get slow down.
    -In this regard I have a plan to incorporate external storage server.
    -Now I should know that how I should customize content server configuration so that the attachment through services for object will store into this content server I need to know how to define Client, Content Category, Content Repository, Document Area, Physical Machine, IP Address, Port. (OACT & OAC0)
    I appreciate for immediate solution and <u><b>Points will be rewarded for sure.</b></u>
    Regards,
    Murali.S

    Hi Murali,
    Don't Worry, its possible,
    All attachments can be stored in SAP Content Server also, but through archiving process.
    Set up a database storage system.
    Preparation
    Make sure that the HTTP plugin is active.
    Transaction <b>SMICM,</b> "Display Services" function key (shift F1)). The list of services must contain a port other than 0 for HTTP.If not, you must adjust the relevant profile parameter.
    <u>Typical entry:</u>
    icm/server_port_0         PROT=HTTP, PORT=1080, TIMEOUT=900
    <b>Make sure that the /sap/bc/contentserver service is active.</b>
    If no user is defined, then use transaction SU01 to create a new user. Use the "System" user type.Assign
    the SAP_ALL and SAP_NEW profiles to the user. (Eg: HRUSER/PLMUSER/PPUSER etc)
    Transaction <b>SICF,</b> select: default_host - sap - bc -contentserver. Select the function to display/change the service. Make sure that a user is defined.
    Using the relevant data from the newly created user, maintain the anonymous logon data for the
    /default_host/sap/bc/ service and save & activate the changes in transaction <b>SICF</b>.  Double click on content server and give the user name which has been created (HRUSER/PLMUSER/PPUSER/MMUSER etc)
    Check the system PSE.
    Start transaction <b>STRUST</b>. Expand the system PSE. The system PSE must be "green" for each application
    server.
    Determine a suitable exchange directory.
    The exchange directory must be accessible from each application server. If all application servers are running on the same platform (for example, Windows), one network directory that is accessible on all application server (for example,
    server\share) is sufficient. You can generally use the global directory
    (profile parameter DIR_GLOBAL).You can use the RSPARAM report to determine the profile parameters.
    Setting up the storage
    Create a table for storing the data. Using transaction <b>SE11</b>, create a copy of the SDOKCONT1
    table. If you want to create the repository database, you can name the table ZCONT_DB, for example. Save the
    table as a local object. Activate the table.
    Create a repository.
    Use transaction <b>OAC0</b> to create a new repository.
    Use the following parameters:
    Repository Max. two characters, for example,” Z1”
    DocArea: ARCHLINK
    Storage type: R/3 database
    Storage subtype: normal
    Version no. : 0046 
    Contents table <table name> for example: ZCONT_DB
    Exchange directory <directory name> for example:
    server\share\
    Make sure that the exchange list ends with a \ (or /on Unix).If you are using a variety of platforms, you must use transaction FILE to define a suitable logical file name and use this name. Save the settings.
    1. Maintain view table <b>TOAAR_C</b>, via SM31
       Cross client table displayed as information, forget it
    2. In field 'StSytm' you must entered 'Z1' as your system need, or anything that you need but you must configure HR Archive link too.
    3. In field 'Arch.path' (direct above Spoolpath), entered path in your system, this real path in your operating system. May be you should confirm to your Basis consultant where exactly you could store picture files. So if you enter '/', your file exists at root directory at your UNIX system.
    4. Choose 'File store' radio button
    5. Save.
    First
    <b>1. You have to create a number range for SAP ArchiveLink.
        IMG: Basis Components-> Basis Services -> SAP ArchiveLink -> Basic Settings-> Maintain number ranges   
        (Trxn <b>OANR).</b> Create number range 01 from 0000000001 to 9999999999 without the external number flag. 
    2. Document type <b>HRICOLFOTO</b> must exist with document class JPG.
        IMG: Basis Components->Basis Services->SAP ArchiveLink->System Settings->Maintain document types
        (Table<b> TOAVE, Trxn OAC2).</b>
    3. Document type <b>HRICOLFOTO</b> must be linked to object type PREL and Infotype PA0002.
        IMG: Personnel Management->Personnel Administration->Tools->Optical archiving->Set up Optical Archiving
        in HR.  (View V_T585O, no Trxn). In the first two columns there are minuses, the third (Date) has
       a plus - don't put a flag in the check box.
    4. Check which content repository (Archive) is linked to document type HRICOLFOTO and object type  
        PREL. IMG: <b>Basis Components->Basis Services->SAP ArchiveLink->Basic Settings->Maintain Links (Table 
       TOAOM_C, Trxn).</b></b>
    Test
    • Test the repository.
    Use transaction SE38 to start the RSCMSTH0 report. Specify your repository (i.e. Z1) and start the test.
    The report must run without errors. If no problems occurred, you can use the new repository with Archive Link after you carry out the Archive Link Customizing. If problems do occur, check whether one of the related
    notes helps.
    For More Details :
    http://service.sap.com/archivelink.
    <u><b>
    NOTE:- Screen Shots are missing, i was not able to paste here, One more thing is we did this for uploading a PHOTOS into Content Server, Similarly you have to create a REPOSITORY and Z-TABLE to bring all the Attachments from all the selected Objects and then route them to the CONTENT REPOSITORY.</b></u>
    Your Senior ABAP guy would help you in this, if not i may try to help you more by monday.
    Regards
    Rehman
    <b>Reward Your Points if Satisfied.</b>

  • 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 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.

  • 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.

  • Field.get(Object obj) now returning null with Generics (Java 5.0) ??

    Hello,
    I'm currently using Java 5.0 (especially for the Generics part) on a new Java/J2EE project, but having a strange issue with code working previously in a Java 1.4 project.
    Below is an overriding of the toString() method provided by the Object class which allow me to view nicely in debug (dev. mode) the contents of my Transfer Objects (all the TO's must extend this ATO abstract class).
    Previously this code displayed me something like:
    [field1 => value1, field2 => value2] ... for a TO (sort of "Javabean") having e.g. two String fields with values initialized to "value1" (resp. "value2").
    But unfortunately, this does (or seems) not to work anymore, having such display :
    [field1 => null, field2 => null]I tried to debug, and the problem is that the call fieldValue = field.get(this); returns null while it should returns the actual value of the field.
    I thing it it strongly related to Generics, but could not at the moment found how/why it does not work.
    May someone help...? Thanks.
    public abstract class ATO {
        // Reflection for field value display
        public String toString() {
            StringBuffer sb = new StringBuffer("[");
            MessageFormat mf = new MessageFormat("{0} => {1}, ");
            Field[] fields = this.getClass().getDeclaredFields();
            for (int i = 0; i < fields.length; i++) {
                Field field = (Field) fields;
    String fieldName = field.getName();
    Object fieldValue = null;
    try {
    fieldValue = field.get(this);
    } catch (IllegalArgumentException e) {
    } catch (IllegalAccessException e) {
    mf.format(new Object[] { fieldName, fieldValue }, sb, null);
    if (sb.length() > 1) {
    sb.setLength(sb.length() - 2);
    sb.append("]");
    return sb.toString();

    ejp wrote:
    Field field = (Field) fields;
    This cast is unnecessary.
    Effectively, I haven't noticed it yet. Fixed.
    } catch (IllegalArgumentException e) {
    } catch (IllegalAccessException e) {
    }Either the field value really is null or you are getting one of these exceptions which you are ignoring. Never write empty catch blocks.That's true, I missed something. Fixed with some code to log the eventual exceptions.
    Thanks for you answer.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • 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);
    }

  • Through SharePoint Client Object model, how to make color coded events on Sharepoint Calendar

    Hi,
    Through SharePoint Client Object model, how to make color coded events on Sharepoint Calendar.
    Plese share your knowledge.
    Regards
    Tharak

    Hi,
    According to your post, my understanding is that you wanted to make a color events Calendar.
    We can achieve it using the OOB method by creating the Calendars Overlay.
    http://summit7systems.com/color-code-calendar-events-in-sharepoint/
    You can also use the JavaScript to achieve it.
    http://spsawyer.wordpress.com/2013/07/18/sharepoint-color-calendar/
    http://www.planetwilson.co.uk/sharepoint-2013-colour-calendar-v2/
    more reference:
    http://usermanagedsolutions.com/SharePoint-User-Toolkit/Pages/Color-Coding-Calendar-List.aspx
    http://blog.pathtosharepoint.com/2010/04/06/tutorial-add-color-coding-to-your-sharepoint-2007-calendar-in-15-minutes/#comment-7231
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • 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

  • How to pick the field "Origin Object" from SAP R/3

    Hi all,
    I need to implement a new field in a BEx Report : "Origin Object". This data is mix of "Cost Center" + "Project type", it's related to the PS module.
    This field isn't available in my BW datawarehouse, so I need to figure out where and how to pick up it in R/3. I used the "data element" name : "CO_USPOB" and I've made a research through the "Where used list" tool but I didn't find any tables, only some structures. I've checked all of these structures but I didn't get any tracks...
    Do you know another way to investigate? is there any doc. on the SAP.help about this data element?
    Thanks in advance for your suggestions.
    Jak

    Hi,
    If you know the transaction where the field can be seen. Then run the trace on that transaction and in the Trace list you will see all the tables accesed during the tranasaction execution. Then you can get the correct table from the table list
    Thanks,
    Nagarjuna

  • Adding new field in Objects(Equipment) either using AET or EEWB.

    I have to add a new field in the screen for Objects (under Processing data). To do the same first i tried using AET but i get the "Show Enhancements" and "Create New Fields" buttons grayed out in AET so i assume that AET is not available for Objects(Equipments). Is this assumption right?
    Now i tried to add this field through EEWB , so i have to choose a EEW Business Object from the list . Which EEW Business should i choose? I tried choosing INDIVIDUAL_OBJECT but then the only sub-type i can choose is ADS(analytical data storage). Is this right? If no then which EEW Business Object do i choose?

    Hi,
    Basically, the determination process which application(Sales Order, Service Order, Campaign, Account, Contact, etc) can be enhanced by AET depends on 2 registry information.
    1. UI Object Type - Enhanced Object Assignment. Open the table BSP_DLC_OBJ_TYPE.
        You see in this table for most of OBJECT_TYPE there is EXT_BO assigned.
        If you start AET from one of the application through Config Tool, the application passes the UI Object Type to the Config Tool   and the Config Tool passes it again to AET. And AET looks into this table. If there is an EXT_BO found, it makes the "Create New Field" and "Show Enhancement" button active. This is the main determination process.
    2. In AXTREG you can find also UI Assignment Node. Here you can find a list of component and view which is registered to a given enhanced object(EXT_BO). However, this list is not complete, because the list of component and view which should support AET gains by the time. So AET does not really rely on this information.
    Some of applications are only specialization of the basis application. I.e. BP Financial Service is specialized of BP, BP Identification in IC Web Client is specialized of BP. So basically, if you enhance the account with new field, this field should also available for BP Financial Service and BP Identification.
    Unfortunately, I cannot answer the initial question, because I do not have knowledge about the Equipment object.
    Regards,
    Steve

  • Check while MIGO, to check document is attched through SERVICE FOR OBJECT

    Hi,
    While creating a document through MIGO,
    I want to apply a check that during 101 movement type if document is not attached , system should throw a error message
    'Attach document first'.
    Is it possible ?
    If yes , then through which progess BADI or user-exit ?

    Hi
    The authorization objects for attachment to material are as following:
    Object Class BC_Z Basis - Central Functions
    Authorization Object: S_BDS_DS  
    Authorizations for Document Set
    Authorization Field ACTVT :  30
    Authorization Field CLASSNAME:BUS1001
    Authorization Field CLASSTYPE:BO
    other ACTVT
    01     Create or generate
    02     Change
    03     Display
    04     Print, edit messages
    05     Lock
    06     Delete
    24     Archive
    25     Reload
    30     Determine
    70     Administer
    78     Assign
    82     Supplement
    Note: That to be able to attach user should have MM02 authorization..
    Best Regards
    Hope it helps

Maybe you are looking for

  • Interactive VS. Classic Report

    Hi all, I have created both interactive report and classic report on the same table just for testing. http://apex.oracle.com/pls/apex/f?p=53917:1 You can see that the interactive report has link to single row view. How can I make my classic report to

  • Tabular form default column value bug when using named notation?

    Hi, I am using Application Express 4.0.2.00.07 After exporting and importing an application, the default value of a tabular form column results in an "ORA-00907: missing right parenthesis" error. My original application uses named notation while call

  • Update BDCP table custom infotype custom field

    Hi All, I have created  a custom infoype and added a custom field with in this infotype. I have clicked change document button for the dataelement. When i changed the value with in that infotype the entry is not updating in table BDCP. When i changed

  • Printing a list

    Hi I'm trying to write a method to print a list containing a music records details.an empty string should be used if certain information is not available. this information should then be excluded from the printing i.e. the method should print all non

  • When logging out of a website, a new tab opens to the closed page but the original tab is still open. How do I close first tab?

    When I open a site, such as a Credit card website, after I logon, but when I try to logout. When I hit the logout button, a new tab opens and this page is now the logged out page of the website, but the original tab is still open and the page is stil