How to refer to a particular message

Hi all,
In java mail api's it is mentioned
Since message numbers can change within a session if the folder is expunged , clients are advised not to use message numbers as references to messages. Use Message objects instead.
but while developing web based email system ( like yahoo).....
i first collect 10 msgs from folder and display them .
now to give some reference to these 10 msgs i need to give some identification so that when user selects one of these message it would lead to different screen which will display the content of that message.
And this identification is message No. In the other screen i get this message no use this method
folder.getMessage( msgno);
Giving message number identification is unsafe only when user do some delete action on that folder. In my programme after deleting the message the folder is expunged closed and re-opened and then again 10 msgs are displayed on screen.
I guess it wont be a problem.
In API's it is said that instead of message number message objects can be used for reference. But i cant find any method in folder class where i can get a message with any other reference than message number.
does anyone have a better solution to this.

When you perform a Folder.getMessages() you get an array of Messages returned. This is your list of objects that reference messages. The api doc states that this reference always refers to a message regardless of whether the message number changes due to an expunge. So this insulates you from the volatility associated with message numbers.
The issue you have to deal with is whether a change took place to inbox in between the time you performed the Folder.getMessages()] and the next action upon the mailbox. Specifically, you should code to handle the expunging of the message outside of your application, by testing isExpunged and catching MessageRemovedExceptions. With every interaction you should refresh the message list, ingoring messages marked as expunged.
I hope that helps.

