How too use the string tokeniser class to format date strings

Using the code below I want to write a method which takes a string as a parameter and process it as follows:
Input: 21/07/62
Output: 21st July 62
I wish to do this using the string tokenizer class. Can anyone help??
import java.io.*;
public class Input
public static void main(String args[]) throws IOException
String theString;
BufferedReader stdin = new BufferedReader(
new InputStreamReader(System.in));
System.out.println("Enter your string now please");
theString = stdin.readLine(); // throws IOException
System.out.println("You entered ***" + theString + "***");
}

You can certainly use a StringTokenizer to parse your date into three numbers but I think you should use SimpleDateFormat, which will even help you generate your desired format: http://java.sun.com/j2se/1.4/docs/api/java/text/SimpleDateFormat.html

Similar Messages

  • How to use the customer types in customer master data

    how to use the customer types in customer master data?
    menu path is Extras -> account group info -> customer types

    hi,
    This is an option given to you to choose (if you need to) the way you perceive this customer.Here you get options including ompetitors,Salespartner, prospect,
    default sp ,consumer.
    See it helps you to differentiate between prospect(which you may use for quotation or inquiry purpose)Sales partner and the competetor.
    I hope this clarifies your quiery.Reward points if so.
    Thanking you,
    Best regards,
    R.Srinivasan

  • How to use the opportunity stub classes to retrieve the opportunity objects

    Hello ,
    I have downloaded WSDL file for opportunity and i have created the stub classes by using axis as WSDL to java. Can any body suggest me , how can i use those created stub classes to retrieve the opportunity objects ?.
    Thanks,
    --bdr_09
    Edited by: bdr on Feb 3, 2009 1:54 AM

    http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/Tools8.html#63055

  • How to use the change log in ODS to track Delta change?

    People say that historical data (like Delta change) in ODS can be tracked in the Change Log.  How to use the change log to track historic data?
    Thanks

    Kevin
    See if it helps
    Every ODS object is represented on the database by three transparent tables:
    Active data: A table containing the active data (A table)
    Activation queue: For saving ODS data records that are to be updated but that have not yet been activated. The data is deleted after the records have been activated.
    <b>Change log: Contains the change history for delta updating from the ODS Object into other data targets, such as ODS Objects or InfoCubes for example.</b>
    An exception is the transactional ODS object, which is only made up of the active data table.
    The tables containing active data are constructed according to the ODS object definition, meaning that key fields and data fields are specified when the ODS object is defined. Activation queue and change log are the same in the table’s structure. They have the request ID, package ID and the record number as a key.
    Data base structure changes
    http://help.sap.com/saphelp_nw04/helpdata/en/d2/d53ec3efdc9b47a9502c3a4565320c/frameset.htm
    Hope this helps
    Thnaks
    Sat

  • How to use the different class for each screen as well as function.

    Hi Experts,
    How to use the different class for each screen as well as function.
    With BestRegards,
    M.Thippa Reddy.

    Hi ThippaReddy,
    see this sample code
    Public Class ClsMenInBlack
    #Region "Declarations"
        'Class objects
        'UI and Di objects
        Dim objForm As SAPbouiCOM.Form
        'Variables
        Dim strQuery As String
    #End Region
    #Region "Methods"
        Private Function GeRate() As Double
                Return Double
        End Function
    #End Region
    Public Sub SBO_Appln_MenuEvent(ByRef pVal As SAPbouiCOM.MenuEvent, ByRef BubbleEvent As Boolean)
            If pVal.BeforeAction = True Then
                If pVal.MenuUID = "ENV_Menu_MIB" Then
                End If
            Else ' Before Action False
                End If
        End Sub
    #End Region
    End Class
    End Class
    Rgds
    Micheal
    Vasu Anna Regional Feeling a???? Just Kidding
    Edited by: micheal willis on Jul 27, 2009 5:49 PM
    Edited by: micheal willis on Jul 27, 2009 5:50 PM

  • How to use the implementation class in propetty pallete

    Hi,
    I am using forms 10g....I have to insert horizontal scroll bar in text item..
    I have only class files instead of jar files ...how cani place the class file instead of jar file...
    How to use the implementation class in property palette to display the PJC
    Thanks,
    Ansaf.

    The Implementation Class must reflect the full name of the class. For instance, if the full class name is : xx.yyy.zz.class_name, then put this in the Implementation Class property of the corresponding item.
    Also, the class must be stored in the equivalent directory structure, so that, in my example: <DEV_HOME>/forms/java/xx/yyy/zz
    Francois

  • How to use the class CL_CTMENU with the method DISABLE_FUNCTIONS

    Hi Friends,
    How to de-activate some functions in the Menu bar?
    Eg: - Sales document
                 Create
                 Change
                 Display
    I want to de-activate "Change"
    In other words: - How to use the class CL_CTMENU with the method DISABLE_FUNCTIONS in my program.
    Regards,
    Hari
    Edited by: Bhatlapenumarthy Hari Krishna on Jun 9, 2008 5:22 PM

    Krishna,
    It is not possible to deactivate the CHANGE option in themenu bar using the method disable_functions of cass CL_CTMENU. This method allows you to deactivate only the function codes of the CONTEXT MENU, which is available only when u press the left mouse button.
    U can use the SET PF-STATUS 'XXX' EXCLUDING fcodes option to disable the CHANGE.
    *****Reward points if useful
    Regards,
    Kiran Bobbala

  • How to extend the JVue applet class using ActiveX Control

    My SR recommendation was to post this here:
    ) How to Extend the JVue Applet class
    This is the preferred solution. However, when using the ActiveX control, my derived JVue class that is specified in autovue.properties is not being instantiated.
    Your ActiveX bridge looks like it's hard coding a "new JVue()" which means I have no integration hook using the ActiveX control.
    To reiterate, if I extend JVue to add functionality and specify it in the autovue.properties, it is picked up when I run it standalone but if I use the ActiveX component, it is not being picked up.
    I have already read all the documentation, have had web conferences with Mahmood and Jeff Chapman and the engineering staff who recommended this approach as the preferred option.

    We have a need to override certain VueBean/JVue method calls to meet our document handling(documents need to handle metadata information and hence change the document loading cycle, ie markup loading/XRef resolution is dynamic). Also the invokeAction/invokeSubAction do not allow parameter passing(which we have requirements for certain actions again due to metadata) so we would like to override the invokeAction method to include custom processing(we will encode the action with parameters).
    We are already using Custom VueActions for other simpler UI event handling that don't have parameter requirements.
    As I said above, these use cases were relayed to the engineering team and senior staff members in early December and we were told that we could proceed with overriding the main class in the autovue.properties file. I have SR(s) opened with a long thread detailing this so I really don't want to go through this again.
    A custom VueAction does not seem to work because it binds to late in the object call/event stream.

  • HT1688 I am trying to find answers about how to use the earphones that came with my new iPhone 4s. Does this work similarly as a Bluetooth or do I need to still buy one. The printing in the manual is SOOO small, it is too hard to read!

    Does anyone know how to use the earphones( plugs) that come with iPhones?
    Mine is still fairly new and I am just learning how to use certain things.

    They're pretty straightforward. You plug them into the headset jack (the hole on the top left of your phone). You put the buds in your ears. All sounds, except for the phone ringing will now come through the earbuds.

  • JNI - How to use the error reporting mechanism?

    I've developed a C++ DLL which is loaded from a commercial Win32 application (not written by me) as a plug-in for external calculations. On its initialization the C++ DLL launches the Java VM via the JNI invocation interface. When the DLL functions are called by the application, they forward the calls to Java objects inside the Java VM, again via JNI invocation interface.
    This works well, but I have encountered a weird error.
    From Java I open a JFrame containing a JTextArea as small console for debug output messages. If I turn output to this debug console off (my printToConsole routine checks whether a boolean flag is set), the string concatenation operator may lead to a crash of the Java VM.
    For example, if in one of the Java functions called from the
    DLL via JNI invocation interface the following is the first statement,
    it leads to a crash of the Java VM and the application that loaded the C++ proxy DLL.
    String test=""+Math.random(); // String test not used later
    Interestingly, if I comment this statement out, the Java code works fine WITHOUT any crash. I've already thought about potential races and synchronization issues in my code, but I don't see where this is the case. And the string concatenation error fails as well, if I insert sleep() statements in front of it and at other places in the code. However, if I turn on log messages printed to my JFrame debug console (containing a JTextArea), the String concatenation works without problems.
    So maybe the JNI interface has a bug and affects the Java VM; I don't see where my JNI code is wrong.
    One problem is that I do not get any stdout output, as the C++ proxy DLL is loaded by the Windows application, even if I start the Windows application from the DOS command line (under Windows).
    Does anyone know how to use the error reporting mechanism?
    http://java.sun.com/j2se/1.4.2/docs/guide/vm/error-handling.html
    Is it possible that the JVM, when it crashes, writes debug information about the crash into a file instead of stdout/stderr?
    My C++ proxy DLL was compiled in debug mode, but the commercial application (which loaded the DLL) is very likely not.
    I do not know hot to find the reason why the String concatenation fails inside the Java function called from the C++ DLL via JNI.

    Yes, I've initially thought about errors in the C++ code too. But the C++ code is actually very simple and short. It doesn't allocate anything on the C++ side. It allocates a couple of ByteBuffers inside the Java VM however via JNI invocation interface calls of env->NewDirectByteBuffer(). The native memory regions accessed via the ByteBuffers are allocated not by my own C++ code, but by the program that calls my DLL (the program is Metastock).
    The interesting thing is that everything works fine if output to my debug console is enabled, which means that in the Java print routine getConsoleLoggingState() returns true and text is appended to the jTextArea.
    static synchronized void print(String str)
    { MetaStockMonitor mMon=getInstance();
    if ( mMon.getFileLoggingState() && mMon.logFileWriter!=null) {
    mMon.logFileWriter.print(str);
    mMon.logFileWriter.flush();
    if ( mMon.getConsoleLoggingState() ) {
    mMon.jTextArea1.append(str);
    Only if output to the JTextArea is turned off (ie. getConsoleLoggingState()==false), the crash happens when the FIRST statement in the Java routine called via JNI invocation interface is a (useless) String concatenation operation, as described above.
    String test=""+Math.random(); // String test not used later
    Moreover, the crash happens BEFORE the allocated ByteBuffer objects are accessed in the Java code. But again, if console output is turned on, it works stable. If console output is turned off, it works when the (useless) String concatenation operation is removed in the Java routine called from C++.
    I've already thought about potential races (regarding multiple threads), but this can be ruled out in my case. It almost appears as if the JVM can have problems when called by the invocation interface (I tested it with Java 1.4.2 b28).
    All the calls between C++ and Java go ALWAYS in the direction from C++ code to Java. Unfortunately, there is no special JRE version with extensive logging capabilities to facilitate debugging. And the problem is not easily reproducible either.
    JNIEnv* JNI_GetEnv()
    JNIEnv *env;
    cached_jvm->AttachCurrentThread((void**)&env,NULL);
    fprintf(logfile,"env=%i\n",env);
    fflush(logfile);
    return env;
    // function called by Metastock's MSX plug-in interface
    BOOL __stdcall createIndEngine (const MSXDataRec *a_psDataRec,
    const MSXDataInfoRecArgsArray *a_psDataInfoArgs,
    const MSXNumericArgsArray *a_psNumericArgs,
    const MSXStringArgsArray *a_psStringArgs,
    const MSXCustomArgsArray *a_psCustomArgs,
    MSXResultRec *a_psResultRec)
    a_psResultRec->psResultArray->iFirstValid=0;
    a_psResultRec->psResultArray->iLastValid=-1;
    jthrowable ex;
    jmethodID mid;
    JNIEnv* env=JNI_GetEnv();
    jobject chart=getChart(env, a_psDataRec);
    if ( chart==NULL) {
    return MSX_ERROR;
    jobject getChart (JNIEnv* env, const MSXDataRec *a_psDataRec)
    jthrowable ex;
    jmethodID mid;
    int closeFirstValid, closeLastValid;
    closeFirstValid=a_psDataRec->sClose.iFirstValid;
    closeLastValid=a_psDataRec->sClose.iLastValid;
    long firstDate, firstTime;
    if (closeFirstValid>=1 && closeFirstValid<=closeLastValid) {
    firstDate = a_psDataRec->psDate[closeFirstValid].lDate;
    firstTime = a_psDataRec->psDate[closeFirstValid].lTime;
    } else {
    firstDate=0;
    firstTime=0;
    jclass chartFactoryClass = env->FindClass("wschwendt/metastock/msx/ChartFactory");
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Cannot find class ChartFactory\n");
    printSBufViaJava(sbuf);
    return NULL;
    mid = env->GetStaticMethodID(chartFactoryClass, "getInstance", "()Lwschwendt/metastock/msx/ChartFactory;");
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Cannot find method ID for ChartFactory.getInstance()\n");
    printSBufViaJava(sbuf);
    return NULL;
    jobject chartFactory=env->CallStaticObjectMethod(chartFactoryClass, mid);
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Exception while calling ChartFactory.getInstance()");
    printSBufViaJava(sbuf);
    return NULL;
    mid = env->GetMethodID(chartFactoryClass, "getChartID", "(Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;IIIIIII)F");
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Cannot find method ID for ChartFactory.getChartID()\n");
    printSBufViaJava(sbuf);
    return NULL;
    jobject symbolBuf=env->NewDirectByteBuffer(a_psDataRec->pszSymbol, strlen(a_psDataRec->pszSymbol) );
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Cannot allocate symbolBuf\n");
    printSBufViaJava(sbuf);
    return NULL;
    jobject securityNameBuf=env->NewDirectByteBuffer(a_psDataRec->pszSecurityName, strlen(a_psDataRec->pszSecurityName) );
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Cannot allocate securityNameBuf\n");
    printSBufViaJava(sbuf);
    return NULL;
    jobject securityPathBuf=env->NewDirectByteBuffer(a_psDataRec->pszSecurityPath, strlen(a_psDataRec->pszSecurityPath) );
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Cannot allocate securityPathBuf\n");
    printSBufViaJava(sbuf);
    return NULL;
    jobject securityOnlineSourceBuf=env->NewDirectByteBuffer(a_psDataRec->pszOnlineSource, strlen(a_psDataRec->pszOnlineSource) );
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Cannot allocate onlineSourceBuf\n");
    printSBufViaJava(sbuf);
    return NULL;
    // Java Function call leads to crash, if console output is turned off and
    // the first statement in the Java routine is a (useless) string concatenation.
    // Otherwise it works stable.
    jfloat chartID=env->CallFloatMethod(chartFactory, mid, securityNameBuf, symbolBuf,
    securityPathBuf, securityOnlineSourceBuf, (jint)(a_psDataRec->iPeriod),
    (jint)(a_psDataRec->iInterval), (jint)(a_psDataRec->iStartTime),
    (jint)(a_psDataRec->iEndTime), (jint)(a_psDataRec->iSymbolType),
    (jint)firstDate, (jint)firstTime );
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Exception while calling ChartFactory.getChartID()");
    printSBufViaJava(sbuf);
    return NULL;

  • How to use the "out" parameter in idl

    hello.idl:
    module HelloApp
    interface Hello
    string sayHello();
    void getPass(in string name,out string pass);
    HelloServer:
    public class HelloServer
    class HelloServant extends _HelloImplBase
    public void getPass(String name,org.omg.CORBA.StringHolder pass)
    System.out.println("Server pass = " + pass);
    if (name.equals("lxh"))
    pass = new org.omg.CORBA.StringHolder("1234");
    if (name.equals("cbj"))
    pass = new org.omg.CORBA.StringHolder("5678");
    HelloClient:
    public class HelloClient
    public static void main(String args[])
    try{
    org.omg.CORBA.StringHolder Pass = null;
    if (args.length == 1)
    System.out.println("Client pass = " + args[0]);
    helloRef.getPass(args[0],Pass);
    System.out.println(Pass);
    } catch(Exception e) {
    When I run client main method with parameter "lxh",I will get a error says the getPass() parameter which has given is wrong.
    How to use the out parameter in client?

    Does this error only occurs if you pass "lxh" or always?
    Did you try passing a StringHolder Object rather than a NULL Object?
    Perhaps you can post the error message!?

  • How to get the most current file based on date and time stamp using SSIS?

    Hello,
    Let us assume that files get copied in a specific directory. We need to pick up a file and load data. Can you guys let me know how to get the most current file based on date and time stamp using SSIS?
    Thanks
    thx regards dinesh vv

    hi simon
    i excuted this script it is giving error..
       Microsoft SQL Server Integration Services Script Task
       Write scripts using Microsoft Visual C# 2008.
       The ScriptMain is the entry point class of the script.
    using System;
    using System.Data;
    using Microsoft.SqlServer.Dts.Runtime;
    using System.Windows.Forms;
    namespace ST_9a6d985a04b249c2addd766b58fee890.csproj
        [System.AddIn.AddIn("ScriptMain", Version = "1.0", Publisher = "", Description = "")]
        public partial class ScriptMain : Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase
            #region VSTA generated code
            enum ScriptResults
                Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success,
                Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
            #endregion
            The execution engine calls this method when the task executes.
            To access the object model, use the Dts property. Connections, variables, events,
            and logging features are available as members of the Dts property as shown in the following examples.
            To reference a variable, call Dts.Variables["MyCaseSensitiveVariableName"].Value;
            To post a log entry, call Dts.Log("This is my log text", 999, null);
            To fire an event, call Dts.Events.FireInformation(99, "test", "hit the help message", "", 0, true);
            To use the connections collection use something like the following:
            ConnectionManager cm = Dts.Connections.Add("OLEDB");
            cm.ConnectionString = "Data Source=localhost;Initial Catalog=AdventureWorks;Provider=SQLNCLI10;Integrated Security=SSPI;Auto Translate=False;";
            Before returning from this method, set the value of Dts.TaskResult to indicate success or failure.
            To open Help, press F1.
            public void Main()
                string file = Dts.Variables["User::FolderName"].Value.ToString();
                string[] files = System.IO.Directory.GetFiles(Dts.Variables["User::FolderName"].Value.ToString());
                System.IO.FileInfo finf;
                DateTime currentDate = new DateTime();
                string lastFile = string.Empty;
                foreach (string f in files)
                    finf = new System.IO.FileInfo(f);
                    if (finf.CreationTime >= currentDate)
                        currentDate = finf.CreationTime;
                        lastFile = f;
                Dts.Variables["User::LastFile"].Value = lastFile;
                Dts.TaskResult = (int)ScriptResults.Success;
    thx regards dinesh vv

  • 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}"

  • How to use the MouseAdapter and mouseEntered

    I've made panel(Jpanel) with a Label(Jlabel) wich contains an Image).
    but i want the image changes in another Image when the mouse passesover the image, without click the mouse?
    how can i get this, if i can?
    some told use the MouseAdapter anf the mouseEntered, but how
    here is the program
    public class Panel1 extends JPanel
    JLabel ImageLabel,ImageLabel3;
    ImageIcon imatge1,imatge2,imatge;
    boolean asig;
    int Ymove,Xmove;
    public Panel1()
                   imatge1 = new ImageIcon("c:/Applet/imatges/lupa.gif");
         imatge2 = new ImageIcon("c:/Applet/imatges/not.gif");
              ImageLabel = new JLabel (imatge1);
              ImageLabel.setBackground(new Color(255,219,183));
    ImageLabel.setForeground(new Color(255,219,183));
    ImageLabel.setOpaque(true);
    add(ImageLabel);
    //Add a MouseAdapter to the Jlabel and change the image in the mouseEntered method of the adapter.

    Here a simple example:
    import java.awt.*;
    import java.awt.event.*;
    class MAdapter extends Frame
         private Button b1, b2, b3;
         public MAdapter()
              addWindowListener(new WindowAdapter()
                   public void windowClosing(WindowEvent e)
                        dispose();
                        System.exit(0);
              setLayout(new GridLayout(3, 1, 10, 10));
              b1 = new Button("Button 1");
              b2 = new Button("Button 2");
              b3 = new Button("Button 3");
              MouseListener mListener = new MMListener();
              b1.addMouseListener(mListener);
              b2.addMouseListener(mListener);
              b3.addMouseListener(mListener);
              add(b1); add(b2); add(b3);
         class MMListener extends MouseAdapter
              public void mouseEntered(MouseEvent e)
                   Object o = e.getSource();
                   if (o == b1)
                        b1.setBackground(Color.yellow);
                   else if (o == b2)
                        b2.setBackground(Color.yellow);
                   else
                        b3.setBackground(Color.yellow);
              public void mouseExited(MouseEvent e)
                   Object o = e.getSource();
                   if (o == b1)
                        b1.setBackground(Color.LIGHT_GRAY);
                   else if (o == b2)
                        b2.setBackground(Color.LIGHT_GRAY);
                   else
                        b3.setBackground(Color.LIGHT_GRAY);
         public static void main(String args[])
              MAdapter mainFrame = new MAdapter();
              mainFrame.setSize(400, 200);
              mainFrame.setTitle("MAdapter");
              mainFrame.setBackground(Color.LIGHT_GRAY);
              mainFrame.setVisible(true);

  • How to convert the javasource file(*.class) to execute file(*.exe)?

    How to convert the javasource file(*.class) to execute file(*.exe)?
    thank you!

    Although i have seen a few programs (that are platform specific) that will embed a small jvm into an exe with your class file, it is generally excepted that you cannot create an executable file using java. The JAR executable file is probably the closest your going to get
    Pete

Maybe you are looking for

  • Something's.... wrong with my magsafe or battery

    How can I uploade screencaps so i can show you what is wrong with my battery and (magsafe) charger? In order: Battery is at 96 percent, yet still needs 1:26 to charge I unplug the battery, and I have 18 and a half hours of battery I plug it back in,

  • Is there a customer loyalty department who will listen to a problem and not just try to stall by suggesting another factory reset?

    I've had an issue with my HTC one since I received it almost a year ago.  Both verizon and HTC have had me troubleshoot the device extensively, even though all indications are that it's not specifically my device, as my wife and a co worker have the

  • Connect monitor to macbook

    I just bought a used monitor that I want to hook up to my MacBook which only has USB ports.  The monitor comes with 3 adaptors, FoxFire, USB and somethings with lots of needs that look very old fashioned.  When I plug the USB wire from my monitor to

  • SaveAs and maintain "optimized for web view" via javascript???

    I am trying to do a SaveAs via javascript, but I need to maintain the linearized (optimized for web view) state of the PDF. I would get this via the SaveAs menu item, but I need to do it silently and rename the file (replace _H.pdf with .pdf). Is the

  • ORACLE 10.2.0.4 OR HIGHER PATCHSEST

    Hello everyone, Does anyone has oracle 10.2.0.4 or higher patchsest. I want to install oracle 10g on my vista machine Or anybody can tell me where we can find that except my oracle support site where I tried but wasn't successful Thanks