DID YOU KNOW?? - ABOUT DATE TIME CONVERTERS??

Hi All,
DID YOU KNOW??
That the Creator IDE provides a set of converters that you can use to convert component data. If your input field is for numbers, then you most likely need a converter. Converters are also good for formatting dates, times, and currency values. The standard converters, which you can use are located in the Converters section of the Components Palette.
The Date Time Converter
A Date Time Converter Converts between java.lang.String values in your component properties and data types of java.util.Date. The conversion usually applies to the property of a component used to display values and to pick up values entered by users, such as the text property of a Text Field component.
An example is binding a JavaServer Faces component to to a database column of type DATE. When you bind a component, the IDE normally identifies the data type for you and sets the appropriate converter when you establish a binding to the value property. However, you can also add this converter manually by setting the component's converter property.
* Note: If you are using an Oracle database, use the SQL Timestamp converter instead.
Learn more :-
JDBC Type Conversions
http://developers.sun.com/prodtech/javatools/jscreator/reference/docs/help/2update1/connect_data/jdbc_type_conversions.html
Using Converters
http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/converters.html
We would like to know the following from you :-
1) Why and How are you using Converters in applications you are building?
2) Did you face any challenges while using them?
3) Did you find any cool ways of using these or build any cool custom converters?
4) Any feedback you might want to share about converters to make it easier in using them.
Thanks for all your inputs and for joining in the discussion.
K

did you know that sqlTimestamp converter returns value of java.sql.Date type if you are using sun's oracle jdbc driver. It will return the correct type if you use oracle's jdbc driver. Not sure why this happen, though. Bug?