Similar Messages

  • How to refer to a particular field in Table Control.

    Hi,
            How can we refer to a particular field in a table control like 5th row 6th column. The actual requirement of mine is, i have a column with listbox. For each row i need to have different values for the list box. So i need to refer to that particular field in the column and assign the list values. Please kindly help.
    Regards,
    Vinay.

    hi,
    TABLE CONTROL -
    http://www.geekinterview.com/Interview-Questions/SAP-R-3
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbaa4735c111d1829f0000e829fbfe/content.htm
    http://www.sapgenie.com/abap/example_code.htm
    http://help.sap.com/saphelp_46c/helpdata/en/08/bef2dadb5311d1ad10080009b0fb56/content.htm
    http://www.sapgenie.com/links/abap.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c9/5472fc787f11d194c90000e8353423/frameset.htm
    Eg of table Control:
    http://members.aol.com/_ht_a/skarkada/sap/table_control/
    table_control.htm
    http://www.sapdesignguild.org/resources/MiniSG/3_Managing/3_Functions_Table_Control.htm
    Table control in BDC
    http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/45/adee2396f711d1b46b0000e8a52bed/frameset.htm
    Regards,
    Laxmi

  • HOW TO REFER TO A PARTICULAR LINE IN  A SCREEN FETCHED BY A MULTILINE QUERY

    Hi,
    Can anyone help me with an answer for the following problem:
    I have a screen where multiple records are displayed by a query. I want to change certain columns in each record and re-insert as new new record in to the same table. Can anyone tell me how to do that.
    Thanks & regards,
    VASUDEVAN
    my email is [email protected]

    I just want to make sure, this is the only way to do what i mentioned ? or it could be done another way !a) write the data to a new file
    b) delete the old file
    c) write the data to a newer file
    d) delete the new file
    e) rename the newer file to the old file name.
    For a hint about still more ways to do this, search for the complete lyrics of One man went to mow, Went to mow a meadow...
    db

  • How to refer a particular filed of a Table data type

    DECLARE
              CURSOR C1 IS SELECT
                                       GLUSR_USR.GLUSR_USR_ID BYER_ID,
                                       GLUSR_USR.GLUSR_USR_ADD1 BUYER_ADD
              FROM
                   GLUSR_USR
              WHERE
                   ROWNUM<=5;
    TYPE TBL_TYPE IS TABLE OF C1%ROWTYPE;
    TBL TBL_TYPE;
    BEGIN
         OPEN C1;
         FETCH C1 BULK COLLECT INTO TBL;
         CLOSE C1;
         FORALL I IN 1..TBL.COUNT
         INSERT INTO SATYA_TEMP VALUES(TBL.BYER_ID,TBL.BUYER_ADD);(How to use a particular field of TBL in this case).
         --INSERT INTO SATYA_TEMP VALUES TBL(I); (I know this)
    END;
    My question is how to refer a particular field of table type..?
    Please suggest.

    Then you have to create a record type and give all the columns inside it as given below.
    Then you can create a variable for this type and use it
    Type IS RECORD OF
    columnname1 table_name.column_name1%type,
    columnname2 table_name.column_name2%type,
    columnname3 table_name.column_name3%type,
    OR Use
    rec table%ROWTYPE;
    Edited by: Geek vishal on Aug 4, 2011 12:54 PM

  • I'm running Mac OS X version 10.6.8 How come I get this error message "You are running an operating system that Photoshop no longer supports. Refer to the system requirements for a full list of supported platforms." When I Try to download a FREE trail?

    I'm running Mac OS X version 10.6.8 How come I get this error message "You are running an operating system that Photoshop no longer supports. Refer to the system requirements for a full list of supported platforms." When I Try to download a FREE trail?

    Hi Brizill,
    Please refer to the help document below to understand the technical specifications for the same:
    System requirements | Photoshop
    Regards,
    Sheena

  • Outlook closes and will not download a particular message.How can i get that message to stop coming to my inbox?

    outlook closes and will not download a particular message.How can i get that message to stop coming to my inbox?

    Hi,
    May I ask your intention by doing this? Is the particular message harmful to your computer?
    Which type of email account are you using? If you want to prevent a particular message from being downloaded to Outlook, we can login to the web interface of your email account and then remove the particular email from your Inbox.
    If I've misunderstood something, please feel free to let me know.
    Regards,
    Steve Fan
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • Email automatically opens when browsing inbox. How do I reset email to only open when I click on a  particular message?

    My email automatically opens when browsing inbox mail. How do I reset eail so it only opens when I click on that particular message? Thanks

    ''locking as a dupe of https://support.mozilla.org/en-US/questions/1015428''

  • Defaulting messages to a particular message area

    Hi All,
    I have two applications running on same screen, One at top and another one just below it  . Both have their own message area. When applications are run individually, messages are getting shown in their respective message area. However on screen (when both are on same screen) messages of second application which is at bottom are not shown at correct place. They are getting displayed at the top of the view. How can I default the messages to a particular message area  so that messages are shown in correct place.
    Regards,
    Madhvika

    Dear Madhvika,
    You cannot use two message area in the same view. you need to do workarround.
    Please refer to http://forums.sdn.sap.com/thread.jspa?messageID=6662710#6662710
    http://forums.sdn.sap.com/thread.jspa?messageID=3558690#3558690
    Best Regards,
    Arun Jaiswal

  • How-to get rid of ADF messages (10.1.3 Production)

    In JDev 10.1.3 Production, how does one get rid of these ADF WARNINGs and NOTIFICATIONs?
    Regards,
    Al Malin
    P.S. Thanks for the release :-)
    [Starting OC4J using the following ports: HTTP=8988, RMI=23891, JMS=9227.]
    **** Unable to obtain password from principals.xml. Using default.
    C:\jdev1013\jdev\system\oracle.j2ee.10.1.3.36.73\embedded-oc4j\config>
    C:\jdev1013\jdk\bin\javaw.exe -client -classpath C:\jdev1013\j2ee\home\oc4j.jar;C:\jdev1013\jdev\lib\jdev-oc4j-embedded.jar -Xverify:none -DcheckForUpdates=adminClientOnly -Doracle.application.environment=development -Doracle.j2ee.dont.use.memory.archive=true -Doracle.j2ee.http.socket.timeout=500 -Doc4j.jms.usePersistenceLockFiles=false oracle.oc4j.loader.boot.BootStrap -config C:\jdev1013\jdev\system\oracle.j2ee.10.1.3.36.73\embedded-oc4j\config\server.xml
    [waiting for the server to complete its initialization...]
    Ready message received from Oc4jNotifier.
    Embedded OC4J startup time: 9688 ms.
    Target URL -- http://158.52.196.54:8988/gpa-ViewController-context-root/faces/logon.jsp
    06/01/31 13:34:28 Oracle Containers for J2EE 10g (10.1.3.0.0) initialized
    Jan 31, 2006 1:34:31 PM com.sun.faces.config.rules.ConverterRule end
    WARNING: [ConverterRule]{faces-config/converter} Merge(javax.faces.Short,null)
    Jan 31, 2006 1:34:31 PM com.sun.faces.config.rules.ConverterRule end
    WARNING: [ConverterRule]{faces-config/converter} Merge(null,java.lang.Short)
    Jan 31, 2006 1:34:31 PM com.sun.faces.config.rules.ConverterRule end
    WARNING: [ConverterRule]{faces-config/converter} Merge(javax.faces.Byte,null)
    Jan 31, 2006 1:34:31 PM com.sun.faces.config.rules.ConverterRule end
    WARNING: [ConverterRule]{faces-config/converter} Merge(null,java.lang.Byte)
    Jan 31, 2006 1:34:31 PM com.sun.faces.config.rules.ConverterRule end
    WARNING: [ConverterRule]{faces-config/converter} Merge(javax.faces.Integer,null)
    Jan 31, 2006 1:34:31 PM com.sun.faces.config.rules.ConverterRule end
    WARNING: [ConverterRule]{faces-config/converter} Merge(null,java.lang.Integer)
    Jan 31, 2006 1:34:31 PM com.sun.faces.config.rules.ConverterRule end
    WARNING: [ConverterRule]{faces-config/converter} Merge(javax.faces.Long,null)
    Jan 31, 2006 1:34:31 PM com.sun.faces.config.rules.ConverterRule end
    WARNING: [ConverterRule]{faces-config/converter} Merge(null,java.lang.Long)
    Jan 31, 2006 1:34:31 PM com.sun.faces.config.rules.ConverterRule end
    WARNING: [ConverterRule]{faces-config/converter} Merge(javax.faces.Float,null)
    Jan 31, 2006 1:34:31 PM com.sun.faces.config.rules.ConverterRule end
    WARNING: [ConverterRule]{faces-config/converter} Merge(null,java.lang.Float)
    Jan 31, 2006 1:34:31 PM com.sun.faces.config.rules.ConverterRule end
    WARNING: [ConverterRule]{faces-config/converter} Merge(javax.faces.Double,null)
    Jan 31, 2006 1:34:31 PM com.sun.faces.config.rules.ConverterRule end
    WARNING: [ConverterRule]{faces-config/converter} Merge(null,java.lang.Double)
    Jan 31, 2006 1:34:31 PM com.sun.faces.config.rules.ValidatorRule end
    WARNING: [ValidatorRule]{faces-config/validator} Merge(javax.faces.LongRange)
    Jan 31, 2006 1:34:31 PM com.sun.faces.config.rules.ConverterRule end
    WARNING: [ConverterRule]{faces-config/converter} Merge(javax.faces.DateTime,null)
    Jan 31, 2006 1:34:31 PM com.sun.faces.config.rules.ConverterRule end
    WARNING: [ConverterRule]{faces-config/converter} Merge(javax.faces.Number,null)
    2006-01-31 13:34:33.390 WARNING The AdfFacesFilter has not been installed. ADF Faces requires this filter for proper execution.
    2006-01-31 13:34:33.421 NOTIFICATION ADF Faces is running with time-stamp checking enabled. This should not be used in a production environment. See the oracle.adf.view.faces.CHECK_FILE_MODIFICATION property in WEB-INF/web.xml
    2006-01-31 13:34:34.531 WARNING The AdfFacesFilter has not been installed. ADF Faces requires this filter for proper execution.
    2006-01-31 13:34:34.578 WARNING The AdfFacesFilter has not been installed. ADF Faces requires this filter for proper execution.
    2006-01-31 13:34:55.734 WARNING The AdfFacesFilter has not been installed. ADF Faces requires this filter for proper execution.
    Jan 31, 2006 1:34:57 PM com.whirlpool.sjtc.gpa.view.backing.LogonBB logon
    INFO: malinaa logged on
    2006-01-31 13:34:57.640 WARNING The AdfFacesFilter has not been installed. ADF Faces requires this filter for proper execution.
    2006-01-31 13:34:57.671 WARNING The AdfFacesFilter has not been installed. ADF Faces requires this filter for proper execution.
    2006-01-31 13:35:03.640 WARNING The AdfFacesFilter has not been installed. ADF Faces requires this filter for proper execution.
    Jan 31, 2006 1:35:03 PM com.whirlpool.sjtc.gpa.view.backing.SearchBB appListenSearch
    INFO: Search wherePredicate=a.requester_emp_id_key = sjtcapp.emp_id_key_fcn('malinaa') SessionInfo: gpaNbr/userid/PAInfo=null/malinaa/null
    2006-01-31 13:35:04.031 WARNING The AdfFacesFilter has not been installed. ADF Faces requires this filter for proper execution.
    2006-01-31 13:35:04.062 WARNING The AdfFacesFilter has not been installed. ADF Faces requires this filter for proper execution.
    2006-01-31 13:35:06.515 WARNING The AdfFacesFilter has not been installed. ADF Faces requires this filter for proper execution.
    Jan 31, 2006 1:35:06 PM com.whirlpool.sjtc.gpa.view.backing.ProductApprovalBB <init>
    INFO: Constructor. SessionInfo: gpaNbr/userid/PAInfo=100002/malinaa/null
    Jan 31, 2006 1:35:07 PM com.whirlpool.sjtc.gpa.view.backing.ProductApprovalBB populateFormFields
    INFO: Populate - pa.retrieve(). SessionInfo: gpaNbr/userid/PAInfo=100002/malinaa/null
    2006-01-31 13:35:07.687 WARNING The AdfFacesFilter has not been installed. ADF Faces requires this filter for proper execution.
    2006-01-31 13:35:07.718 WARNING The AdfFacesFilter has not been installed. ADF Faces requires this filter for proper execution.

    Right my point was this is standard logging and you can control it.
    As it happens the only warnings I get are from com.sun.faces.* - You'll have to ask Sun why they are putting out at that level.
    I don't know why the Filter errors are coming up - that is not normal and suggests that there is a configuration problem
    The particular message:
    006-01-31 13:34:33.421 NOTIFICATION ADF Faces is running with time-stamp checking
    enabled. This should not be used in a production environment. See the
    oracle.adf.view.faces.CHECK_FILE_MODIFICATION property in WEB-INF/web.xmlWill only happen in the embedded OC4J and will disappear when the app is deployed unless you actively switch the feature on.

  • On the Comcast email site, on the "Inbox Preview" page, if I click on "View Entire Inbox" or on a particular message, Firefox will just return me to the Inbox P

    On the Comcast mail site, I cannot get past the "Inbox Preview" page. If I hit anything, including "View Entire Inbox" or on a particular message, or anything else, I'll just be returned to the "Inbox Preview" page. This only happens on Firefox. When it started happening, I finally gave up and tried Internet Explorer, which works fine. I'd prefer to access email on Firefox, so please tell me how to correct this.
    I don't know if this is related, but immediately before this started happening, I may have hit something on my laptop, which caused the Comcast email screen to magnify to the point where I could not view the message window on messages. I couldn't figure out how reverse this, so I did the above (went to IE, which was fine). When I next attempted to access Comcast email from Firefoxe, the site was no longer magnified, but I had the above problem with being unable to get past the Inbox Preview page.

    Many site issues can be caused by corrupt cookies or cache. In order to try to fix these problems, the first step is to clear both cookies and the cache.
    Note: ''This will temporarily log you out of all sites you're logged in to.''
    To clear cache and cookies do the following:
    #Go to Firefox > History > Clear recent history or (if no Firefox button is shown) go to Tools > Clear recent history.
    #Under "Time range to clear", select "Everything".
    #Now, click the arrow next to Details to toggle the Details list active.
    #From the details list, check ''Cache'' and ''Cookies'' and uncheck everything else.
    #Now click the ''Clear now'' button.
    Further information can be found in the [[Clear your cache, history and other personal information in Firefox]] article.
    Did this fix your problems? Please report back to us!

  • How do I fix this error message??

    How do I fix this error message
    "This message could not be delivered and will remain in your Outbox until it can be delivered.
    The SMTP server "smtp.mac.com" doesn't support TLS (SSL) on port 25. Please check your account settings and try again."
    ThANK YOU!!!
    Rich

    Mail Help has some articles devoted to sending problems, e.g. “I can't send email” or “I can't send email because the connection to the server on port 25 timed out”. You may want to take a look at them in case there is something there that applies to you.
    Something that usually works if you’re trying to use an outgoing (SMTP) server different from the one provided by your ISP (and in the case of .Mac in particular) is changing the outgoing server port to 587 instead of 25 in Preferences > Accounts > Account Information > Outgoing Server Settings.

  • How to show a single error message for all fields

    Hi
    I have a JSF from containing around 10 controls(input, select etc.) .
    Now I need to display an error message in case any of the mandatory control has validation error.
    Message format would be like
    "*Please,Complete the fields marked with yellow!"* The message I need to show in a div tag with Yelow background.
    Currently, I am getting individual default error message in case validation fails and related field is bordered with Yellow.
    My code is below.
    *<h:panelGrid columns="3">*
    *<h:outputText value="#{msgProv.bi_firstname}" />*
    *<h:outputText>*
    *<rich:spacer width="100px"></rich:spacer>*
    *</h:outputText>*
    *<h:panelGroup>*
    *<h:inputText*
    *value="#{brokerInformationFields.firstName}"*
    *label="#{msgProv.bi_firstname}" id="firstName" required="true">*
    *<f:validateLength maximum="10" minimum="2" />*
    *<rich:ajaxValidator event="onblur" />*
    *</h:inputText>*
    *</h:panelGroup>*
    *<h:outputText value="#{msgProv.bi_lastname}" />*
    *<h:outputText>*
    *<rich:spacer width="100px"></rich:spacer>*
    *</h:outputText>*
    *<h:panelGroup>*
    *<h:inputText label="#{msgProv.bi_lastname}" id="lastName"*
    *value="#{brokerInformationFields.lastName}" required="true">*
    *<f:validateLength maximum="20" minimum="1"/>*
    *<rich:ajaxValidator event="onblur" />*
    *</h:inputText>*
    *</h:panelGroup>*
    *<h:commandLink action="#{brokerInformationActions.submit}">*
    *<h:graphicImage value="/images/axa/btn_submit_from.png" style="border:0px;"/>*
    *</h:commandLink>*
    I am using (JSF1.2,Rich Faces 3.3.0,Facelets.)
    And a Phase Listener from
    http://balusc.blogspot.com/2007/12/set-focus-in-jsf.html
    This Phase listener is to border the control with Yellow in case validation fail.
    Now my Query
    *1) How can I show a single message for all fields as I marked above in case of validation failure?*
    *2) Now, the control is becoming yellow borderd when user clicks the submit button and validation fails.*
    *User can move from one control to other using tab. That time proper validation message is appearing.*
    *but the border of the control is not changing to yellow.*
    *What's the correcion can be made to meet that requirement too.*
    regards
    Roy

    Hi Nabheet,
    Thanks for your response.
    The FM returns the error messages if they are standard ones. For example, if the posting period is closed - the FM will not allow the Workflow to proceed further.
    But in this case, I have a custom error - for a particular Profit center, Cost center and I/O fields are mandatory(not at time of parking, but should be filled before posting).
    Since this is not a standard error, this FM will not stop workflow from proceeding further. How can I have the custom error captured in this FM?
    Thanks.

  • HT201774 How do I delete excess email messages from my iPhone.  There are 300 messages listed, and every time I delete some, more are added from old messages.  How do I limit the number of messages that can appear on my phone?  How can I delete messages i

    How do I delete excess email messages from my iPhone.  There are 300 messages listed, and every time I delete some, more are added from old messages.  How do I limit the number of messages that can appear on my phone?  How can I delete messages in bulk,

    You can't.
    All photos transferred from your computer are stored in the Photo Library. The photos in the album or albums below are not duplicates - they include a pointer to the original photos stored in the Photo Library. This way you can view the photos in a particular album only by selecting the album, or you can view all photos available in all albums by selecting Photo Library.
    Just as with an iTunes playlist. A song cannot be in an iTunes playlist unless the song is in the main iTunes library. Placing a song in a playlist does not duplicate the song. Remove the main iTunes library or the songs from the main iTunes library that are in a playlist and the songs will no longer be in the playlist either. This way you can listen to the songs in the playlist only by selecting the playlist, or all songs in your entire iTunes library by selecting Music under Library in the iTunes source list.
    The same with iPhoto on a Mac. A photo cannot be in an in iPhoto Event or Album unless the photo is in the main iPhoto library. Placing a photo in an Event or Album does not duplicate the photo. This way you can view the photos in an iPhoto Event or Album only by selecting the Event or Album, or all photos in all Events or Albums.

  • How do I show number of messages in mailboxes for Mail?

    I can't figure out how to show the number of messages in my mailboxes. When I go to View > Message Attributes, Number is grayed out. Nothing in Customize Toolbar that would suggest #. Any advice? Thanks!

    no, like in classic, there was a column "#" which showed how many messages you had in that particular email account. but all that info is in the email itself, but no total of emails for that mailbox. When I go to View > Message Attributes, "Number" is grayed out. thanks for your input.

  • How to search for a particular pattern in a string

    Hi,

    Hi ,
    How to search for a particular pattern in a string?
    I heard about java.util.regex; and used it in my jsp program.
    Program I used:
    <% page import="java.util.regex"%>
    <% boolean b=Pattern.matches("hello world","hello");
    out.println(b);%>
    I run this program using netbeans and am getting the following error message.
    "Cannot find the symbol : class regex"
    "Cannot find the symbol : variable Pattern "
    How to correct the error?

