How to use documentbeforesaved method? And why my code doesn't work in template files?

Can someone help me with these two codes?
----Beginning of code 1-------------
Private WithEvents App As Word.Application
Private Sub Document_Open()
Set App = Word.Application
End Sub
Private Sub App_DocumentBeforeSave(ByVal Doc As Document, SaveAsUI As Boolean, Cancel As Boolean)
MsgBox("BeforeSave")
End Sub
--------------End of the code----------------
Beginning of code 2--------------- Code 2 is from https://msdn.microsoft.com/en-us/library/office/ff838299(v=office.15).aspx
Public WithEvents appWord as Word.Application 
Private Sub appWord_DocumentBeforeSave _ 
 (ByVal Doc As Document, _ 
 SaveAsUI As Boolean, _ 
 Cancel As Boolean) 
 Dim intResponse As Integer 
Private Sub App_DocumentBeforeSave(ByVal Doc As Document, SaveAsUI As Boolean, Cancel As Boolean)
MsgBox("BeforeSave")
End Sub
In the first code, they have:
Private Sub Document_Open()
Set App = Word.Application
End Sub
 I test these two codes in "This document" object, and I find out the first code works but the second code are not!
Why second code doesn't work?
Extra question: I am using microsoft 2013. I insert this code into a macro-enabled template. But when I am about to save my file I am expecting these code works. However, they didn't work!
Thank you for solving these problem for me!

Hello,
Please note that the code snippet 2 in your post is different from the code snippet in the MSDN document. Also please read the comments of the MSDN code sample:
This example prompts the user for a   yes or no response before saving any document.
This code must be placed in a   class module, and an instance of the class must be correctly initialized to   see this example work; see
Using Events with the Application Object for   directions on how to accomplish this.
Public WithEvents appWord   as Word.Application
Private Sub   appWord_DocumentBeforeSave _
 (ByVal Doc As Document, _
 SaveAsUI As Boolean, _
 Cancel As Boolean)
 Dim intResponse As Integer
 intResponse = MsgBox("Do you really   want to " _
 & "save the document?", _
 vbYesNo)
 If intResponse = vbNo Then Cancel = True