Similar Messages

  • [URXVT] Did you know about the contextual menu ?

    Hey folks,
    I've been using urxvt for some years now but just realized that if you select some text, and do a Ctrl+right click, you get a menu with things like copy to clipboard or rot13 (??).
    Did you know about this ? Is it a new feature ?
    Are there more hidden things like this ?
    I know about the Ctrl+Shift keycapture mode.
    Cheers,
    ~k

    What would you like in the documentation? Do you have specific questions about particular components? Do you want examples? What's missing from the online help at http://developers.sun.com/prodtech/javatools/jscreator/reference/docs/help/2update1/components/advanced_list.html?

  • DID YOU KNOW ?? - Number Converters?

    Hi All,
    DID YOU KNOW??
    That the Creator IDE provides a set of converters that you can use to convert component data. If your input field is for numbers, then you most likely need a converter. Converters are also good for formatting dates, times, and currency values. The standard converters, which you can use are located in the Converters section of the Components Palette.
    The Number Converter
    Is a type of converter that Converts between java.lang.String values in your component properties and data types of java.lang.Number. The conversion usually applies to the property a component uses to display values and to pick up values entered by users. For example, the Text Field component uses the text property for this purpose.
    The Number Converter returns a Long if possible (within the range [Long.MIN_VALUE, Long.MAX_VALUE] and with no decimals), otherwise a Double. If you need the converter to return a numerical type other than Long or Double, or you need to narrow the choice to a specific type. The other lists of converters to choose from include Big Decimal Converter, Integer Converter, Long Converter, Float Converter, Long Converter, Short Converter and Double Converter.
    When you bind a component, the IDE normally identifies the data type for you and sets the appropriate converter when you establish a binding to the value property. However, you can also add a converter manually by setting the component's converter property.
    We would like to know the following from you :-
    1) Why and How are you using Converters in applications you are building?
    2) Did you face any challenges while using them?
    3) Did you find any cool ways of using these or build any cool custom converters?
    4) Any feedback you might want to share about converters to make it easier in using them.
    Thanks for all your inputs and for joining in the discussion.
    (Note :- This is the continuation of the Threadinar Series - see index at
    http://forum.java.sun.com/thread.jspa?threadID=5103424)
    K

    I'm having problems converting from text input with a NumberConvertor back to text. I'm trying to take a pay amount, annualize it (x * 24), and convert it back to text for a database query. I got the following to work, but is there a better way?
    Input field is "grossPay", output is "apay".
    public String button1_action() {
    Number n = (Number) grossPay.getValue();
    float f = n.floatValue() * 24;
    apay.setText("" + f);
    return null;
    }

  • Did you know about "Arbitration and Mediation" FAQ?

    I have just made a discovery that many of you frustrated Verizon customers will be very interested in knowing about. Did you know that you can type in legal action in the search verizon.com box and you will find a category called "Arbitration & Mediation" FAQ? For those of you, like myself who have been dealing with months and months of issues with Verizon and you are getting nowhere, you might check this out. It is very interesting.This may have saved me hours and hours of time and some over the top emotion that our situation has caused.

    Proper names are known. But product names will not be - nor will acronyms.

  • Where's can i Buy any Professional Authoring DVD for IMAC, did you know about Studio DVD pro ?

    I need help, i need buy or dowload some Professional Authoring DVD for IMAC, I editing in my Final Cut Pro X and need a DVD authoring
    after installing the Mavericks, my IDVD don't work, can someone help about this ?
    also, did you know if DVD studio pro its available for sale ? if yes, where's can I buy  ?
    thanks

    Apple discontinued DVD Studio Pro three/four years ago. You can probably find copies from private sellers, but whether it will work without problems on OS X 10.9 I don't know. I don't know of any "professional" alternative to DVDSP for Mac, but someone else here may be able to offer suggestions.
    As to iDVD, it should work under Mavericks, depending on what version of iDVD you're running. You might ask for assitance in the iDVD forum. For alternatives to iDVD, see this page for suggestions:
    http://alternativeto.net/software/idvd/?platform=mac
    Regards.

  • Did you know about Flash Cookies?

    I know about regular cookies, and delete them... but had no idea there was such a thing as a Flash Cookie
    Read about 1/2 way down here http://windowssecrets.com/comp/100805

    Rod,
    Since you're a confessed geek with some actual coding chops, I'm sure you'll understand the hair I'm about to split here. Hang on a moment while I grab my axe...
    Even with your page jumps, the cookie isn't doing anything. It's just a text file named after a snack. What's causing your page to jump, browsers to redirect, and the moon to shift its gravitational field three degrees to the north is the code in the web page that's being loaded. True, it may look in the text file to see what IP address to report to, but the connection, handshaking, transfer of data and powering up of lasers are all on your web page (or the server side code being executed on its behalf). The cookie is little more than a poorly dressed informant hanging out on the street corner waiting to pass along tidbits of information when the right person asks. Doesn't exactly make it a savory character (name notwithstanding), but it's a harmless one nonetheless. If it's evil you seek, you'll find it in the web site, not the cookie. And that's why I never understood the religious fervor against cookies.
    Now, if you want a truly dangerous leave behind, at least on Windows, ActiveX controls are your guys. They're really just glorified COM objects, and thus have complete access to the entire Windows API. Give me permission to install an ActiveX control on your machine and I can rewrite your file system, start and stop services, reboot your computer, or just turn the screen a hyperintelligent shade of the color blue because it amuses me. Anything that can be done in Windows programming is essentially available to the ActiveX control.
    Of course, browsers got hip to this years ago, and now the default security settings for ActiveX are to not install automatically, or at least to query the user first. Or, as it's configured on my machine, feel free to install if you can make it past this shotgun pointed at your head. Maybe that's why there's not as much of a flap about ActiveX as there is about cookies. Because they're truly dangerous, the browser community took it seriously.and now only someone with a death wish allows a web page to install an ActiveX component.
    And overall, this is kinda my point. The much maligned cookie gets a bad rap while in truth it's the web page staring you right in the face that's preparing to rob, rape and pillage. But then, misdirection has always been a classic tactic in warfare.

  • Did you know about iphone in ear headphone Two drivers in each earpiece ?

    i just wanna prepare to buy a new iphone in ear headphone
    Apple In-Ear Headphones with Remote and Mic
      £65.00
    is so expensive but some youtube user said it is prefect for sound quality so what is your opinion ?

    No I have my own iPhone iPad and MacBook  so everything is set up on devices that are mine and as far as I know I never connected to anyone else's device and logged with my apple ID.  But are you saying it is possible for someone to have obtained my apple ID and send an iMessage from their device with my contact information so it looks like it came directly from me?  It's crazy I looked down at my iPhone and saw this message had just been sent that I did not type or send

  • TS3579 I found this useful because I did not know about the effect of typing in data and that you could only drag to rearrange the data.  I had typed in data before and this had caused problems but restoring defaults did not cause correct dates to show up

    I found this  (TS3579: If the wrong date or time is displayed in some apps on your Mac Learn about If the wrong date or time is displayed in some apps on your Mac) useful because I did not know about the effect of typing in data and that you could only drag to rearrange the data.  I had typed in data before and this had caused problems but restoring defaults did not cause correct dates to show up in Finder. 

    It sounds like there are a couple things going on here.  First check if you have a successful install of SQL Server, then we'll figure out the connection issues.
    Can you launch SQL Server Configuration Manager and check for SQL Server (MSSQLSERVER) if default instance or SQL Server (other name) if you've configured your instance as a named instance.  Once you find this, make sure the service is started. 
    If not started, try to start it and see if it throws an error.  If you get an error, post the error message your hitting.  If the service starts, you can then launch SSMS and try to connect.  If you have a default instance, you can use the machine
    name in the connection dialog.  Ex:  "COWBOYS" where Cowboys is the machine name.  However, if you named the SQL Server instance during install, you'll need to connect using the machine\instance format.  Ex:  COWBOYS\Romo (where Romo
    is the instance name you set during install).
    You can also look at the summary.txt file in the SQL Server setup error logs to see what happened on the most recent install.  Past install history is archived in the log folder if you need to dig those up to help troubleshoot, but the most
    recent one may help get to the bottom of it if there is an issue with setup detecting a prior instance that needs to be repaired.
    Thanks,
    Sam Lester (MSFT)
    http://blogs.msdn.com/b/samlester
    This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click
    "Mark as Answer" and
    "Vote as Helpful" on posts that help you. This can be beneficial to other community members reading the thread.

  • DID YOU KNOW?? - ABOUT DATAPROVIDER COMPONENTS IN THE PALETTE??

    Hi All,
    DID YOU KNOW??
    Practically all applications entail accessing data of some sort, often data stored in a relational database table or some sort of list, such as a vector or an array. Usually you need to read in data from the data source, but many times you have to update that data, too. The Sun Java Studio Creator integrated development environment, as another enhancement to its application model, provides data provider components that simplify accessing data sources, regardless of whether the data source is a relational database table, flat file, web service, vector, array, or some other type of data store.
    A data provider component is a nonvisual abstraction for wrapping sources of data, and it represents a more generic and flexible data binding mechanism. A glance at the Palette indicates that there are many different kinds of data providers available to you. These include data providers for cached RowSets, ResultSets, lists, arrays, maps, table rows, and method results.
    These data providers constitute a layer between a web application's components and its persistence tier, such as a database table, Array object, or Enterprise JavaBean object. This layer enables you to access data in a consistent way, even though data may come from different sources.
    Lets briefly discuss the CachedRowSetDataProvider
    The CachedRowSetDataProvider Component
    A CachedRowSetDataProvider is a wrapper to data held in a CachedRowSet. The primary purpose of a CachedRowSetDataProvider is to facilitate binding to components in the IDE. A CachedRowSet stores the data retrieved from a database. In fact, the only information held by the CachedRowSetDataProvider is a cursor position into the CachedRowSet. Multiple CachedRowSetDataProvider instances can reference the same CachedRowSet, and each instance will have its own cursor position into the CachedRowSet.
    Learn more :-
    Working With Data Providers
    http://developers.sun.com/jscreator/learning/tutorials/2/dataproviders.html
    Data Provider Components in Java Studio Creator
    http://developers.sun.com/jscreator/reference/fi/2/data-providers.html
    Using CachedRowSet and CachedRowSetDataProvider in the Sun Java Studio Creator IDE
    http://developers.sun.com/jscreator/reference/techart/2/insert_row_in_table.html
    We would like to know the following from you :-
    1) Which of the DataProviders are you using in applications you are building? Also How and Where?
    2) Did you face any challenges while using them?
    3) Did you find any special usages/scenarios for using these components?
    4) Do you have any feedback/comments/improvements which you would like to see with using Dataproviders?
    Thank you for all your inputs and for joining in the discussion.
    K

    .

  • Did you know that your Internet Explorer is out of date?

    Hello there,
    when i access this site http://www.sickkids.ca/ , I am getting this error message, please advice.
    Did you know that your Internet Explorer is out of date?
    To get the best possible experience using our website we recommend that you upgrade to a newer version or other web browser. A list of the most popular web browsers can be found below"

    It's probably giving you that warning because your Firefox is very out of date. Please read [http://www.getfirefox.com www.getfirefox.com] to see how to update to the latest version of Firefox (14.0.1 right now)

  • Did you know this about bridge?

    I'm just curious if I'm the only one who is this slow... :p
    But did you know you could use Bridge to search your computer for images by dimensions? Man, I spent sooo much time this morning trying to find a way to 'trick' Windows into giving me a search by dimensions option. :D
    Afterwards, I wasted even
    more time googling for utilities or tools with that feature. :\ Then it hit me: I remembered seeing all kinds of neat bits of image information in Bridge last time I used it.
    And there it was, in the "find" menu... lol

    You are absolutely right, it is good business practice to check out the offerings from a company before you show or give it to your customers.
    I guess I just assumed that there would be a cut-out on the front cover of the Aperture books, since the soft cover books I ordered from iPhoto did have the front cover cut-out.
    My question, however, is where in the description of the Aperture hard cover book does it state that the cover photo is pasted on ? It is difficult to tell how the front cover is constructed from the photos on the Aperture web site.
    ...... I may have missed it.
    A lesson learned!
    Thanks for your comments.

  • DID YOU KNOW?? - ABOUT ADVANCED COMPONENTS IN THE PALETTE??

    <br>
    Hi All,
    DID YOU KNOW??
    The IDE ships with the following Advanced Components in the Palette.
    These advanced components are a set of JavaServer Page markup tags for advanced users. The components have no visual appearance and are useful to developers with experience in JSP and JavaServer Faces technologies.
    * Encoding
    * Faces Action Listener
    * Faces Converter
    * Faces Validator
    * Faces Value Change Listener
    * Faces Verbatim
    * Link
    * Load Bundle
    * Markup
    * Meta
    * Parameter
    * Script
    Lets look at MARKUP component in more detail.
    The MARKUP Component
    You can drag the Markup component Markup component icon from the Palette's Advanced category to the Visual Designer to create a standard HTML tag. The Markup component enables you to insert HTML elements into the JSP page in places that HTML is not permitted.
    When you drop this component on a page in the Visual Designer, you cannot see it on the page until you set the tag property. You can see it in the Outline window and you can select it there to edit its properties in the Properties window.
    Use the tag property to specify the type of HTML element to insert. For instance, to insert an <hr> tag, set the tag property to hr with no angle brackets and select the singleton property .
    To provide compliance with XHTML, if the HTML element you are inserting is a singleton element, you must specify the singleton property, which causes a trailing /> to be generated in the rendered HTML. For example, the <br> element is a singleton element that must be rendered as
    to make it XHTML compliant.
    If you want to specify HTML attributes in addition to id and style for the element you are inserting, use the extraAttributes property.
    Learn more :-
    http://developers.sun.com/prodtech/javatools/jscreator/reference/docs/help/2update1/components/advanced_list.html
    We would like to know the following from you :-
    1) Are you using these Advanced Components in applications you are building? If so How and Where?
    2) Did you face any challenges while using them?
    3) Did you find any special usages/scenarios for using these components?
    Thanks for all your inputs and for joining in the discussion.
    K
    </br>

    What would you like in the documentation? Do you have specific questions about particular components? Do you want examples? What's missing from the online help at http://developers.sun.com/prodtech/javatools/jscreator/reference/docs/help/2update1/components/advanced_list.html?

  • Did you know... (about dictionary of this forum)

    Did you know, that default spell checker (when writing a message on forum) does not recognize words like: Microsystems, JavaBean, NetBeans, JDK, SDK, EE (used frequently on J2EE forum), Servlet, JSP, EJB, but knows words like SE (for J2SE) and Microsoft.
    (Microsoft ???!!!)
    It knows about Java but not about java (case does matter?!)
    When I wrote feedback about annoying horizontal scrollbar when viewing some of the forums with FireFox (for example Java EE SDK forum),
    I noticed that it also doesn't know about firefox, netscape, ie,
    but knows about Firefox, Netscape and IE.

    Proper names are known. But product names will not be - nor will acronyms.

  • Did You Know: Multi-Task

    Did you know that now with iOS 7 you can close multiple apps at one time with the swipe of your fingers?
    All you do is you double click on your Home Button, slide your open apps to the left to where you can see three of your apps on the screen.  Now, instead of using just one finger to slide on up to close your apps, try using two. How about three....
    Try it now!

    I do hope others find the videos useful. 
    ↙-----------How do I give Kudos?| How do I mark a post as Solved? ----------------↓

  • How did you feel about your first mac?

    As an early christmas present I received a 13 inch macbook air, 2GB RAM and 1.86GHz dual core cpu.
    I am mostly used to PC laptops running linux or often I put solaris on them. I study Computer Science and have Asperger's Syndrome.
    I got my mac as windows had too much bloatware and Linux was too unstable on my 64-bit hardware (needed 6 GiB RAM for large compilations). I was going to use the macbook air to take notes and some minor work between classes such as writing assembly subroutines, C and java. The primary use of this system was going to be as a personal assistant to have my calendar and files etc.
    The system is so powerful with a full 12 hours battery life when working on the localhost that it can out-do a 2.4GHz dual core with 6 GiB RAM PC running any OS. This system is now used for all my work due to it's capabilities and portability. After only one week with a mac I dont know how I lived without one, and my carer says it has made me show immense improvements day-to-day. I am now tempted to learn Objective-C as well as how to use Cocoa from Python to be more efficient, especially after seeing the perfection in this system.
    How did you feel when you got your first mac?

    A related question might be, what did you think about the introduction of the IBM PC?
    I had been designing digital systems and working with computers for a few years before the PC's introduction in 1981. The mainstay systems were 8 bit Z80 or 8085 machines running at 4 or 6 MHz. They ran CP/M with its command line interface. Although the maximum memory these systems could use was 64 MB, being a single user, single-task operating sytem, even the most resource-hungry programs (word processors for instance) ran very fast. CP/M itself needed only a few K.
    Dual floppy disk systems were common, 180 KB per disk unless you had double sided floppies - 360 K. The A drive booted the operating system, after which you could insert a program disk. The B drive held your data. I had one machine with a whopping 5 MB hard disk - the C drive. I treated it with special reverence.
    When rumors began about IBM producing its version of a desktop PC, many people including myself had grand expectations. Clearly Big Blue would emerge as the leader in desktop computers, since they had the resources to dictate what the standard would be. Everyone knew the others would be left in the dust. What kind of processor would it use? How much memory? Would it have a slimmed down version of the multiuser, multitasking operating system used in its System/34 minicomputer? Or would it resemble something that DEC used in its PDP-11?
    Well, when the IBM PC came out in 1981, needless to say it was an enormous disappointment. It wasn't much better than anything else I had already been using for three or four years already, except the PC was much, much more expensive. No hard disk unless you wanted to buy an upgraded power supply (more $$$) and then all they offered was 10 MB. Forget about multiple users or multitasking. It didn't even have the equivalent of CP/M's PIP. The whole thing seemed... intentionally crippled. This was supposed to be the future of computing? In my opinion it was a major step backward. The XT that followed it offered only minimal improvements. I rejected the IBM PC as not cost effective and kept using my CP/M dinosaurs.
    So, when Apple introduced the Macintosh a couple years later I finally saw, in the flesh, what I thought a computer ought to be. A totally bit mapped display, a robust 16/32 bit processor, real sound capability (everything before it could only "beep") and a true graphical UI. You could name a file anything you want, no 8x3 idiocy. +To this day+ Windows carries remnants of 8x3 filenames!
    The Macintosh blew away the PC, if not in performance, in its potential. Unlike the "crippled" PC the Mac seemed limitless. This was cool. The Mac wasn't without limitations though - there was no good way to install a hard disk for instance - but for some reason I considered those limitations trivial and believed they would be overcome in the near future. I waited for the first "upgrade" - the "Fat Mac" with a whopping 512K memory. Half a megabyte!
    I used that computer for several years, until the SE/30 came out, which I kept in service for about ten years. I ultimately expanded its memory to 32 MB while PC users were struggling with extended memory or expanded memory - you had to know which was which - to get beyond the PC's stupid 640K barrier. My 30 MB HD eventually grew small, but that was easily remedied with an external SCSI drive. Although the computer did everything I ever expected it to do, the Internet eventually made it functionally obsolete. It could run a browser (forget which one) but the black and white limitation made it marginally useful.
    I eventually replaced it with an iMac, which echoed the original Mac's introduction with its forward-thinking design. The iMac opened up a new world in much the same way the original Macintosh did in 1984.
    All my Macs still work.
    yoshitaka wrote:
    ... After only one week with a mac I dont know how I lived without one, and my carer says it has made me show immense improvements day-to-day.
    That pretty much sums it up.
    In retrospect, I believe that IBM and its marriage of convenience with Microsoft delayed the evolution of desktop computing a decade or more. I cringe whenever I think of the aggregate productivity loss and utter frustration shared by millions of PC / Windows devotees all these years.

