CFinput pattern problem

Hello~
I have a bit of a weird problem. I am using validate="regular_expression" with the pattern attribute in one of the <cfinput> tags in a rather long form. There are other required fields, etc., throughout the form. If I leave the "pattern" attribute out of this one <cfinput> tag, everything works correctly and a message box pops up with any errors that are present. If I add in the "pattern" attribute, the form submits with no error checking at all. Has anyone ever run across this before?
Works (minus checking the regular expression):
<cfinput type="text" class="inputArea" size="50" maxlength="50" name="domainMask" value="#local.domainMask#" id="domainMask"  message="Please enter a valid domain mask." validate="regular_expression" />
No error checking (including regular expression):
<cfinput type="text" class="inputArea" size="50" maxlength="50" name="domainMask" value="#local.domainMask#" id="domainMask"  message="Please enter a valid domain mask." validate="regular_expression" pattern="^((https://){1}(www\.)?[A-Za-z0-9-_]{3,}(.com/){1})$" />
Thanks!
KC

Do you get any JS errors?
Can you provide a fully-function, self-contained example that demonstrates what you're seeing (ie: a bare-minimum complete form, and examples of input data that demonstrate it)?
Adam

Similar Messages

  • Illustrator 5 - patterns problem with printing

    Hi please please help having majoy problems and need help asap in work!!!
    I am working on a PC windows 7 illustrator 5.
    when I create a pattern any type even a imple spot and fill a CAD t shirt, its fine, when I print it, it creates lines through out either vertica/horizonal when I send to someone else to print its fine when i print on another printer its fine. when using default pattern swatches from illutstrator it prints fine, it seems to be when I fill a flat CAD with a pattern and I have created it.
    Is this something to do with printer? I need ergent help its driving me crazy have asked loads of IT people everyone is stuck even my collegues who have worked with software for years.
    please please help!! I have tried everythint, loads of diffrent pattens and colours nothing is fixing, lines still show on pdf doc too.

    Illustrator 5 is more than a decade old. If you really mean version 5, you may be hard pressed to find much help.
    If by chance you mean CS5 (version 15) that's another matter.
    Does the problem exisit in a new document or only in specific documents?
    Have you tried trashing the Ai settings?
    The fact that someone else can print it... as well as switching printers works, would lead to a issue with your print driver for the specific printer showing the issue. Or perhaps a combination of the print driver and the artwork construction. For example, the printer only handles Postscript level 2 and you need Postscript level 3 support to print the artwork properly.

  • My Offset filter not working in Cs6: Seamless pattern problems

    Hi all.
    Im trying to create a seamless pattern. using lots of layers.
    Im going to filter/other/offset/, adding the vertical or horizontal dimensions for as 2953px (image size is 2953px x 2953px). and checking the ‘wrap around’ box.
    But it’s not working & is cropping off loads of the layer, so not seamless at all.
    I've tried with another layer and the same thing is happening.
    I've 'revealed all' and shows nothing. I’ve tried to delete any transparent stray pixels around the layer I'm trying to wrap.
    & I have also selected all & then cropped the image but it’s still happening.
    I've googled till my hearts content but found no other idea on how to solve. Any ideas?
    All my layers are from brushes I have created and used so lots of transparent textures. But that would be a problem if I have tried all of the above would it?
    Many thanks in advance.

    Thanks. I have attached screen shot.
    If you see on the top left and bottom left this is the "white flower copy" layer that I am trying to offset. This is a copy of the white flow with blue centre just to the left of the offset window.
    You will see that the offset layer I want to wrap is missing the blue centre.

  • Sample Design pattern problems

    I am currently studying design patterns from "Head First design patterns".
    Does any body know any website that contains sample design related problems so that I can test my designing skills?
    Thanks

    [Google for 'design patterns' here at sun.com|http://google.com/search?q=design+patterns+site:sun.com].

  • Pattern Problems

    I am trying to make a diagonal line pattern to fill a shape. Easy, right? Well for some reason I can't get it to line up. I followed Teri Petti's instructional Pattern Helper, which was great. My thanks for those gurus who make themselves and their resources available. It looks perfect when I apply the transform to it, but the paths are cut off at the edges when I make it a swatch. Here's a screenshot that shows more detail than I can easily describe.
    http://www.aerissolutions.com/images/screenshot.jpg
    Thanks!
    C

    Crystal,
    In your second two screenshots, it may just be anti-aliasing.
    The way to tell the difference between anti-aliasing problems and real tile design problems is that anti-aliasing problems are never more than one pixel wide no matter what the zoom level. They even tend to look worse when zoomed way out like to 25% or less, and may disappear entirely at very high zooms such as 3200% or more. In contrast, a real problem with the tile stitching will get wider and more noticeable as you zoom in.
    Once you've verified that it isn't just an anti-aliasing artifact, the best way to trouble-shoot a pattern that isn't working is to drag out a copy of the definition from the Swatches palette. First use the Layers palette to verify that the unpainted rectangle you meant to be the boundary tile is at the very back of the definition. (If it isn't, then either your unpainted rectangle was not at the back, or it was not selected, or it was not a true rectangle.)
    Then, assuming the tile rectangle is in the correct place, select the tile rectangle with the white-arrow-plus tool (so that you get the entire thing), copy it, then select the whole definition group and Paste in Front. Select the definition together with your extra copy of the tile rectangle, and do a Make Clipping Mask. (This simulates what happens with pattern fills: they implicitly get clipped to the tile boundary.)
    Now select the whole clipping group by mousing down on the top left corner of the tile rectangle, and alt-drag a copy, snapping to the top right corner of the tile rectangle, so that you have two copies side by side. Then do the same thing moving down, so that you have two copies top to bottom. Flip back and forth between outline view and preview view, looking for places where the objects don't match up at the edges.
    With diagonal lines it can be tricky getting the width and height both to be correct, although 45° isn't hard. Also, whenever you have slanted lines with strokes on them, you don't want the endpoints of the lines to be exactly on the tile boundary, or you get the business I referred to earlier, where there is a gap when the stroke doesn't extend all the way to the edge.
    I'll try to put together some screen shots showing the above phenomenon.

  • URL Pattern problem

    Hi
    I deployed an ear which has a web module with contextroot '/test'. It has a jsp whose url-pattern is mapped to /testjsp. From a html form i'm calling this jsp and the action attribute is /test/testjsp. But the error is resource not found /test/servlet/<servlet-name>.
    1)Where is this /servlet coming from?
    And the same webapp seems to work fine in tomcat.
    2)How does the Netweaver server behave with context root and URL mappings?
    3)Is there any configuration change to be done?
    Any help is greatly appreciated.
    Thanks,
    Rajit

    Did you try using render tags?
              Here is a link. <u>http://e-docs.bea.com/workshop/docs81/doc/en/portal/taglib/navSkeletonRendering.html
              </u>
              Seenu.

  • 2004s BI Patterns Problem

    Hi,  From what I can understand you are to create an "Information Consumers Pattern" Web Template and present that to the users.  Then if they need more functionality they select the "Analysis" button.  
         When I select the "Analysis" button, the Analysis Web Window that opens is a fixed size that is not big enough for the report and the window can't be resized. 
    What can be done to make the window resizeable so that it is big enough for the whole report to be seen?
    Thanks!

    No longer using BI Patterns

  • Regex pattern problem

    G'day,
    I've been working my way through the Pattern API, and it's been working well for me so far, but I've stumbled on the following point:
    How do you represent the "[" or "]" literal characters?
    Basically the pattern I'm trying to match is a timestamp that would look like [00:00], so I'm looking for a pattern like "\[[0-9]{2}:[0-9]{2}\]" (replacing "\[" and "\]"with something that works).
    Any help is appreciated.

    use DOUBLE backslash to escape special symbols (since the first one is ate by javac)

  • How to get my color ink to print in color

    i cannot get my printer in color, when i hit print, i clink on color but all i get in black, and its  a new cartridge 

    Hey @ldc1982, 
    Welcome to the HP Support Forum.  
    I understand you're unable to print in colour using your HP Deskjet 1010 Printer.  I would like to assist you with this.  I have some suggestions that may resolve your issue.  
    I have located an article from HP that provides some handy steps that address this particular issue.  Try the following selected Solutions from the article in sequence: 
    Solution four: Check the print settingsFollow these steps to check the print settings to make sure that they are appropriate for your print job.
    Click the Windows icon (), click All Programs, click HP, click the folder for your HP printer, and then click the icon for your HP printer (). The printer software opens.
     NOTE:You can also open the HP printer software from your computer desktop: double-click the icon for your HP printer ().
    Click Print, and then click Set Preferences. The Printing Preferences dialog box opens.
    Click the Paper/Quality tab.
    From the Media drop-down, select the paper type that matches the paper loaded in the input tray and the desired print quality.
    Click the Advanced tab. The Advanced Options dialog box opens.
    Review the following options, and then make any necessary changes. To change a setting, click the current setting, and then select the new setting from the drop-down menu displays.
    Paper/Output: Make sure that the selected option matches your paper size. For example, for legal paper, select Legal.
    Document Options: Make sure that Print in Grayscale is set to Off, unless you are printing in Grayscale intentionally.
    Resolution: This list allows you to see the resolution specifications for the possible print quality selections. For example, Max DPI mode is 1200x1200 dpi. To change the resolution, you must click the Paper/Quality tab, and then select the paper type and print quality from the Media drop-down menu.
    Click OK, and then click OK again to apply the settings.
    Click OK from the Print dialog box to start the print job.
    If these steps resolved the issue, you do not need to continue troubleshooting.
    If the issue persists, continue to the next solution.
    Solution five: Check estimated ink levels and replace low or empty cartridges
     NOTE:Ink level warnings and indicators provide estimates for planning purposes only. When an indicator shows low-ink levels, consider having a replacement cartridge available to avoid possible printing delays. You do not need to replace cartridges until print quality becomes unacceptable.
    Click the Windows icon (), click All Programs, click HP, click the folder for your HP printer, and then click the icon for your HP printer (). The printer software opens.
     NOTE:You can also open the HP printer software from your computer desktop. Double-click the icon for your HP printer ().
    Click the Estimated Ink Levels icon. The HP Toolbox opens.
    Click the Estimated Ink Levels tab. The Estimated Ink Levels window opens.
    Figure : The Estimated Ink Levels window
    If the ink level graphic shows low or empty cartridges, and the quality of your printouts is unsatisfactory, replace the cartridges now.Click here to go to instructions in this document for installing a replacement cartridge.
    If the ink level graphic shows full cartridges, you do not need to replace the cartridges yet. Continue to the next solution.
    Solution six: Print and evaluate a test page and troubleshoot defects
    Follow these steps to print, and then evaluate a test page.
    Step one: Print a test page 
    Make sure there is plain white, letter-size paper loaded in the input tray.
    Click the Windows icon (), click All Programs, click HP, click the folder for your HP printer, and then click the icon for your HP printer (). The printer software opens.
     NOTE:You can also open the HP printer software from your computer desktop: double-click the icon for your HP printer ().
    In the printer software, click Print.
    Click Maintain Your Printer (). The HP Toolbox opens.
    Click the Device Reports tab.
    Click the Print Diagnostic Information icon. The test page prints.
    Figure : Example of test page
    Step two: Determine which cartridges printed which areas of the test page 
    Different cartridges print different areas of the test page. Use the following guidelines to determine which cartridge printed which areas.
    The black cartridge prints the black areas of the page, such as the black bars and black text.
    The color cartridge prints the color areas of the page, such as the cyan (blue), magenta, and yellow color bars.
    Figure : Which cartridge prints which areas
    Printed with the tri-color cartridge
    Printed with the black cartridge
    Make a note of which cartridge printed which areas of the test page, and then continue to the next step to check the report for defects.
    Step three: Check the test page for defects 
    In general, if the printer and its cartridges are working correctly, all the color bars should be present, unstreaked, and uniform in color. The black text on the page should not show ink streaks.
    Use the following table for examples of defects that can exist on the test page. The following examples are not inclusive, but tend to represent the most common issues.
    Examples of defects on the test page
    Defect
    Example
    Description or cause
    Broken lines in grid patterns
    Problem with the ink nozzles
    Faded or nonuniform colors in the color blocks
    Depleted cartridges, or ink mixing together
    Track marks or ink smears in the text
    Fibers or other debris on one or both of the cartridges
    The color blocks are streaked or lined
    The cartridge might be running out of ink or the nozzles might be clogged
    One or more of the colored blocks is missing entirely
    All colors printed - no missing colors
    Yellow missing - the color cartridge is not printing correctly
    The cartridge is out of one color of ink or the ink nozzles might be clogged.
    If you see one or more defects on the print quality diagnostic report, continue to the next steps.
    If there are no defects on the print quality diagnostic report, it indicates that the print mechanism and ink supplies work correctly. Therefore, you do not need to continue the troubleshooting steps in the remainder of this document. However, if printouts are still unsatisfactory, try the following general procedures to improve print quality:
    Make sure that the image you are printing has sufficient resolution. Enlarged images might appear fuzzy or blurry.
    If the issue is confined to a band near the edge of a printout, use the software you installed with the printer or another software program to rotate the image 180 degrees. The problem might not display on the other end of the printout.
    Avoid leaving unprotected cartridges out of the printer for an extended period of time.
    Always use the Power button to turn off the printer. This protects the cartridges from drying out.
    Windows only: If you are experiencing garbled, jumbled or illogical text, incomplete printouts, or missing text or graphics, go toContinuous Pages of Strange or Garbled Characters Print in Windows.
    Step four: Clean the cartridges using an automated toolFollow these steps to run an automated tool to clean the cartridges if you found defects on the extended test report.
    Click the Windows icon (), click All Programs, click HP, click the folder for your HP printer, and then click the icon for your HP printer (). The printer software opens.
     NOTE:You can also open the HP printer software from your computer desktop: double-click the icon for your HP printer ().
    In the printer software, click Print.
    Click Maintain Your Printer (). The HP Toolbox opens.
    Click the Device Services tab.
    Click Clean Ink Cartridges, and then follow the on-screen instructions to clean the cartridges.
    After running the tool, click Print to print a test page. If the print quality is still unacceptable, follow the on-screen instructions to run aSecond-level clean.
    If these steps resolved the issue, there is no need to continue troubleshooting.
    If the issue persists, see the next step.
    Step five: Align the printer
     NOTE:Make sure that there is plain white U.S. Letter or A4 sized paper in the input tray.
    Click the Windows icon (), click All Programs, click HP, click the folder for your HP printer, and then click the icon for your HP printer (). The printer software opens.
     NOTE:You can also open the HP printer software from your computer desktop: double-click the icon for your HP printer ().
    In the printer software, click Print.
    Click Maintain Your Printer (). The HP Toolbox opens.
    Click the Device Services tab.
    Click Align Ink Cartridges, and then follow the on-screen instructions to print the alignment page.
    Review the alignment page, follow the on-screen instructions to complete the alignment, and then click Done.
    If these steps resolved the issue, there is no need to continue troubleshooting.
    If the issue persists, see the next step.
    Step six: Clean the area around the ink nozzles
    Complete these steps only if there were track marks or smears in the text on the test report.
     CAUTION:Do not perform these steps unless the test report specifically shows smeared text or track marks. If the report does not show this defect, continue to the next solution.
    Gather the following materials:
    Dry foam-rubber swabs, lint-free cloth, or any soft material that does not come apart or leave fibers (coffee filters work well)
    Clean sheets of paper
    Distilled, filtered, or bottled water (tap water might contain contaminants that can damage the print cartridges)
     CAUTION:Do not use platen cleaners or alcohol to clean the area. These can damage the cartridge or the printer.
    Press the Power button to turn on the printer, if it is not already on.
    Open the cartridge access door. The carriage moves to the center of the printer. Wait until the carriage is idle and silent before continuing.
    Figure : Open the cartridge access door
    Lightly press down on the cartridge to release it, and then pull the cartridge out to remove it from its slot.
    Figure : Remove the cartridge
     CAUTION:Do not touch the copper-colored contacts or the ink nozzles. Touching these parts can result in clogs, ink failure, and bad electrical connections.
    Figure : Do not touch the contacts or nozzles
    Place the cartridge on a piece of paper with the ink nozzles facing up.
    Lightly moisten a clean, foam-rubber swab with distilled water.
    Clean the face and edges around the ink nozzle with the swab.
     CAUTION:Do not clean the ink nozzle plate.
    Figure : Clean the area around the ink nozzle
    Nozzle plate - DO NOT CLEAN
    Area surrounding ink nozzle - Do clean
    Cartridge contacts - DO NOT CLEAN
    Either let the cartridge sit for 10 minutes to allow the cleaned area to dry, or use a new swab to dry it.
    Hold the cartridge by its sides with the nozzles toward the printer, and then insert the cartridge into its slot. Make sure that the icon on the cartridge matches the icon on the slot.
    The tri-color cartridge () goes in the slot on the left.
    The black cartridge () goes in the slot on the right.
    Figure : Insert the cartridge into the slot
    Push the cartridge forward into its slot until it snaps into place.
    Figure : Push the cartridge into the slot
    Repeat these steps to clean the area surrounding the ink nozzle on the other cartridge.
    Close the cartridge access door.
    If these steps resolved the issue, you do not need to continue troubleshooting.
    If the issue persists, continue to the next solution.
    Solution seven: Replace the problem cartridge
    Follow these steps to replace the problem cartridge, and then align the printer.
    Step one: Remove the problem cartridge 
    If you have a defective cartridge or printhead, it might be under warranty. To check the warranty on your ink supplies, go tohp.com/go/learnaboutsupplies, select your country/region, and then review the limited warranty information for your supplies.
    Press the Power button to turn on the printer, if it is not on already.
    Lower the output tray, and then open the cartridge access door. The carriage moves to the center of the printer. Wait until the printer is idle and quiet.
    Figure : Open the cartridge access door
    Place your finger on top of the cartridge you want to replace, and then lightly pull and press down on the cartridge to release it.
    Figure : Pull and press to remove the cartridges
    The tricolor cartridge (left-hand slot)
    The black cartridge (right-hand slot)
    Step two: Install the new cartridge 
    Remove the new cartridge from its package, and then carefully pull the orange tab to remove the protective plastic tape.
     CAUTION:Do not touch the copper-colored contacts or ink nozzles. Also, do not re-tape the cartridges. Doing so can result in clogs, ink failure, and bad electrical connections.
    Figure : Remove the protective tape
    Hold the cartridge by its sides with the nozzles toward the printer, and then insert the cartridge into its slot. Make sure that the icon on the cartridge matches the icon on the slot.
    The tri-color cartridge () goes in the slot on the left
    The black cartridge () goes in the slot on the right
    Figure : Insert the cartridge into its slot
    Push the cartridge forward until it snaps into place.
    Repeat these steps to insert the other cartridge, if necessary.
    Figure : Install the second cartridge
    Close the cartridge access door.
    Figure : Close the cartridge access door
    Step three: Align the printer
     NOTE:Make sure that there is plain white U.S. Letter or A4 sized paper in the input tray.
    Click the Windows icon (), click All Programs, click HP, click the folder for your HP printer, and then click the icon for your HP printer (). The printer software opens.
     NOTE:You can also open the HP printer software from your computer desktop: double-click the icon for your HP printer ().
    In the printer software, click Print.
    Click Maintain Your Printer (). The HP Toolbox opens.
    Click the Device Services tab.
    Click Align Ink Cartridges, and then follow the on-screen instructions to print the alignment page.
    Review the alignment page, follow the on-screen instructions to complete the alignment, and then click Done.
    If these steps resolved the issue, you do not need to continue troubleshooting.
    Source
    Please let me know the result of your troubleshooting by responding to this post.  If you I have helped you restore colour printing capabilities, feel free to give me a virtual high-five by clicking on the 'Thumbs Up' icon below.  
    Have a great day!  
    E-roq
    I work on behalf of HP.
    Please click Accept as Solution if you feel my post solved your issue, it will help others find the solution.
    Click Kudos Thumbs Up on the right to say “Thanks” for helping!

  • Image files corrupting in Photoshop CS2

    We are working on large 250-300MB files in Photoshop CS2 and when we open them in Photoshop a pattern across the image appears that appears to be replicating a part of the image in a different color channel, a brightly colored banding appears across the image. The thumbnail when opening shows none of the pattern problem and the image opens cleanly with the GraphicConverter, but of course with no layered files. Can you help? Have you ever seen this?

    As I said, the one time this happened to me was when I had a bad hard drive that soon went out on me. But it didn't happen when I opened them only when I saved them.
    Is it happening after you save one or when you first open it?
    Your Mac should have come with a Hardware Test disk, start up off of that and check the hard drive and ram.
    You can also try trashing Photoshop's preferences or changing it's scratch disk.
    And there is Rebuild Launch Services database that can be run with a third party utility like Cocktail, and Repairing Permissions. Also, running Disk Warrior to repair the directory. If you don't have Disk Warrior you can repair the directory using your original install disks, it's pretty anemic compared to Disk Warrior but it might tell you if there is something wrong that it can't fix.
    There is also reinstalling Photoshop and/or an archive and install of the system. I'd be sure and do a hardware check first, though, because if it's the hard drive or ram none of the above will fix it.

  • Regular expression form validation

    I have a form field that I currently validate using
    <cfinput pattern="^([a-zA-Z]{2}$" validate="regular_expression"
    Type="text" required="yes"> (other attributes also including
    name, etc). Anyway, this validates that the input must be 2
    letters, but know I need to validate the field so that "NA" is
    allowed. Is there a way to do that?

    The regular expression
    [^NA]
    causes NA to be escaped.
    The expression
    [NA]
    causes NA to NOT be escaped.
    So if I read your code right, you should insert a [^NA] but
    if this fails, do the other = [NA]
    I always need to test these things :-)
    Hope this helps,
    Hans

  • Verizon EA28 Update

    I just did an update from Verizon on my fascinate. It is the EA28 update. It looks like it disabled the "set unlock pattern" option for the cell phone security. It didn't take them long to write the program to disable the security. Would have been much better if they wrote the proper fix for the 911 / set unlock pattern problem!
    Looks like another band aid for a gaping wound! Instead of working on the trivial options, just GET FROYO RELEASED!!!

    This update has cut my performance basically in half.  SmartBench before this update rendered 950 productivity 1957 gaming.  Now I get 500 productivity and 1300 gaming... what the heck verizon, cut the crap here... if you are going to fix something please fix it correctly, or maybe you could just release 2.2 and make your customers happy for once...
    This is just about a 100% reduction in performance before and after the update.  The reason I decided to test it is that I was starting to notice a little lag.  Hopefully you will rectify this problem, as this makes the samsung fascinate about as performant as a LG Optimus.

  • Problem with timers in a udp state pattern

    Hi.
    As a project on my school, i have created a bomberman game, that supports up to 4 players on a network. And it works fine, when there is no network timers involved, that means no packet loss handling.
    The network part of the game, is build up by UDP, to make the application support multicast. The game session flow, is build up by states which are designed like an extended 2 phase commit pattern.
    That means, the server sends Gameinfo to the clients. Then all the cliens replies with an ACK.
    The server then sends ExecuteGameinfo. Then the clients replies with an ACK.
    The server sends/requests playerinfo, and the clients reply with player info. (the server uses the player info to create gameinfo).
    These 3 states, continues to go on, as long as the game is running. And without timers, it is working great.
    But what if a packet is lost? (on a LAN, packetloss is very rare, but for the sake of my project�s issue, custom made reliability in UDP, I have to face the problem). Then the server would just hang, and wait for the client reply.
    To avoid that, i want to use a timer. If the server havent got any reply for like a 100 ms., the server should resend the package.
    And now to the actual problem :)
    Ive tried using java.util.Timer, and javax.swing.Timer. But both timers does not work in my case. Its like:
    Server starts timer.
    Server sends Gameinfo.
    100 ms passes.
    Server resends Gameinfo.
    Server restarts timer.
    100 ms passes.
    (this goes on for 5 times, and then the client is kicked)
    Server receives ACK.
    Server receives ACK.
    Server receives ACK.
    Server receives ACK.
    Server receives ACK.
    On the client side it looks like this:
    Recieves Gameinfo, replies with ACK
    Recieves Gameinfo, replies with ACK
    x 5
    So its like the server is to concentrated on that timer (even though it runs as a thread), so i doesent notice the incoming packets, that eventually stacks up, and is handled after the timer tasks are done.
    And this is exactly the problem that is described in the Timer api: " Timer tasks should complete quickly. If a timer task takes excessive time to complete, it "hogs" the timer's task execution thread. This can, in turn, delay the execution of subsequent tasks, which may "bunch up" and execute in rapid succession when (and if) the offending task finally completes."
    Ive tried using a homemade timer, with a Thread.sleep(), it is a bit better, but the problem is the same. 1 out of 20 incoming packets, is "ignored" by the server.
    I really hope any of you can help.
    I havent included any code, it would be to much code. But if you are interested in looking at something i can easily paste it.
    Thank you very much for your time :)
    Regards.

    Don't use a Timer, use DatagramSocket.setSoTimeout(). Then your receives will only block for that amount of time, throwing SocketTimeoutException if no datagram arrives.

  • Problem with SimepleDateFormat for the military pattern....

    i have the code, which has to display date in the military format i.e., "yyyyMMddhhmm".
    java.util.Date date = new SimpleDateFormat("yyyyMMddhhmm").parse("200709201700");
    System.out.println("Expected Date : " + date);
    but output displays everytime i.e., Thu Sep 20 17:00:00 IST 2007
    is there any problem with the pattern???

    By military format you mean 24 hour clock time, right? I believe "hh" in SimpleDateFormat is for 12 hour clock time and "HH" is for 2 digits of 24 hour clock time.
    EDIT: Also, you're just parsing the string into a Date object. When you're printing, it'll simply use the toString() for Date, giving you an output as you see. If you want the output also to be formatted in the same way, you need to use the format() method of SimpleDateFormat with the same pattern on the Date.
    People on the forum help others voluntarily, it's not their job.
    Help them help you.
    Learn how to ask questions first: http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch
    (Yes I know it's on JavaRanch but I think it applies everywhere)
    Edited by: nogoodatcoding on Oct 3, 2007 6:03 PM

  • Problem with date pattern

    Hi all,
    I have a little maddening problem with oracle.jbo.domain.Date.
    I have a viewObject with an attribute (fechaCompra) type Date and I need the time too so in controlHints I have defined:
    format type: Simple Date
    Format: yyyy-MM-dd 'at' hh:mm:ss
    Right, on runTime now i see ok the data and in the inputDate appears the calendar and the hour .
    But when I take the value of this attribute, to call a void that takes a oracle.jbo.domain.Date type, raises an error when parses the value of the atribute.
    All this doesn't happen when in the view object the controlHints are defined like this:
    format type: Simple Date
    Format: yyyy-MM-dd
    Any idea?
    Thanks in advance,
    Rowan

    hello,
    My guess would be that when you drop your formatted date into the methode the parse function is called from String to date, this work with no time attached.
    But fails with the time attached. I would double check the specific class you pass to each method to be sure they are correct.
    hat you mention parse gives an even bigger hint that you are using the parse function from oracle.jbo.domain.Date, which takes a string.
    This function will fail with your custom patterns.
    //get the value
    String value = .....
    //Not 100% sure if the at needs to be escaped or not
    DateFormat sdf = new SimpleDateFormat("yyyy-MM-dd at hh:mm:ss");
    //Prolly needs a try catch, writing this by hand
    java.util.Date utilDate = sdf.parse(value);
    java.sql.Date sqlDate = new java.sql.Date(utilDate.getTime());
    oracle.jbo.domain.Date jboDate = new oracle.jbo.domain.Date(sqlDate);
    //pass to your method-Anton

Maybe you are looking for

  • Open File from Filesystem with OutputLink

    I have implemented an UploadForm with JSF. With this form a File is uploaded to my filesystem and some data (link to filename, filename itself and so on) are written to the Database. No I display these data from the database in a datatable and I want

  • How to open adobe reader file in adobe pro xl?

    how to open adobe reader file in adobe pro xl?Downloading, Installing, Setting Up

  • PalmOne Tungsten E2

    Hi, I am new to this site.  I have a Tungsten E2 that I use strictly for planning, organizing and storing info/contacts.  I do not go online with it or sync it with my computer, nor do I really want to do so at this time.  I have very limited knowled

  • Bridge CS2 InDesign Contact Sheets

    I create Contact Sheets in InDesign through Bridge (CS2) for EPS files many times a day. To get the EPS files to import to the contact sheet I have to add the file type to the File Type Filter (under Files...) every time I create a contact sheet. Is

  • Apple Mail drops accounts regularly

    I have 3 different email accounts operating under Apple Mail (10.8.4). For some reason two of them get dropped every few minutes and the only way to fix this is to exit Mail and restart it again.. Gets very frustrating after a while.. Anybody got a s