Maybe you are looking for

  • Can I choose which attachments download in mail

    Hello first post. I recive a lot of emails with large 1-3mb pictures attached for work. It is eating up my monthy 5gb on air card. Is there a way I choose the pictures to download? I would love to do it like my Iphone does.

  • Blank Screen after fingerprint swipe

    My start-up procedure is fine, until I read "swipe your finger" and do so. Then my screen goes blank, except for the cursor and "The Shield Deluxe" in small print at the top of my screen (that's the virus checker I use). I struggled with this for hou

  • How to force the Netscape Browser to open the "Open or Save" dialog box?

    Hi, I tried to force the browser to open the "Open or Save" dailog box for downloading a file. response.setContentType(context.getMimeType(file.getName())); response.setHeader("Content-Disposition", "attachment; filename=\"" + file.getName() + "\"");

  • BAPI_EQUI_CHANGE - Update Partner Function

    Hello, We are trying to update equipment partner function by using BAPI_EQUI_CHANGE, but its not happening. Please provide your valuable inputs on this. Thanks, Amit.

  • Missing file stops DVDSP project opening- help!

    I've been working on a DVDSP project for a month now. I came to open it today and get the message "Searching for movie data file "name" Fin 000 00012.It gives me the option to search for the file, which proves fruitless. then i get the message that t