Leading zeros problem with custom popup

I've implemented a custom popup page following the How-To docs on the topic. The value I'm return to the calling page in the passback function most often will have leading zeros. So from the custom popup I do a call like this: javascript:passback(00363644). When my value arrives back on the calling page it's converted to 124836 (haven't yet figured out what kind of conversion is happening there).
I realize this is not a javascript forum (and I've Googled for leading zeros in javascript to no avail - yet) but the HTML DB field type Popup LOV seems to accomplish this just fine so I was wondering how Oracle might be doing it. Anyone have any ideas?
Earl

Vikas,
See
http://tinypic.com/ibbfoy.jpg
So, just use
javascript:passback("00363644")and it should do what you want.You would think. But I've tried:
wrapping it in single quotes:
opener.document.getElementById('P6_CONTACT_ID').value = "'" + myVal + "'";
wrapping it in single quotes:
opener.document.getElementById('P6_CONTACT_ID').value = """ + myVal + """;
and the other 'trick' that I've seen mentioned several places, concatenating an empty string to the value:
opener.document.getElementById('P6_CONTACT_ID').value = "" + myVal;
All to no avail! This is really frustrating. Supposedly, any string concatenation action will 'force' the value to retain it's original 'string-ness'.
Working off this assumption and thinking that the conversion had already taken place by the time I assigned the value I backed up a step and assigned the value to a variable before trying to set the value, ala:
var myVal = p_Value.toString();
opener.document.getElementById('P6_CONTACT_ID').value = myVal;
and still no joy.
Following this logic one step further, do I need to get the value to a string in the original call. This will be a challenge because the link in the popup report is a is set to a URL with javascript call, like this: javascript:passback(#CONTACT_ID#);
Further, when I float over the links with the mouse I can see the URL in the status bar of the browser as javascript:passback(00363644); So, how do I go about wrapping this in quotes in the link?
Any help???
Earl

Similar Messages

  • Problem with custom paper size on dot matrix printer

    Hi All,
    I'm using CR2008 with updated to SP2. I have a problem with custom paper size (W=21; H=14), the CR Viewer show report with custom paper size correctly but when I print it to a dot matrix printer (Epson LQ 300+) the content was rotated to landscape. If print to a laser printer the content was printed correctly. My report was printed correctly by CR10 or previous versions I got this issue when upgraded to CR2008. I aslo tested my computer and printer with orther application like MS Word the printing have no problem with custom paper size.
    Thanks for any advice for me.
    Han

    Looking at the Epson LQ 300+ driver, I see that the latest update is from 2002. In my experience, most matrix printer drivers are not unicode. Crystal Reports is designed to only work with unicode printer drivers. See the [How Printer Driver Options Affect a Report|https://www.sdn.sap.com/irj/boc/index?rid=/library/uuid/a09051e9-721e-2b10-11b6-f9c65c64ef29&overridelayout=true] article, page 6 for details. Also, see [this|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_dev/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes.do] note.
    Finally, see if you can print from the CR designer to this printer and if you get the correct results here.
    Ludek

  • LOV with custom popup in af:query

    Hi,
    We have a use case where we need to display an LOV field in Search Panel (af:query). But, the LOV in Search Panel should be displayed with a custom popup.
    Is it possible display a field in Search Panel as input LOV with custom popup ?

    Hi,
    Is it possible display a field in Search Panel as input LOV with custom popup ?
    Yes. You assign a LOV definition to the attribute that then you display in the af:query component. You can also have dependnet LOV implemented this way. However, you cannot have a custom (your own) list of value popup dialog used
    See page 8 and following in http://www.oracle.com/technetwork/developer-tools/adf/learnmore/jan2011-otn-harvest-300940.pdf
    Frank
    Edited by: Frank Nimphius on Jun 29, 2011 11:36 AM

  • Want to hide/eliminate the leading Zeros in the Variable popup for0MATERIAL

    I have a requirement where 0MATERIAL is having leading zeros and it has the MATN1 conversion routine in the production system.I want to only remove the leading zeros in the Variable popup in report for 0 MATERIAL witohut changing the definition of the object as it has too much production data to change.
    Best Regards
    Tagore

    Hi,
    You will have to write some code in F4 help BADI, please refer the sap note 1416952. And you can take help of following function module to remove leading zeros,
    CONVERSION_EXIT_ALPHA_OUTPUT.
    If above thing doesn't help then you will have to create virtual key figure.
    Regards,
    Durgesh.

  • Problems with Custom Paper Size and Address Book

    I'm having some trouble printing from Address Book onto a custom paper size. I'm attempting to set up a notecard, and only print one at a time, rather than multiple columns as in the Labels option. The trouble is that when creating this small size, Address Book doesn't recognize it as anything other than a regular sheet of US Letter, and thus prints the address in the middle of the page.
    I have no problem printing envelopes, though, which seems odd because they too go in the manual feed for my printer. The notecards are similar width to the envelopes, but only about half the length.
    Has anyone else experienced problems with custom paper sizes printing improperly? I'm using an HP 4515 LaserJet, but have access to a few other laser printers. Thanks for any insight

    I have had the same problem, and with the same result; Adobe Tech Support can't help or fix, after 15 hours on phone, Level 2 support. It is a software bug Adobe has, and can't seem to fix.  I just upgraded to Lightroom CC, and my problem migrated with the upgrade.  I print in Photoshop fine.
    If you found an answer, I would appreciate  knowing how to do it!
    Thanks

  • Problems with custom buttons

    I have problems with custom buttons in Captivate 5. The button is not switching from the _up stage to _over stage, but when I click on it the _down stage works fine. It is not a problem with the naming of the buttons. They are all with the same name and in lower case. I have tried with various custom buttons and the problem is the same. There is no problems with the standard buttons from the Adobe Gallery, so it is a bit strange, also strange that it is only the _over stage that causes problems.
    The buttons I have made in Adobe Illustrator. Have tried both exporting in png and bmp format. It is the same problem.
    Hope someone has some idea as to what can be wrong.

    Hi Manish,
    I have uploaded the zip file with the button files to Acrobat and mailed you the link.
    Look forward to hear if you find a reason or more importantly a solution :-)
    Kind regards
    Rene

  • Problems with customizing select lists and popup LOVs

    Hi
    I have 2 problems about select lists and popup LOVs.
    The first one is about a select list in a tabular form.
    It should be created with APEX_ITEM.SELECT_LIST_FROM_LOV or similar and take its values from a named LOV.
    This worked fine but now it should also have the possibility to enter a free value.
    I tried to accomplish that by creating a APEX_ITEM.POPUP_FROM_LOV, but there is a problem with the function that is called by the arrow icon right to the input field (for eg. genList_f11_5()).
    If the row is added by addRow, then it works fine, but if the row is is not empty
    then the function call is like genList_f11_$_row() and the input field gets no value, when a LOV option is selected.
    The other problem is about a select list which should have the possibility to enter a custom value and
    also there should be the possibility to select several values. I tried to implement this by a text area containing the selected values and a multiple select list, with an event handler in each option. The user could click options and they would be copied to the text area. The problem is that I couldn't make the event handler work in IE.
    I would appreciate any ideas about either of these problems.
    Tiina

    Hi,
    If you download application you can see source.
    I have not write any instructions, sorry.
    If you are on Apex 4 you can just load jQuery UI autocomplete library and take ideas from my app.
    If you download my sample in zip there is uncompressed htmldbQuery library.
    You can see that and take only function htmldbAutocomplete.
    Then check jQuery UI document
    http://jqueryui.com/demos/autocomplete/#method-search
    There is method search that you can use open list just by click of input.
    I hope this helps at start.
    Regards,
    Jari

  • BAPI_PO_CHANGE document number leading zero problem

    Hi experts,
    The following code clears the "Delivery Complete" flag on a list of Purchase Orders uploaded from a CSV file.
    The PO number is 9 digits long, however, in EKPO table it is stored as 10 digits (prefixed with a zero). The BAPI does not recognise the document number unless it is prefixed with a zero in the CSV file (which adds extra work for the user to create custom format in Excel to add the leading zero).
    What code is required for the BAPI to recognise the 9 digit number without the leading zero?   Perhaps the leading zero could be hard-coded into the program?
    Any advice is much appreciated.  Thanks for your time.
    REPORT  Z_MASS_REMOVE_FDI_DCI_BAPI.
    *Check if file exists
    DATA: rc TYPE sy-ucomm.
    CALL FUNCTION 'WS_QUERY'
           EXPORTING
                query    = 'FE'  "File Exist?
                filename = 'X:\STO.TXT'
           IMPORTING
               return   = rc.
    IF rc EQ 0.
      WRITE: / 'File does not exist'.
    ENDIF.
    TYPES: BEGIN OF ty_tab,
            DOCNO(10),
            ITEM(4),
           END OF ty_tab.
    DATA : it_tab TYPE STANDARD TABLE OF ty_tab,
           wa_tab TYPE ty_tab.
    START-OF-SELECTION.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename = 'X:\STO.TXT'
    *     FILETYPE = 'ASC
          has_field_separator = 'X'
    *     HEADER_LENGTH = 0
    *     READ_BY_LINE = 'X'
    *     IMPORTING
    *     FILELENGTH =
    *     HEADER =
          TABLES
          data_tab = it_tab
          EXCEPTIONS
          file_open_error = 1
          file_read_error = 2
          no_batch = 3
          gui_refuse_filetransfer = 4
          invalid_type = 5
          no_authority = 6
          unknown_error = 7
          bad_data_format = 8
          header_not_allowed = 9
          separator_not_allowed = 10
          header_too_long = 11
          unknown_dp_error = 12
          access_denied = 13
          dp_out_of_memory = 14
          disk_full = 15
          dp_timeout = 16
          OTHERS = 17.
    END-OF-SELECTION.
    LOOP AT it_tab INTO wa_tab.
      WRITE:/ 'DOCUMENT: ',
      wa_tab-DOCNO,
      ' ITEM: ',
      wa_tab-ITEM.
      WRITE: / '-----------------------------------------------------------------------'.
      DATA: s_header TYPE bapimepoheader,
            s_headerx TYPE bapimepoheaderx,
            s_item TYPE bapimepoitem,
            s_itemx TYPE bapimepoitemx,
            i_return TYPE bapiret2 OCCURS 0 WITH HEADER LINE,
            i_extension TYPE bapiparex OCCURS 0 WITH HEADER LINE,
            s_bapimepoheader TYPE bapimepoheader,
            s_bapimepoheaderx TYPE bapimepoheaderx,
            s_bapimepoitem TYPE bapimepoitem occurs 0 with header line,
            s_bapimepoitemX TYPE bapimepoitemX occurs 0 with header line,
            wa_message TYPE c LENGTH 100.
      s_bapimepoheaderx-po_number = wa_tab-DOCNO.
      s_bapimepoheader-po_number = wa_tab-DOCNO.
      s_bapimepoitemx-PO_ITEM = wa_tab-ITEM.
      s_bapimepoitem-PO_ITEM = wa_tab-ITEM.
    *Remove Delivery Complete Indicator (DCI)
      s_bapimepoitemx-NO_MORE_GR = 'X'.
      s_bapimepoitem-NO_MORE_GR = ' '.
      append s_bapimepoitem.
      clear s_bapimepoitem.
      append s_bapimepoitemx.
      clear s_bapimepoitemx.
      CALL FUNCTION 'BAPI_PO_CHANGE'
        EXPORTING
          purchaseorder = wa_tab-DOCNO
        TABLES
          return        = i_return
          poitem        = s_bapimepoitem
          poitemx      =  s_bapimepoitemx.
    *Message types: S Success, E Error, W Warning, I Info, A Abort
    *Supress all Warning Messages
    DELETE i_return WHERE ( TYPE EQ 'W' ).
    *Commit only if no errors have been returned
      read table i_return with key type = 'E'.
      if sy-subrc ne 0.
        COMMIT WORK AND WAIT.
      endif.
    *Display Return Messages on Screen
      LOOP AT i_return.
        WRITE: /   'RETURN MESSAGE: ',
        'ID: ',
        i_return-id,
        ' TYPE: ',
        i_return-type,
        ' NUMBER: ',
        i_return-number,
        i_return-message.
      ENDLOOP.
      WRITE: / '-----------------------------------------------------------------------'.
      refresh : s_bapimepoitem,s_bapimepoitemx.
    ENDLOOP.

    hi,
    Use the conversion exit to make it as 10 digit char CONVERSION_EXIT_ALPHA_INPUT.

  • Problems with Custom File Info Panel and Dublin Core

    I'm creating a custom file info panel that uses the values of the dublin core description and keywords (subject) for two of it's own fields.  I'm having problems with the panel saving if they enter the description on the custom panel first, and with the keywords not echoing each other, or reappearing after a save.<br /><br />Here is the code for the panel<br /><br /><?xml version="1.0"><br /><!DOCTYPE panel SYSTEM "http://ns.adobe.com/custompanels/1.0"><br /><panel title="$$$/matthew/FBPanelName=Testing for Matthew" version="1" type="custom_panel"><br />     group(placement: place_column, spacing:gSpace, horizontal: align_fill, vertical: align_top)<br />     {<br />          group(placement: place_row, spacing: gSpace, horizontal: align_fill, vertical: align_top)<br />          {<br />               static_text(name: '$$$/matthew/keywords = Keywords', font: font_big_right, vertical: align_center);<br />               edit_text(fbname: '$$$/matthew/keywordsFB = Keywords', locked: false, height: 60, v_scroller: true, horizontal: align_fill, xmp_ns_prefix: 'dc', xmp_namespace: <br />'http://purl.org/dc/elements/1.1/', xmp_path: 'subject');<br />          }<br />          group(placement: place_row, spacing: gSpace, horizontal: align_fill, vertical: align_top)<br />          {<br />               static_text(name: '$$$/matthew/description = Description', font: font_big_right, vertical: align_center);<br />               edit_text(fbname: '$$$/matthew/descriptionFB = Description', locked: false, height: 60, v_scroller: true, horizontal: align_fill, xmp_ns_prefix: 'dc', xmp_namespace: <br />'http://purl.org/dc/elements/1.1/', xmp_path: 'description');<br />          }<br />          group(placement: place_row, spacing: gSpace, horizontal: align_fill, vertical: align_top)<br />          {<br />               static_text(name: '$$$/matthew/season = Season', font: font_big_right, vertical: align_center);<br />               popup(fbname: '$$$/matthew/seasonFB = Season', items: '$$$/matthew/Season/Items={};option 3{option 3};option 2{option 2};option 1{option 1}', xmp_namespace:'http://monkeys.com/demo/testingmatthew/namespace/', xmp_ns_prefix:'matthew', xmp_path:'season');<br />          }<br />          group(placement: place_row, spacing: gSpace, horizontal: align_fill, vertical: align_top)<br />          {<br />               static_text(name: '$$$/matthew/ltf = Limited Text Field', font: font_big_right, vertical: align_center);<br />               edit_text(fbname: '$$$/matthew/ltf = Limited Text Field', locked: false, horizontal: align_fill, xmp_namespace:'http://monkeys.com/demo/testingmatthew/namespace/ ', <br />xmp_ns_prefix:'matthew', xmp_path:'ltf');<br />          }<br />     }<br /></panel><br /><br />Thanks for the help

    To answer my own question:
    The documentation really sucks.
    I found this reply from Adobe <http://forums.adobe.com/message/2540890#2540890>
    usually we recommend to install custom panels into the "user" location at:
    WINDOWS XP: C:\Documents and Settings\username\Application Data\Adobe\XMP\Custom File Info Panels\2.0\panels\
    WINDOWS VISTA: C\Users\username\AppData\Roaming\Adobe\XMP\Custom File Info Panels\2.0\panels\
    MAC OS: /user/username/Application Data/Adobe/XMP/Custom File Info Panels/2.0/panels/
    The reason why your panels did not work properly was a missing Flash trust file for that user location. Without such a trust file the embedded flash player refuses to "play" your custom panel.
    Please see section "Trust files for custom panels" in the XMPFileInfo SDK Programmer's Guide on page 50 for all details on how to create such trust files.
    After many wasted hours I have now the simple panels running.
    Cheers,
    H.Sup

  • Problem with custom tag

    I have written a custom tag that I am having problems with. It works on some machines, but not on others. I have a page that uses many 'standard' tags. I have correctly set the URI etc, because all of my other tags work. However, on some machines, my custom tag gives me an error:
    attribute does not support request time values
    I'm assuming that I have the correct versions of standard.jar etc because all of the regular jstl 1.1 tags work. It is just my custom tag that throws an error.
    here is the .tld for my tag:
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
    <taglib>
         <tlib-version>1.1.2</tlib-version>
         <jsp-version>1.2</jsp-version>
         <short-name>My custom tag</short-name>
         <uri>http://my.custom/tags</uri>
         <tag>
              <name>breadcrumb</name>
              <tag-class>tag.BreadcrumbTag</tag-class>
              <body-content>JSP</body-content>
              <attribute>
                   <name>breadcrumbs</name>
                   <required>true</required>
                   <rtexprvalue>false</rtexprvalue>
                   <description>Pass in the list of Breadcrumbs containing the actual information
    about what tags need to be rendered on the page.</description>
              </attribute>
         </tag>
    </taglib>
    Any thoughts/help greatly appreciated...

    I encountered the same problem in our environment. I did the same thing as
              James. Simply re-initialize all variables in the do end tag.
              Also, with the nested tags you use you may also need to implement cloneable
              in the inner tag if the outer tag keeps references to all the inner tag
              instances.
              For instance if the outer tag kept a vector of references to the inner tag,
              then you would need to use clone() on the inner tag before adding it to the
              vector.
              "James Lynn" <[email protected]> wrote in message
              news:3af05d29$[email protected]..
              > > But
              > > with WL 6.0, the cell tag handler reuse the same instance each time the
              > cell tag
              > > is called and the member field is not reset
              >
              > I had the same problem. As a work around, I reinitialize everything in my
              > doEndTag() method and it works.
              >
              >
              > --
              > James Lynn - Lead Software Architect
              > Oakscape - Java Powered eBusiness Solutions <http://www.oakscape.com/>
              >
              >
              

  • Problems with Customer Service AND unexplained charges!

    I've been with Verizon for I-don't-know-how-many years, and through the years you are bound to have a few problems here and there but some of the problems are just ridiculous! It's also the same reocurring problem!!!!!!!!!!!!!!!! I was with Alltel first, before it was bought out by Verizon. The years I was with Alltel, I didn't have near as many problems. It seems EVERY time I do the smallest change or something to my phone or bill, I get a ridiculous amount of charges that I was NOT aware of, nor told about... EVEN IF I ask "So this isn't going to change my bill, or there will not be any unexpected/unexplained charges that I don't know about?"... BUT not matter how many times I ask... and NO matter how many times I am told "no"... there always is. For example.... last year, I updated and signed a new 2 year contract and purchased the first Driod. Before, my 30 day warranty was up, I was having problems with my Driod, and decided to send it in and get a new one. Before I did this.. I called customer service to make sure there would be no interuption in my bill, and there wouldn't be any unexpect charges, and there would be no difference in anything. I was told there was not, and once I recieved my new phone, just send it in and nothing would be changed. Of course, when I get my bill.. I see I was charged $500 for the new phone. It was explained to me that my credit card was reimbursed (which I never check that card, because I never used it expect to purchase the phone) and that I was recharged for the new phone, since it was a new phone. So I had to fork out the $500 (on top of my bill) and then wait months to get the $100 rebate card. Months after that, I "assumed liablity of my line" because I was on a plan with my family. I decided to have my own line, so I "assumed liability." I was not told that when I did that, I "renewed" my contract date. So I just added 6 more months to my 2 year contract. Was NOT told about that! Then again...... I was recently having problems with my Driod (the screen went black and would not come back on.) I had to turn on an OLD motorola razor, so I would not be without a phone for two days while I was waiting on my phone to come in. As soon as my phone came in, I had my Droid turned back on. I recieved my bill recently, and my bill was $200 over what it normally should be.... so I called in... apparently, when I had my phone replaced, they dropped off my data package and when I recieved my replacement driod, they never put it back on. So I was being charged for alllll my data usage... again I was NOT told about this. I wasn't even aware that they had dropped off my data package, and when/where did they get the authority to do that??? These are just a FEW of the problems that I have had.................................
    Does anyone have these reoccuring problems!?

    I understand that my bill can be viewed online, and I do view it fairly regularly, so if there are any unexplained charges, I can call Verizon asap. The problem does not come from me not understanding my bill, but from customer service. I have been with Verizon for a very long time, and it is a continuing problem. Where did Verizon get the 'OK' to drop my data package off my plan? Who authorized that?
    After calling Verizon and trying to find out the problem, the gentleman told me that when I activated on old phone while I was waiting on my new Droid to arrive, my data package was dropped off and I "should" have been told about that. When I reactiviated my new Droid, I "should" have called and had them restart my data package. I was not aware that when you activate an old phone that data plan is taken off your plan. In all my years of having cell phones, I never make two years with one phone. I have always, at one point, had to turn on an old phone, and my data package has NEVER changed. Why would I have my data package dropped and why would I have to call Verizon to have it restarted. I would never know to do that unless I was TOLD that my data packaged HAD to be re-added when I recieved my new phone, but I was never told of that.
    All of that is beside the point, the point is, Verizon was never given the authorization to change my plan. Never. My bill was taken care of and readjusted, and I am thankful for that. It does not change the fact it is always a hassle with Verizon Customer Service and I am always the one having to PROVE that I am not at fault, or that I was NEVER told of certian things. EVERY TIME I HAVE CALLED CUSTOMER SERVICE, I AM TOLD "I'M SORRY, THEY SHOULD HAVE TOLD YOU THAT."
    "they should" does not help my bill with the extra armount of charges.

  • Problem with custom form

    Hey All,
    Has anyone ever experience a problem with maximizing or resizing their custom form? I have a rather large form that every time I try to maximize or resize causes Business One to hang and crash.
    Any ideas what might be causing this?

    Hi Curtis,
    Thanks for posting the solution... will keep it in mind!
    Thanks,
    Adele

  • Problem with customer open items. Transaction FBL5N and F-30

    Hi all,
    I have a little problem with a customer.
    When I see transaction FBL5N, I can see 3 open items, but, when I go to clear then in F-30, no appears.
    Anybody can help me.
    Thanks in advance

    Hi all,
    I have solved the problem
    The problem was that exits a proposal where these open items were.
    I have  deleted this proposal, and then, I could create a post with clearing.
    Thanks everybody

  • Problem with custom control and focus

    I've a problem with the focus in a custom control that contains a TextField and some custom nodes.
    If i create a form with some of these custom controls i'm not able to navigate through these fields by using the TAB key.
    I've implemented a KeyEvent listener on the custom control and was able to grab the focus and forward it to the embedded TextField by calling requestFocus() on the TextField but the problem is that the TextField won't get rid of the focus anymore. Means if i press TAB the first embedded TextField will get the focus, after pressing TAB again the embedded TextField in the next custom control will get the focus AND the former focused TextField still got the focus!?
    So i'm not able to remove the focus from an embeded TextField.
    Any idea how to do this ?

    Here you go, it contains the control, skin and behavior of the custom control, the css file and a test file that shows the problem...
    control:
    import javafx.scene.control.Control;
    import javafx.scene.control.TextField;
    public class TestInput extends Control {
        private static final String DEFAULT_STYLE_CLASS = "test-input";
        private TextField           textField;
        private int                 id;
        public TestInput(final int ID) {
            super();
            id = ID;
            textField = new TextField();
            init();
        private void init() {
            getStyleClass().add(DEFAULT_STYLE_CLASS);
        public TextField getTextField() {
            return textField;
        @Override protected String getUserAgentStylesheet() {
                return getClass().getResource("testinput.css").toExternalForm();
        @Override public String toString() {
            return "TestInput" + id + ": " + super.toString();
    }skin:
    import com.sun.javafx.scene.control.skin.SkinBase;
    import javafx.beans.value.ChangeListener;
    import javafx.beans.value.ObservableValue;
    import javafx.event.EventHandler;
    import javafx.scene.control.TextField;
    import javafx.scene.input.KeyCode;
    import javafx.scene.input.KeyEvent;
    public class TestInputSkin extends SkinBase<TestInput, TestInputBehavior> {
        private TestInput control;
        private TextField textField;
        private boolean   initialized;
        public TestInputSkin(final TestInput CONTROL) {
            super(CONTROL, new TestInputBehavior(CONTROL));
            control     = CONTROL;
            textField   = control.getTextField();
            initialized = false;
            init();
        private void init() {
            initialized = true;
            paint();
        public final void paint() {
            if (!initialized) {
                init();
            getChildren().clear();
            getChildren().addAll(textField);
        @Override public final TestInput getSkinnable() {
            return control;
        @Override public final void dispose() {
            control = null;
    }behavior:
    import com.sun.javafx.scene.control.behavior.BehaviorBase;
    import javafx.beans.value.ChangeListener;
    import javafx.beans.value.ObservableValue;
    import javafx.event.EventHandler;
    import javafx.scene.input.KeyCode;
    import javafx.scene.input.KeyEvent;
    public class TestInputBehavior extends BehaviorBase<TestInput> {
        private TestInput control;
        public TestInputBehavior(final TestInput CONTROL) {
            super(CONTROL);
            control = CONTROL;
            control.getTextField().addEventFilter(KeyEvent.KEY_PRESSED, new EventHandler<KeyEvent>() {
                @Override public void handle(final KeyEvent EVENT) {
                    if (KeyEvent.KEY_PRESSED.equals(EVENT.getEventType())) {
                        keyPressed(EVENT);
            control.focusedProperty().addListener(new ChangeListener<Boolean>() {
                @Override public void changed(ObservableValue<? extends Boolean> ov, Boolean wasFocused, Boolean isFocused) {
                    if (isFocused) { isFocused(); } else { lostFocus(); }
        public void isFocused() {
            System.out.println(control.toString() + " got focus");
            control.getTextField().requestFocus();
        public void lostFocus() {
            System.out.println(control.toString() + " lost focus");
        public void keyPressed(KeyEvent EVENT) {
            if (KeyCode.TAB.equals(EVENT.getCode())) {
                control.getScene().getFocusOwner().requestFocus();
    }the css file:
    .test-input {
        -fx-skin: "TestInputSkin";
    }and finally the test app:
    import javafx.application.Application;
    import javafx.scene.Scene;
    import javafx.scene.control.TextField;
    import javafx.scene.layout.GridPane;
    import javafx.stage.Stage;
    public class Test extends Application {
        TestInput input1;
        TestInput input2;
        TestInput input3;
        TextField input4;
        TextField input5;
        TextField input6;
        Scene     scene;
        @Override public void start(final Stage STAGE) {
            setupStage(STAGE, setupScene());
        private Scene setupScene() {
            input1 = new TestInput(1);
            input2 = new TestInput(2);
            input3 = new TestInput(3);
            input4 = new TextField();
            input5 = new TextField();
            input6 = new TextField();
            GridPane pane = new GridPane();
            pane.add(input1, 1, 1);
            pane.add(input2, 1, 2);
            pane.add(input3, 1, 3);
            pane.add(input4, 2, 1);
            pane.add(input5, 2, 2);
            pane.add(input6, 2, 3);
            scene = new Scene(pane);
            return scene;
        private void setupStage(final Stage STAGE, final Scene SCENE) {
            STAGE.setTitle("Test");
            STAGE.setScene(SCENE);
            STAGE.show();
        public static void main(String[] args) {
            launch(args);
    The test app shows three custom controls on the left column and three standard textfields on the right column. If you press TAB you will see what i mean...

  • Printing Problem with custom size paper in Illustrator

    Hi having problems with my custom sized paper print using my canon printers it's the same on both the ip100 and the pro-100s,  it was printing fine until i've updated my illustrator and mac os Yosemite, it prints the image at a reduced size on the paper to what it should be does anyone have any understanding of this? I've tried everything i know, is this a driver or system problem?

    Hi there wasn't an option to set the default printer to pdf where would I do this?
    I've done a bit of a work around that seems to be working. I've put the page set up as A4 and then clicked on the printer utility custom settings and then unticked detect paper width, so I can put through the paper I want just got to tweak the x and y to get it right, its not the best but sitting here for four hours trying to figure it out, it will have to do for now. Thanks Jacob for your help, no doubt I'll be back in the morning, I'm burnt out now!

Maybe you are looking for

  • OSX Mountain Lion - Cannot change desktop image

    I used an image I'd downloaded as desktop wallpaper. I have tried to change it to the default image, other images, sold colours, but the same image always returns after I reboot (warm and cold boots). Note that I can change the desktop image, but it

  • Solaris 10 on an HP DL180 G6 server with P410 Raid Controller.

    This is an informational post to try and save people some of the pain that my colleague Joe and I have just gone through to get Solaris 10 installed! The DL180 G6 is an interesting box. It uses the latest Nehalem processors, and can support up to 12

  • Converting normal FM to RFC

    Hi All I am converting normal FM  to ZRFC. My normal FM- BBP_GET_UNITS_F4 has table parameters with table type. In RFC table type is not allowed and i changed the tables parameter into structure. Now inside my ZRFC, i am calling the normal FM. Here i

  • How to set poll rate in IA OPC sever v5.1

    Hi all, I m very new to labview(using LV7.0), using IA OPC server version 5.1. I have connected 3 slaves on serial communication bus having slave ID 1,4 n 8. So, what should be the value of poll rate, receive timeout and receive gap ?? How they are r

  • Adobe after effect cs4 crashes

    hey guys okay when i go onto adobe after effects and i go new composition it just makes a sound liek a windows sound then crashes, why is this happening is thier a soloution. thank you