Similar to DatePicker Class

I would like know if there is a class wich one is similar to DatePicker class, but with Hours, Minutes and Seconds instead of Days, Months and Years. In case this kind of class doesn't exist .
How could I get a box , button or something similar which displays Hours Minutes and Seconds in a Tabbed user Form.
Thans in advance to everybody

Hi,
there are two display classes "Javascript" and "Html". Using those and standard webdeveloper skills you should be able to make such gadget.
Assuming that you want to display the current time in a label and have a button that will pop up a window or make a div visible where a new time can be chosen you will also need an additional field of the display type Hidden with the same name as the label field or the fieldname you want to populate with the new time.
Once your javascript gadget has the new time ready put it into the hidden field with
document.forms[0].getElementsByName("accounts[LDAP].earlyestLoginTime")[0].value = myResultTime;
Regards,
Patrick

Similar Messages

  • Is it possible to override super class constructor?

    Is it possible to override super class constructor form subclass?

    However, you can achieve do something that looks similar to overriding.
    class Parent {
      Parent(int i, String s) {
        // do stuff
    class Child extends Parent {
      Child(int i, String s) {
        super(i, s);
        // do Child stuff here
    new Parent(1, "abc");
    new Child(2, "xyz");Although that's not overriding, it sort of looks similar. Is this what you were talking about?

  • IN MATERIAL MASTER RECORD WHAT IS THE USE OF CLASS TYPE(CLASSIFICATION VIEW

    Hi Guys,
    Can you please explain what are the different critiria to use different class type and what exactly meaning of the each class type with respect to Material classification.
    Any material available on this to study. Please give link.
    Thanks,
    Dhanu

    Hi,
    Purpose
    The classification system allows you to use characteristics to describe all types of objects, and to group similar objects in classes u2013 to classify objects, in other words, so that you can find them more easily later.
    You then use the classes to help you to find objects more easily, using the characteristics defined in them as search criteria. This ensures that you can find objects with similar or identical characteristics as quickly as possible.
    Integration
    The classification system allows you to classify all types of object. First, you must define certain settings in Customizing for the classification system. For more information, see Customizing for the Classification System.
    SAP has predefined a number of object types (for example, materials, and equipment). The settings for these object types have already been defined in Customizing, so you can start to set up your classification system for these object types without defining further settings.
    Features
    Before you can use classification functions, you need to set up your classification system.
    The there are three steps to setting up a classification system:
    Defining the Properties of Objects
    You use characteristics to describe the properties of objects. You create characteristics centrally in the SAP R/3 System.
    See the SAP Library, Characteristics (CA-CL-CHR).
    Creating Classes
    You need classes to classify objects. These classes must be set up. During set up you must assign characteristics to the classes.
    Assigning Objects
    Once you have created the classes you require for classification, you can assign objects to these classes. You use the characteristics of the class to describe the objects you classify.
    This completes the data you require to use your classification system. You can then use your classification system to find objects that match the criteria you require.
    Once you have set up the classification system you can use it to find certain objects. To do this:
    Find a class in which objects are classified
    Find the object(s) you require in the class
    When you use classification to find objects, you use the characteristics as search criteria, and the system compares the values you enter with the values of the classified objects.
    Uts
    Award if helpfull

  • UI Datepicker and Spry textfield Validation

    Hi, I am having a problem with using the UI Date picker and Spry textfield Validation together. I have created a sample form: 2 input boxe, the test box has the datepicker and spry validation and test2 has the date picker only,one submit button and some php code that echos the boxes values on submit.
    My date picker is date formated as 'yy-mm-dd' for four digit year.  My spry validation is formated 'yyyy-mm-dd' with validate on submit.
    Now when I click on the test input box the datepicker comes up normally and i select a date. I then select the date on test2. Once I click the submit button the test field with spry validation come back saying a value is required and nothing else happens.
    I was playing around and trying other things to get it to work and I noticed that when I select the test inputbox and the calander pops up if I enter some numbers into the text box then select a date from the datepicker then enter a date in the test2 inputbox and hit submit it works.
    So it appears to me that the validation is not reading anything in the test field when I just select a date.  Why is that?  When I select a date it shows a date in the inputbox.  It makes it hard to use the datepicker on a form.
    Any help would be a preciated.  Code is below.
    Thanks Winrol
    <?php echo "Test box 1 value = ". $_POST['test']. "<br/>" ?>
    <?php echo "Test box 2 value = ". $_POST['test2'] ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Untitled Document</title>
    <script src="jquery-ui-1.7.2/js/jquery-1.3.2.min.js" type="text/javascript"></script>
    <script src="jquery-ui-1.7.2/js/jquery-ui-1.7.2.min.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
    <link href="jquery-ui-1.7.2/css/base/ui.core.css" rel="stylesheet" type="text/css" />
    <link href="jquery-ui-1.7.2/css/base/ui.datepicker.css" rel="stylesheet" type="text/css" />
    <link href="jquery-ui-1.7.2/css/base/ui.theme.css" rel="stylesheet" type="text/css" />
    <link href="jquery-ui-1.7.2/css/base/ui.datepicker.images.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    /* BeginOAWidget_Instance_2137022: #datepicker */
    #datepicker .ui-widget {
    font-family: inherit;
    #datepicker .ui-datepicker {
    font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
    #datepicker .ui-datepicker-title {
    font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
    font-size: 1.1em;
    color: #000;
    font-weight: normal;
    line-height: 1.8em;
    #datepicker .ui-state-default, .ui-widget-content .ui-state-default {
    border-color: #e6e6e6;
    background-color: #e6e6e6;
    color: #555555;
    #datepicker .ui-state-default, .ui-state-default a {
    color: #555555;
    #datepicker .ui-state-highlight, .ui-widget-content .ui-state-highlight {
    border-color:#FCEFA1;
    background-color:#FCEFA1;
    color:#363636;
    #datepicker .ui-state-active, .ui-widget-content .ui-state-active {
    border-color: #FFFFFF;
    background-color: #FFFFFF;
    color: #212121;
    #datepicker .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus
    border-color: #5F5F5F;
    background-color: #5F5F5F;
    color: #212121;
    #datepicker .ui-widget-header
    border-color: #5F5F5F;
    background-color: #808080;
    border-width: 1px;
    /* Text attributes for the Days of Week Text */
    #datepicker .ui-datepicker table th
    font-size: .8em;
    color: #000;
    font-weight: bold;
    /* EndOAWidget_Instance_2137022 */
    </style>
    <script type="text/xml">
    <!--
    <oa:widgets>
      <oa:widget wid="2137022" binding="#datepicker" />
    </oa:widgets>
    -->
    </script>
      <script type="text/javascript">
    // BeginOAWidget_Instance_2137022: #datepicker
    $(function() {
    $('input').filter('.datepicker').datepicker({dateFormat: 'yy-mm-dd'});
    // EndOAWidget_Instance_2137022
      </script>
    <link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    body {
    background-color: #FFC;
    </style>
    </head>
    <body>
    <form id="form1" name="form1" method="post" action="">
      <p>
        <label for="test">test</label>
        <span id="sprytextfield1">
        <input name="test" type="text" class="datepicker" id="test"/>
        <span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span></p>
      <p>
        <label for="test2">test2</label>
        <input name="test2" type="text" id="test2"  class="datepicker" />
      </p>
      <p onclick="<?php echo $_POST['test'] ?>">
        <input type="submit" name="submit" id="submit" value="Submit" />
      </p>
    </form>
    <script type="text/javascript">
    var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "date", {format:"yyyy-mm-dd", hint:"yyyy-mm-dd"});
    </script>
    </body>
    </html>

    This does work
    <!DOCTYPE HTML>
    <html>
    <head>
    <meta charset="utf-8">
    <title>Untitled Document</title>
    <link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet">
    <link href="jquery-ui-1.7.2/css/base/ui.core.css" rel="stylesheet">
    <link href="jquery-ui-1.7.2/css/base/ui.datepicker.css" rel="stylesheet">
    <link href="jquery-ui-1.7.2/css/base/ui.theme.css" rel="stylesheet">
    <link href="jquery-ui-1.7.2/css/base/ui.datepicker.images.css" rel="stylesheet">
    </head>
    <body>
    <form action="" method="post">
    <span id="sprytextfield1">
    <label for="mydate">Date:</label>
    <input id="datepicker" name="mydate" type="text">
    <span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span>
    <div id="datepicker" class="ui-glass-gradient ui-80TopTo0Bottom-gradient-header"></div>
    <input name="mysubmit" type="submit">
    </form>
    <script src="SpryAssets/SpryValidationTextField.js"></script>
    <script src="jquery-ui-1.7.2/js/jquery-1.3.2.min.js"></script>
    <script src="jquery-ui-1.7.2/js/jquery-ui-1.7.2.min.js"></script>
    <script>
    var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "date", {format:"mm/dd/yyyy", validateOn:["change"], useCharacterMasking:true});
    $(function() {
        $('#datepicker').datepicker({ showOtherMonths: false });
    </script>
    </body>
    </html>
    Gramps

  • Creating classes and coding style

    Friends I am little confused in how to go about creating classes.I have ideas but not sure which will be better.
    I have say 3 oracle tables and I am developing three classes for each table.All the classes will be doing is do the SELECT,DELETE,INSERT,UPDATE operation with the oracle tables.Say for example I have two tables.
    DEPT_TABLE
    dept_key
    dept_desc
    tot_emp
    EMPLOYEE_TABLE
    emp_key
    emp_name
    dept_key
    emp_sal
    So I will be developing 2 classes for the 2 table
    public class Dept {
    private int deptKey = -1;
    private int totEmp = -1;
    private String deptDesc = "";
    public void select(){
    //select dept records
    public void insert(){
    //insert dept records
    public void update(){
    //update records
    public void delete(){
    //delete records
    similarly a Employee class will be developed.
    Now my confusion is does it make sense.
    Also is it a nice idea to have dept object as one of field in the employee class instead of the depKey ,because dept key is one of the field in employee table.I mean
    public class Employee {
    private int empKey = -1;
    private int empSal = -1;
    private String empName = "";
    private Dept dept = null;
    public void select(){
    //select emp records
    public void insert(){
    //insert emp records
    public void update(){
    //update emp records
    public void delete(){
    //delete records

    well, I wouldn't bother if you're on a small project, but, if you find yourself needing to do some thing like this a lot, there are programs that can generate a java class where each property corresponds to a column on some DB table, e.g.:
    public class Employee {
      Integer id;
      String name;
    }corresponds to table 'Employee' with int column 'id' and varchar column 'name'. They can be handy because you don't have to do pure SQL any more and nearly all of the JDBC logic is handled by the framework (e.g. I would find an employee with a given ID by creating an instance of the Employee class and invoking setId(4)). But, I wouldn't bother with the over-head involved with setting it up for a small project. However, if you find yourself doing this often, it might be some thing worth considering... take care.

  • ABAP classes

    Hello,
    I need to do some work on ABAP classes which I have never done before. therefore, I have a couple of questions which I would appreciate if anyone could help me with:
    First, what is the difference between all these classes compare to the traditional abap code.
    Second, are these classes similar to the classes in JAVA?
    Thirdly, is there any good place on the internet that offer some good introductory material on the topic?
    Thanks a lot!
    Regards,
    Anyi

    Hello Anyi
    In terms of coding the syntax checks and rules are more strict within ABAP classes, e.g. you cannot use itabs with header lines (thanks to SAP they banned this finally!).
    However, in terms of thinking and structuring your coding it is completely different. If you are "thinking in objects" your focus basically on two design questions:
    (1) How many different objects do I need for my application?
    (2) Which attributes and methods do I need for my objects?
    Within your application you do not care if you have a single business object or hundreds of them (e.g. sales orders, employees, etc.) but you only think about a single object and its required properties. If you have multiple instances of your object(s) then you simply collect them in an itab or another class (-> composition of classes).
    Event handling is another huge advantage of ABAP-OO vs. classical ABAP because it allows loose coupling.
    Similarity of ABAP classes with Java classes is quite obvious although there are some minor differences.
    Understanding OO means understanding ABAP-OO, too. Thus, you should look for a good introduction to OO-design and OO-analysis. I can highly recommend the following books:
    - Head First: Design Patterns
    - Head First: Object-Oriented Analysis & Design
    The can be found
    <a href="http://www.headfirstlabs.com/index.php">here.</a>
    Regards
      Uwe

  • Abstract Class X Interfaces

    1.The Java language has two similar concepts : Abstract Classes and Interfaces. So, When its better to use one or other technique and the advantages and disadvantages of each one ?

    Classes can implement any number of interfaces but can extend only one class. Interfaces are used when a class might want to implement that interface but extend another class. However, interfaces cannot have implementation, so that's what abstract classes are used for.

  • Serializing classes that contain other classes

    Hi all,
    Hoping someone can answer me a quick question, I'm familiar enough with Java + OO in general but just starting to try to put a multiplayer game framework together so running into a few areas I haven't encountered before... so sorry if this is a bit of a newbie sounding question...
    I have a serializable class that contains a reference to another serializable class, very similar to:
    public class ClassA implements Serializable
        private ClassB b;
        ...and some other fields...
        public ClassA ()
            super ();
        ...and a standard public getB and setB
    public class ClassB implements Serializable
        int someValue;
        ...standard no arguments constructor...
        ...standard getSomeValue and setSomeValue...
    }Now that all works fine, serializes fine, send it down an ObjectOutputStream down a network socket, deserializes the other end, all no problem. What I don't like is that to create a ClassA I have to do:
    ClassA myClassA = new ClassA ();
    myClassA.setB (new ClassB ());   <--- this line
    myClassA.getB ().setSomeValue (5);because it could easily be ommitted (especially since the real situation is more complex that two simple classes like above) and I'll get a NullPointerException. Normally (in a non-serialized ClassA) I'd have put b = new ClassB (); in the constructor.
    However I don't like the idea of doing that because when deserializing a ClassA, I imagine the deserialization mechanism creates its own ClassB object to set into ClassA? And so if in the ClassA constructor, I create my own ClassB, then the deserialization will then immediately go and create its own ClassB and the ClassB I created will go to the garbage collector, i.e. it was a pointless object to create?
    Just wondering what suggestions anyone has on this, there must be a standard approach to deal with this?
    Thanks very much,
    Nigel.

    Allthough you give a lot of information I do not quite understand what you mean, but maybe a little re-arrangement of the setB en getB methods will do it:
    public ClassB getB() {
        if(b == null) {
            setB(new ClassB());
        return b;
    public void setB(ClassB b) {
        this.b = b;
    }

  • Interface or Class based on the Factory

    Hi,
    I want to write a Factory pattern to decide whether the passed parameter is an interface or class ?
    If an interface is passed then validate whether it is an interface using reflection and do the respective operation similarly for the class as well.
    Please provide your opinion on this.
    Thanks.

    Thanks.
    In the main class I am calling the below :-
    mockInterface("com.test.InterfaceTest");
    protected <T> T mockInterface(String className){
    <T> T interfaceObject = null;
    try {
    Class clazz = Class.forName(className);
    if (clazz.isInterface()) {
    interfaceObject = EasyMock.createMock(className.getClass());
    } catch (ClassNotFoundException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    return interfaceObject;
    Here when I use EasyMock.createMock(className.getClass()) I am getting the below error :-
    "Type mismatch Error saying cannot convert capture#2 of ? extends String to T"
    Here createMock takes class as a parameter as shown below:-
    public static <T> T createMock(Class<T> toMock)
    /* 46 */ return createControl().createMock(toMock);
    What I am doing wrong here? Please clarify.

  • Memory and the number of methods in a class

    if a class A has more methods than another class B, then whether instance of class A needs more memory than instance of class B? or only decided by properties?
    in other words, if i put more methods into an existing class, whether it affects performance?

    Non-static methods can be (abstractly) viewed as static methods:
    public class Clazz {
       private int i = 0;
       public void theMethod() {
          this.i = 5;
    }Is similar to
    public class Clazz {
       private int i;
       public static void theMethod(Clazz this) {
          this.i = 5;
    }(Note that this is by no means compilable). So if you can understand why static methods wouldn't be duplicated in memory, you can see why non-static methods don't need to be either.

  • How to $_POST value datepicker

    How do i $_POST the date from datepicker and save it to mysql?

    You html form should look something like :
    <form action ='submit.php' method='post'>
    <input name='datepicker' class='datepicker'>
    </form>
    Then in submit.php (if your using php5):
    $mydate = filter_var($string, FILTER_CALLBACK, array("options"=>"ValidateDate"));
    function ValidateDate(){
    //Validate the input and make it safe before adding it to the DB
    You can then use $mydate in your sql query and add it to the database. I your using MySQLi or PDO then use the prepare/bind commands.

  • Allowing separate classes to interact

    The first question is, is this possible i.e. suppose I had two classes - a male class and a female class running at the same time, and i wanted them to interact, like if a command was issued in the male then a variable would change in the female.
    The separate programs would update each other while running at the same time.
    If this is possible then what would be the easiest way to do it - please tell me know where to start researching or give any hints.
    I am making a program that demonstrates AI.
    Thanks anyone
    John

    If you want them to be running at the same time, you are probably talking about threads. Your classes should therefore extend the Thread class. If you want them to communicate, they have to know about each other - you should declare a field which will hold the reference to the other thread.
    Something like:
    class Male extends Thread {
         private Female female;
         public void setFemale(Female female) {
              this.female = female;
         public void run() {
    }and similarly the other class.

  • Modifier of class

    I would like to know that how differ between the following:
    public class a
    private class a
    class a
    Is there the term "protected class a"?
    I knew about modifier of method but I don't know that class similar to method.

    Class declarations have the following format:
    [public] abstract class identifier [extends [i]super] [implements [i]interface]
    If a class is not defined as public then classes outside of its' package cannot access it. A class can be marked as either abstract or final but not both. If a class does not explicitly extend another class then it extends Object by default. A class can implement any number of interfaces each seperated by a comma.
    classes cannot be marked as private or protected, it has no meaning at a class level.

  • Receiving a POST, printing the class???

    I'm trying to receive some info through HTTP POST sent by a JAVA API (I'm sending a string) to a servlet that SHOULD read the info and just file it. Here's my servlet:
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.sql.*;
    import java.io.BufferedReader;
    public class xmlwriter extends HttpServlet
    public void service(HttpServletRequest req, HttpServletResponse res)
    throws ServletException, IOException
    ServletOutputStream salida = res.getOutputStream();
    BufferedReader lector = new BufferedReader(new InputStreamReader (System.in));
    res.setContentType("text/HTML");
    System.out.println(lector);
    File f1 = new File ("c:/salida.xml");
    FileWriter out = new FileWriter(f1);
    f1.createNewFile();
    out.write(lector.toString);
    out.close();
    salida.println("OK");
    But what I get on my file is something like "java.io.Streamin@6jb4" or something similar, that the class I'm using, now, what should I use to get the exact string I'm sending???, I know he (the servlet) is receiving something, but how do I get the exact info???

    If you want to write out something that you're reading from your BufferedReader, you have to first "read" from it (into a String), then write out that string.
    Calling "out.write(lector.toString());" will print out a string representation of the "lector" java object (instead of the contents of your in-file).
    Cheers,
    Qualimony
    I'm trying to receive some info through HTTP POST sent
    by a JAVA API (I'm sending a string) to a servlet that
    SHOULD read the info and just file it. Here's my
    servlet:
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.sql.*;
    import java.io.BufferedReader;
    public class xmlwriter extends HttpServlet
    public void service(HttpServletRequest req,
    HttpServletResponse res)
    throws ServletException, IOException
    ServletOutputStream salida = res.getOutputStream();
    BufferedReader lector = new BufferedReader(new
    InputStreamReader (System.in));
    res.setContentType("text/HTML");
    System.out.println(lector);
    File f1 = new File ("c:/salida.xml");
    FileWriter out = new FileWriter(f1);
    f1.createNewFile();
    out.write(lector.toString);
    out.close();
    salida.println("OK");
    But what I get on my file is something like
    "java.io.Streamin@6jb4" or something similar, that the
    class I'm using, now, what should I use to get the
    exact string I'm sending???, I know he (the servlet)
    is receiving something, but how do I get the exact
    info???

  • SWING custom controls.

    I am looking for some articles / examples.
    Desired - esier than
    [http://today.java.net/pub/a/today/2007/02/22/how-to-write-custom-swing-component.html|http://today.java.net/pub/a/today/2007/02/22/how-to-write-custom-swing-component.html]
    and more detailed than [http://java.sun.com/products/jfc/tsc/articles/swing2d/index.html|http://java.sun.com/products/jfc/tsc/articles/swing2d/index.html]
    I am looking for following topics:
    1) How to create custom control that consists from some another controls (for example - 3 JTextField's and 2 JLabel's => similar to DatePicker from MacOS)
    Even without L&F support
    2) How to create custom control with it's own model?
    3) How create a simple control with L&F support?
    Thank you.

    I am looking for following topics:
    1) How to create custom control that consists from some another controls (for example - 3 JTextField's and 2 JLabel's => similar to DatePicker from MacOS)There is a JCalendar javabean that I think can be freely downloaded. search for it
    But how do you create your own?
    Step 1 is knowing what is already out there. There is a ton of stuff that's already been developed, so for you to take on a 2+ week project to do something that's already there is somewhat pointless.
    Step 2 is figuring out what it is, what it does, and what features it has, and what data is included in the model. I myself often shortcut this step, and then after doing a couple of weeks of work, wish that I'd spent more time on it when I was starting.
    Step 3 is deciding what the UI on it will be
    Step 4 is figuring out how to build it - what existing java classes can be reused / refactored, etc.
    Step 5 is building it
    Step 6 is profit :)
    2) How to create custom control with it's own model?You can go the way of the JComponents and build an interface that specs out the requirements for the model, which provides ultimate extensibility. Or you can build a model that is more specific - this has the advantage of not running into over-developed problems, and being generally easier to get coded faster.
    3) How create a simple control with L&F support?Build it off of existing Swing components

Maybe you are looking for