Maybe you are looking for

  • How can I save different versions in iMovie 11 (plus angry rant)

    Sigh.  My fiancee is sitting in front of the computer crying because iMove just messed up her project.  The project that was basically done.  The project she has to hand in tomorrow morning (it is midnight right now).  Who knows what happened.  Thing

  • ITunes 10.5.3 installation failed

    I downloaded iTunes for Mac 10.5.3 from Apple at http://www.apple.com/itunes/download/ today. When I run the installer I get the following message: 'The installation failed. The Installer encountered an error that caused the installation to fail. Con

  • Access database query data in Java SCriptlet

    Question: Creating a web page and plotting points on the page: 1) Database query results in decimal values latitude and longitude. 2) Perform calculations on lati. & long. in a <% java scriptlet %> I don't know how to pass the data back and forth bet

  • OS X 10.6.8 - Maverick Installer not launching

    Macbook Pro running OS X 10.6.8 - Installed all software updates prior to downloading Maverick OS X Installer. Installer downloaded but will not launch. Chrome and other applications will not respond (constantly freezes). I have re-downloaded and res

  • Oli*bw transactions for sd,mm,pur,

    Hi, can anybody tell me the various oli*bw transactions to fill setup tables and pls explain the difference between when we are going to fill setup tables of sd by oli7bw and when gponig through sbiw wat is the difference and wat to enter in the info