End Sub
So the problem in your code snippet 2 is that you didn't put it into a class module and initialize the class module. If you just put it into ThisDocument, you have to initialize the word application object.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • How to read the method and put that code in 1 internal table

    Hi,
    Actually in the normal ABAP, if we want to read the report,  then we will write read report statement.
    If we want to read method then this statement will not work.
    So, to read the method and put that code in 1 internal table , which statement we need to write?
    Regards,
    Radhika

    Hi Naimesh,
    Thanks for your reply.
    As, i am not aware of ABAP Objects i am having some issues:
    Actually that is working for some methods in some classes.
    Here 1 issue is there:
    In se24 1 method is there in 1 class.
    Even by using that FM in SE37 i am able to get the program name by giving class and method name,
    but while using that FM in the program i am not able to get that program name.
    so, i am unable to read the source code of the program?
    1 example here:
    Class name is CL_GUI_FRONTEND_SERVICES.
    in this class, methods like FILE_EXIST , FILE_GET_SIZE, etc are there.
    By giving the class name and method name i am able to get the program name also,
    but while using that FM in the program i am not able to get that program name.
    so, i am unable to read the source code of the program?
    Here is my code:
    REPORT  Z16059_SCAN_METHOD.
    DATA: BEGIN OF I_PROGRAM OCCURS 0,
          LINE(256) TYPE C,
          END OF I_PROGRAM.
    DATA METHOD TYPE PROGRAM.
    DATA: BEGIN OF I_STRUCTURE,
          CLS_NAME(30) TYPE C,
          METH_NAME(61) TYPE C,
          END OF I_STRUCTURE.
    I_STRUCTURE-CLS_NAME = 'CL_GUI_FRONTEND_SERVICES'.
    I_STRUCTURE-METH_NAME = 'CL_GUI_FRONTEND_SERVICES-FILE_EXIST'.
    CALL FUNCTION 'SEO_METHOD_GET_INCLUDE_BY_NAME'
      EXPORTING
      MTDKEY             =  I_STRUCTURE
    IMPORTING
       PROGNAME          = METHOD
    EXCEPTIONS
       INTERNALMETHOD_NOT_EXISTING      = 1
       OTHERS                             = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    READ REPORT METHOD INTO I_PROGRAM.
    Please help me out in this regard.
    Thanks & Regards,
    Radhika

  • Why the code doesn't work???

    addWindowListener(new WindowAdapter(){public void windowClosing(){System.exit(0);}});
    when I press the x button ,it doesn't work as expected!!

    What are you expecting it to do? I should close the window and then exit the application. This is the code I use for all my applications and it does exactally that. Are you using it with a JFrame? or a JDialog?
    JFrame test = new JFrame();
    test.addWindowListener(new WindowAdapter() {
                public void windowClosing(WindowEvent evt) {
                    System.exit(0);

  • Why I can't use javac? and why my program doesn't pop up cmd window?

    I have 2 questions here:
    1) I try to compile my HelloWorld.java using command prompt,
    javac HelloWorld.java
    But it won't work; by right it should create a HelloWorld.class. When I go to Configure/Options/JDK Profile, it is already showing JDK version 1.6.0_07. My environment variables show User variables and System variables with C:\Program Files\Java\jdk1.6.0_07\bin. This is where my JDK is stored, but I don't know why I can't use javac. It keep saying
    'javac' is not recognized as an internal or external command, operable program or batch file
    2) Why is it when I run my java script using JCreator, the print out appear in the box below in JCreator and not in command prompt? How can I make it pop up on command prompt window?

    Things tend to move fasterYep... until something goes wrong... then you're completely stuffed, because you have no idea what's actually happening, because the idjit IDE is hiding all the gory details... it doesn't even tell you what it's doing, let alone how it's doing it, or what to do when it fails.
    Another argument for the command line is that it's simple. There are 16 distinct dialogues involved in adding a new jar to a library in jBuilder... There may well be less than 16 characters in the equivalent edition to the equivalent build command line. That's an extreme case, I admit, but it goes to disprove the notion that IDE's are simpler for noobs.
    Also, it's easier to get help on command line usage... because it's all text based you can just copy & paste the problematic command and it's output, and the eggspurts (tm) can do likewise with a response... and there are limited number of command lines out there... and *nix, windows, and mac cover maybe 99.5% of java users... and the eggspurts are likely to know all three (colectively if not as individuals) fairly well, because they deal with them all day every day.
    My belief is that noob's are better off at the command line until such time as they need (not just want to play with) a visual debugger... at which time its time to download netbeans and eclipse, and see which one suits you better... if you have money to splurge I'd also evaluate intelliJ... But avoid jBuilder, 2008 is total carp! The FREE eclipse is (IMHO) "nicer to use", and it has a LOT less bugs.
    Cheers. Keith.

  • I'm using ipod touch for a year now. I was using this morning and suddenly the ipod doesn't work at all maybe it got wet from my bag but there wasn't wet stuff in there. and itunes said iTunes has detected an iPod in recovery mode. please help me

    I'm using iPod touch for a year now. It was doing fine this morning but in the afternoon suddenly when I took it out of my bag, the screen was just black and it wouldn't turn on and stuff. So I thought it didn't have battery so I charged it didn't work. I plugged to the computer and it said iTunes has detected an iPod in recovery mode. You must restore this iPod before in can be used with iTunes.
    Maybe my bag was little wet today but i don't think that is why.. since it wasn't that bed.. just some paper was wet and stuff..
    What should I do..? Please help me.

    Connect to the Computer you Usually Sync with and Follow the Steps Here...
    Recovery Mode
    http://support.apple.com/kb/HT1808

  • Dynamic Photo Gallery in Flash using AS3.0 and XML, but it doesn't work and missed up my app.

    Hi,
    I am creating an iPad app using AS3. The app contains three sections.
    One of those sections (chocolate sources)contains Dynamic Photo Gallery using XML. The photos, thumbnails, and text in this section are loaded from XML.
    I faced may issue when I tried to run this app:
    The gallery photos didn't show up
    The thumbnails (buttons to navigate the photo gallery) didn't show up at all. (The thumbnails should show up under the photo gallery box.)
    The text doesn't show up (the text should be in every photo as describtion)
    I want to include Swipe in the photo gallery, how can I do that?
    When I click on "Chocolate Sources" button, the photo gallery appears in every section, here are print screens describe what I mean:
    The photo gallery covers the home screen too.
    Here is my XML:
    <?xml version="1.0" encoding="utf-8"?>
    <sources>
              <section>
                        <details>
                                            Cocoa tree exists in the tropics area, such as Central and South America.
                                  </details>
                                            <image>
                                                      <url>coca1.jpg</url>
                                                      </image>
                                                      </section>
              <section>
                        <details>
                        Cocoa is supplied in many countries such as Indonesia, Ghana, Brazil, Ecuador and Cameroon.
                        </details>
                                  <image>
                                  <url>coca2.jpg</url>
                                  </image>
                                            </section>
              <section>
                                  <details>
                                  Dark chocolate helps to relax and reduce the stress and blood pressure because it has antioxidants elements, which helps in vasodilatory process.
                                  </details>
                                            <image>
                                            <url>coca3.jpg</url>
                                                      </image>
                                                                </section>
              <section>
                        <details>
                        Chocolate provides energy and hyperactive sometimes because it contains high level of caffeine and sugar.
                        </details>
                                  <image>
                                  <url>coca4.jpg</url>
                                            </image>
                                                      </section>
              <section>
                        <details>
                        Chocolate could be mixed with many different flavors, such as mint, strawberry, orange, banana, vanilla, hazelnut, almond, coconut, and etc.
                        </details>
                                  <image>
                                  <url>coca5.jpg</url>
                                  </image>
                                            </section>
              <section>
                        <details>
                                  Chocolate is expressing of well hospitality and good time due to its lovely taste.
                                  </details>
                                            <image>
                                            <url>coca6.jpg</url>
                                                      </image>
                                                                </section>
    </sources>
    And here is my Action Script for "Chocolate Sources" section:
    stop();
    function Choco1(evt:MouseEvent): void {
              gotoAndStop('16');
    choco_btn.addEventListener(MouseEvent.CLICK,Choco1);
    function Souc1 (evt:MouseEvent): void {
              gotoAndStop ('31');
    souc_btn.addEventListener(MouseEvent.CLICK,Souc1);
    function ShopIn1 (evt:MouseEvent):void {
              gotoAndStop('46');
    shops_btn.addEventListener(MouseEvent.CLICK,ShopIn1);
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    import flash.events.Event;
    import flash.display.MovieClip;
    import flash.display.Loader;
    import fl.motion.MotionEvent;
    import flash.events.MouseEvent;
    import flash.sampler.NewObjectSample;
    import flash.text.TextFormat;
    var xmlLoader: URLLoader = new URLLoader (new URLRequest("sources.xml"));
    xmlLoader.addEventListener(Event.COMPLETE, finishedXmlLoader);
    var xmlFile:XML;
    var xextend:int = 10;
    var gal:galary = new galary ();
              gal.x = 85;
              gal.y = 165;
              addChild(gal);
    var txfe: TextField = new TextField ();
    txfe.x = 25;
    txfe.y = 45;
    var tformat:TextFormat = new TextFormat ();
    tformat.bold = true;
    tformat.color = 0xFFFFFF;
    tformat.size = "18";
    tformat.font = "Arial";
    txfe.defaultTextFormat = tformat;
    addChild(txfe);
    function finishedXmlLoader (e:Event): void{
              xmlFile = new XML (xmlLoader.data);
              var leng:int = xmlFile.image.length();
              txfe.text = xmlFile.image.details[0];
              for (var i:int = 0;i<leng;i++){
                        var b:thumbs = new thumbs ();
                        b.x = xextend;
                        b.y = 480;
                        b.buttonMode = true;
                        b.details = (i+1).toString();
                        addChild(b);
                        b.addEventListener(MouseEvent.MOUSE_OVER, theMosover);
                        b.addEventListener(MouseEvent.MOUSE_OUT, theMosout);
                        b.addEventListener(MouseEvent.CLICK, onMosClick);
                        var bloader:Loader = new Loader();
                        bloader.load(new URLRequest("thumbs/" + (i+1) + ".jpg"));
                        b.addChild(bloader);
                        xextend += b.width + 50;
    var loader:Loader = new Loader ();
    loader.load(new URLRequest ("pictures/coca1.jpg"));
    gal.addChild(loader);
    function theMosover(m:MotionEvent):void{
              m.currentTarget.alpha = 0.5;
    function theMosout (m:MouseEvent):void{
              m.currentTarget.alpha = 1.0;
    function onMosClick(m:MouseEvent):void{
              var loader:Loader = new Loader();
              loader.load(new URLRequest("pictures/" + m.currentTarget.details + ".jpg"));
              gal.addChild(loader);
              txfe.text = xmlFile.image.details[int(m.currentTarget.details) -1];
    I need an urgent help to fix the errors and make this section work well.
    thanks.

    try:
    txfe.text = xmlFile.section[int(m.currentTarget.details) -1].details;
    instead of
    txfe.text = xmlFile.image.[int(m.currentTarget.details) -1];
    and add your thumbs to gal, not the stage.  when you're done with the gallery, remove gal.

  • HT201365 I upgraded to ios 7, how do I open my phone when that code doesn't work?

    Just up-graded to iOS 7, entered a passcode. Now the phone will not unlock with that code. What do I do?

    Hello Mimizips
    The next step is to restore your iPhone, and as long as you have a backup you can restore it and it will not put back the passcode.
    iOS: Forgotten passcode or device disabled after entering wrong passcode
    http://support.apple.com/kb/ht1212
    Thanks for using Apple Support Communities.
    Regards,
    -Norm G.

  • Uninstalled elements 13 and now activation code no longer works

    Elements worked for awhile and kept crashing lately so I uninstalled it and re-installed it and now activation code doesn't work. Can't deactivate it since it is not on my computer and stuck on the activation code.... totally upset since I have a deadline.

    Good morning apathykillz, 
    Ordering on BestBuy.com with a Movers Coupon is a great way to save time and money while shopping for your latest device! It is discouraging to hear we may have been unable to verify some of your information, leading to your order's cancelation. It is also unfortunate to hear that you may have been provided some misinformation in regards to the Movers Coupon. Sadly, the Movers Coupon is a one-time use coupon, and cannot be refunded or reissued. I apologize for any hassle that this issue may have caused you.
    With that said, I was unable to locate your order using the email address you registered with the forum, and I would like to look further into this with you. Please be aware that I am sending you a private message to gather further information. You may check your private messages by signing into the forum and clicking the envelope icon in the top right corner of the page. 
    Sincerely, 
    Tasha|Social Media Specialist | Best Buy® Corporate
     Private Message

  • How to use " toFront() " method in java application and in which package or

    How to use " toFront() " method in java application and in which package or class having this toFront() method.if anybody know pl. send example.

    The API documentation has a link at the top of every page that says "Index". If you follow that and look for toFront(), you will find it exists in java.awt.Window and javax.swing.JInternalFrame.
    To use it in a Java application, create an object x of either of those two classes and write "x.toFront();".

  • How to use this method in JSTL?help me please!

    I know I can use "<C:set >" like as
    <c:set var="clabel3" value="${portalCustomizeBean.portalPage}"/> ,
    but now I want to use one method of portalCustomizeBean object not a attribute of it !!!!!
    who would tell me how to use?
    this is wrong in my code:
    <c:set var="clabel" value="${portalCustomizeBean.currentPageLabel}"/>
    <c:set var="clabel3" value="${portalCustomizeBean.toEntitiesExceptSpaceEscape(clabel)}"/>
    but how to use "toEntitiesExceptSpaceEscape" method in JSTL?????

    Why can't you just assign the method's return value to a variable and then print that? A bit of scriptlet code will do the trick. (As much as we all hate to use scriptlet code.)
    I believe you'll be able to do what you want in the 1.1 standard JSTL, but for now this will suffice. - MOD

  • How to use protected method in jsp code

    Could anyone tell me how to use protected method in jsp code ...
    I declare a Calendar class , and I want to use the isTimeSet method ,
    But if I write the code as follows ..
    ========================================================
    <%
    Calendar create_date = Calendar.getInstance();
    if (create_date.isTimeSet) System.out.println("true");
    %>
    ============================================================
    when I run this jsp , it appears the error wirtten "isTimeSet has protected access in java.util.Calendar"

    The only way to access a protected variable is to subclass.
    MyCalendar extends Calendar
    but I doubt you need to do this. If you only want to tell if a Calendar object has a time associated with it, try using
    cal.isSet( Calendar.HOUR );

  • How to use the method for field-exit to trigger the workflow?

    Dear all,
         I want the workflow to trigger , when ever the check box for DELIVERY COMPLETED is checked in ME22N .
         I have developed a method in SE18 for the corresponding field and defined function module SWE_EVENT_CREATE with BOR bus2012 and event CHANGED.
        Now how to use this method to make my workflow to trigger?Shall I create an event in delegated bus2012 and can I call this method?
    Thanks and regards,
    S.Suresh

    Hi
    You want to place your method which is defined for particular filed.right?
    For that you can go for BADI. First you check whether any badi is getting called form that tcode ME22N. Then to place your method, implement that BADI.  So whenever that BADI is getting called, it will call your event. Through Event workflow will be getting triggered.
    Regards,
    Hemalatha.

  • How to use the method "getChildrenRemoved()" declared in ElementChange?

    How to use the method "getChildrenRemoved()" declared in DocumentEvent.ElementChange?

    I have tried to use it,but the code below alway say "Yes"....
    I really have no ideas about why ec is always a null.
    public void removeUpdate(DocumentEvent ee) {
           DocumentEvent.ElementChange ec = ee.getChange(doc.getDefaultRootElement());
           if(ec == null)
              System.out.println("Yes");
                     }

  • How to use secondary method in workflow?

    Hi friends,
    can anyone plz let me know how to use secondary methods in workflow? it would be helpful if u explain with an example..
    thanks and regards,
    Arun.S

    Hi Arun Kumar,
    The Sec Method can be used in the user decision step. The secondary methods are executed along with the user decision step. You have 3 options. Either execute a secondary method before executing the user decision step or after execution of user decision step or while executing the user decision.
    For this define the methods either in Methods before execution of workitem execution to execute it before user decision step or Methods after execution of workitem so as to execute it after the execution of user decision.
    In order to execute a method along with user decision step execution use secondary methods (amodal call.)
    Let me know if you have any queries.
    Regards,
    Raj

  • Gantt chart: Don't know how to use the tooltipkeys and toolkeylabel

    I have a problem. Don't know how to use the tooltipkeys and toolkeylabel. I used jquery to select the gantt bars and on mouse over i was getting the task id "tid" then passing it to adf bean with serverlistener and showing a popup that is adf component with javascript. For positioning of the popup I used a button that has width and height 0 and has position absolute and gets the coordinates of the mouse.
    "div[et]" is a jquery selector that selects all the elements that have attribute et. I noticed that all the bars have that attribute as a few other attributes as well "part"...
    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
            xmlns:dvt="http://xmlns.oracle.com/dss/adf/faces">
        <af:document title="untitled1.jsf" id="d1">
            <af:resource type="javascript" source="https://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"/>
            <af:resource type="javascript" source="resources/js/home.js"/>
            <af:messages id="m1"/>
            <af:form id="f1">
               <af:commandButton text="commandButton 1" id="cb1" inlineStyle="visibility:hidden; width:0; height:0" />
                <af:popup id="noteWindow" contentDelivery="lazyUncached" binding="#{homeBean.popup}">
                    <af:noteWindow id="popupWindow">
                        <af:panelFormLayout id="pfl2">
                            <af:panelLabelAndMessage label="Task id" id="plam5">
                                <af:outputText value="#{homeBean.taskId1}" id="ot64"/>
                            </af:panelLabelAndMessage>
                            <af:panelLabelAndMessage label="Start Location Name" id="plam6">
                                <af:outputText value="#{homeBean.startLocation}" id="ot7"/>
                            </af:panelLabelAndMessage>
                            <af:panelLabelAndMessage label="Stop Location Name" id="plam7">
                                <af:outputText value="#{homeBean.stopLocation}" id="ot8"/>
                            </af:panelLabelAndMessage>
                            <af:panelLabelAndMessage label="tasktype" id="pla2m7">
                                <af:outputText value="#{homeBean.taskType}" id="ot9"/>
                            </af:panelLabelAndMessage>
                        </af:panelFormLayout>
                    </af:noteWindow>
                </af:popup>
                <af:serverListener type="jsServerListener" method="#{homeBean.serverEventHandler}"/>
                <dvt:schedulingGantt id="gantt1" value="#{bindings.PersonView1.schedulingGanttModel}" var="row"
                                     startTime="2011-07-04 00:00:00" endTime="2011-07-04 23:00:00" summary="gsg"
                                     showMenuBar="false" showToolbar="false" iconPlacement="left"
                                     showTasksAsDailyBar="false">
                    <f:facet name="major">
                        <dvt:timeAxis scale="days" id="ta1"/>
                    </f:facet>
                    <f:facet name="minor">
                        <dvt:timeAxis scale="hours" id="ta2"/>
                    </f:facet>
                    <f:facet name="nodeStamp">
                        <af:column sortProperty="#{bindings.PersonView1.hints.PersonId.name}" sortable="false"
                                   headerText="#{bindings.PersonView1.hints.PersonId.label}" id="c1">
                            <af:outputText value="#{row.PersonId}" id="ot1">
                                <af:convertNumber groupingUsed="false"
                                                  pattern="#{bindings.PersonView1.hints.PersonId.format}"/>
                            </af:outputText>
                        </af:column>
                    </f:facet>
                </dvt:schedulingGantt>            
            </af:form>
        </af:document>
    </f:view>javascript:
    $(document).ready(bindEvents());
    function bindEvents() {
        $("div[et]").live('mouseover', function (e) {
             $('#cb1').css("position", 'absolute');
             $('#cb1').css("top", e.pageY-4);
             $('#cb1').css("left", e.pageX);
            var popup = AdfPage.PAGE.findComponentByAbsoluteId("noteWindow");
            var element = AdfPage.PAGE.findComponent("f1");
            var taskIdToPass = null;
            if ($(this).attr("tid") !=undefined) {
                 taskIdToPass = $(this).attr('tid').toString();
            } else {
                taskIdToPass = $(this).parent().attr('tid').toString();
            var param = {            taskId : taskIdToPass        };
            AdfCustomEvent.queue(element, "jsServerListener", param, true);
            if (!popup.isPopupVisible()) {
                var hints = {};
                hints[AdfRichPopup.HINT_LAUNCH_ID] = "cb1";
                hints[AdfRichPopup.HINT_ALIGN_ID] =  "cb1";
                hints[AdfRichPopup.HINT_ALIGN] = AdfRichPopup.ALIGN_AFTER_START;
                popup.show(hints);
        }).live("mouseout", function () {
            var popup = AdfPage.PAGE.findComponentByAbsoluteId("noteWindow");
            popup.hide();
    };My bean that is session bean:
    package view;
    import oracle.adf.model.BindingContext;
    import oracle.adf.model.binding.DCDataControl;
    import oracle.adf.view.rich.component.rich.RichPopup;
    import oracle.adf.view.rich.render.ClientEvent;
    import oracle.jbo.ApplicationModule;
    import oracle.jbo.Key;
    import oracle.jbo.Row;
    import oracle.jbo.RowSetIterator;
    import oracle.jbo.ViewObject;
    public class HomeBean {
        private RichPopup popup;
        private String taskId1;
        private String startLocation;
        private String stopLocation;
        private long taskId;
        private String taskType;
        public HomeBean() {
            super();
        public void serverEventHandler(ClientEvent clientEvent) {    
            String taskIdString = clientEvent.getParameters().get("taskId").toString();
            this.taskId = Long.parseLong(taskIdString);
            DCDataControl dc1 = BindingContext.getCurrent().findDataControl("AppModuleDataControl");
            ApplicationModule am = dc1.getApplicationModule();
            ViewObject vo = am.findViewObject("PdTrfDayView1");  
            RowSetIterator rowSetIterator = vo.createRowSetIterator(null);
            Row[] rows = rowSetIterator.findByKey(new Key(new Object[] {taskId}), 1);
            Row row = rows[0];
           this.taskId1 =  row.getAttribute("PdTrfDayId").toString();
           this.startLocation = row.getAttribute("StartLocation").toString();
           this.stopLocation = row.getAttribute("StopLocation").toString();
           this.taskType = row.getAttribute ("PdTrfTypeId").toString();
            RichPopup.PopupHints ph = new RichPopup.PopupHints();
            vo.closeRowSetIterator();
        public long getTaskId() {
            return taskId;
        public void setPopup(RichPopup popup) {
            this.popup = popup;
        public RichPopup getPopup() {
            return popup;
        public String getTaskId1() {
            return taskId1;
        public String getStartLocation() {
            return startLocation;
        public String getStopLocation() {
            return stopLocation;
        public String getTaskType() {
            return taskType;
    }I am wondering If i can use setCurrentRow on the iterator that i create and use it for displaying on the popup instead of binding startLocation and stopLocation to the bean and if there is any benefit of that at all...
    Edited by: 897833 on Nov 24, 2011 11:37 AM

    Hi,
    To use tooltipkeys and tooltiplabel in gantt, you can add following code in managed bean
    public String[] getTooltipKeys()
    return new String[]{"columnA", "columnB", "StartDate", "EndDate"};
    public String[] getTooltipLabels()
    return new String[]{"A", "B", "Start Date", "End Date"};
    where , the string array in the ToolTipKeys represents the columns, of the table you have in the gantt component , and the string array in TooltipLabels displays the label you want to display for the table columns.
    In the jsff, you could call the bean methods as follows:
    tooltipKeys="#{GanttBean.tooltipKeys}"
    tooltipKeyLabels="#{GanttBean.tooltipLabels}"

Maybe you are looking for

  • My SSD won't boot on my HP Pavilion g6

    Hi, I'm having quite an embarrassing problem and I would be grateful if someone could help me. I have an laptop and I would like to replace the original HDD with an SSD, but the computer cannot read or format the drive. Here the steps I performed : I

  • Need a webcam for PowerBook G4 running Mac OS 10.4.11 -- help!!!

    Hi - i am looking for a webcam for my PowerBook G4 running Mac OS 10.4.11. No Apple service center or other computer store in India has any idea of what camera could work. Logitech sells the QuickCam Vision Pro for Mac, but that is too expensive for

  • Include Sub-Items option in User Default Books

    Hi, I have > 1000 users in my On Demand system and the Default Book parameter on a User is set to a Book say "Sales" instead of "Sales +" I want to do a data Import to set this from "Sales" to "Sales +". I tried doing an Import using the data Loader

  • HT4972 how to download ios 5 to iphone 3 GS

    I

  • T500 Screens Flickering

    Hello all, I have about 5 T500 laptops, when you change the power state ( from battery to power supply) the screen will flicker. It continues to flicker until you disconnect the power supply. Any one else come across this? These are new out of the bo