Styling text to underline on hover in flex 4

I'm sure there's an incredibly easy way to do this, but I've been searching for a while now and haven't turned it up.
What I want to to is have a bunch of label components throughout my application that will change their text style to underline on hover.
I sort of got it to work using a very clunky onMouseOver/onMouseOut implementation, but it tends to sometimes leave the text underlined after the mouse moves off the text.
Also, the event.target  that came back to the handler was unpredictable. Sometimes it was the label component, sometimes a textline object.
Ideally I'd prefer to do this via CSS. Any ideas welcome!

Got a similar problem in Flex SDK 3.5, didn't check in SDK 4 yet.
Changing underline via CSS is simple. In your CSS prepare something like
Label.clickable {
    textDecoration: underline;   
Label.nonclickable {
    textDecoration: none;
Label.clickableOver {
    textDecoration: underline;
    color: #333333;
and handle mouseOver and mouseOut events:
<mx:Label mouseOver="onMouseRoll(event)" mouseOut="onMouseRoll(event)" ... />
In a single method like below
            private function onMouseRoll(event:MouseEvent):void {
                if (event.type == MouseEvent.MOUSE_OVER) {
                    event.target.styleName = "clickableOver";
                } else {
                    event.target.styleName = "clickable";
or create 2 separate handlers for each event.
Whenever required set styleName to "nonclickable" to turn underline off. I do that when label should become inactive.
My problem is that underline sticks, even when styleName is forced on the label by all means.
Even FlexSpy shows underline="none" for the label, which is still underlined on the screen.
After couple hours of waisted time switched to direct control over textDecoration style for the label object, which works always.
If anyone has related experience or knows if that's a bug please share.
Thanks.

Similar Messages

  • Styling Text in Flex???

    Hey there,
    What is your recommended way of styling text?  And how would you store user-defined styles and apply them to different parts of text (like "header1", "highlighted", etc.)?  Would you have to go through and use a text editor, or have you found a simple solution where you can just say “styleName” or “id” = “myStyle”, and it would apply styles from either a TextLayoutFormat object, or from some CSS parsed into a TextLayoutFormat object. Right now I am manually parsing CSS into TLF objects, caching them in a Dictionary, looping through Elements with “getChildByID”, and for-loop-assigning the TLF properties to the element. Seems like there could be something easier.
    Thanks a lot,
    Lance

    TextFlow supports the styleName and id properties IFormatResolver interface for this purpose.  Take a look at this blog entry.
    http://blogs.adobe.com/tlf/2009/02/iformatresolver-and-using-css-1.html
    It's not up-to-date with API revisions but all the constructs are still there.
    The examples zip has a SImpleEditorWIthCSS example as well.  See:
    http://download.macromedia.com/pub/opensource/tlf/textlayout_examples_072409.zip
    Richard

  • Changing text to link with hover capability

    I have some text I have succesfully changed to become a link and would like to introduce the hover command to change colour; I would like to do this in the html page and have it alter the css sheet simultaneously. I would also like it to update every page in my site with this command.
    Many thanks for any help you can give me

    Add this code to your external CSS (stylesheet). Change colors, etc.. in the CSS properties panel.
    /**REGULAR LINKS**/
    a:link{/*unvisited*/
    color: #990000;
    text-decoration:none}
    a:visited{/*visited*/
    color: #9999FF;
    text-decoration:none}
    a:hover, a:focus {/*mouseover*/
    color: #990000;
    text-decoration:underline}
    a:active{/*selected*/
    color: #FFCC00;
    text-decoration: none}
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb

  • Spry Menu Text only displays in hover color, doesn't sense browser edge

    I have a Spry horizontal menu in a website that is working fairly well in everything except IE6.  Firefox, Safari, and IE7 are all fine.
    In IE6, random menu items only display in the blue hover color, so they are invisible until you hover over them.
    My second problem is that the menu is right-aligned, and the button on the far right has three submenus.  I would like the second two submenus to automatically open to the left of the first submenu when opening to the right would cause them to be cut off by the edge of the browser window.  How do I do this??
    Here is my code (I've customized it with suggestions online, but just can't seem to fix the problem with IE6).
    Thanks for any help, I'm really stuck!!
    @charset "UTF-8";
    /* SpryMenuBarHorizontal.css - version 0.6 - Spry Pre-Release 1.6.1 */
    /* Copyright (c) 2006. Adobe Systems Incorporated. All rights reserved. */
    LAYOUT INFORMATION: describes box model, positioning, z-order
    /* The outermost container of the Menu Bar, an auto width box with no margin or padding */
    ul.MenuBarHorizontal
    margin: 0;
    padding: 0;
    list-style-type: none;
    font-size: 9pt;
    cursor: default;
    font-family: Helvetica, Arial, sans-serif;
    /* Set the active Menu Bar with this class, currently setting z-index to accomodate IE rendering bug: http://therealcrisp.xs4all.nl/meuk/IE-zindexbug.html */
    ul.MenuBarActive
    z-index: 1000;
    /* Menu item containers, position children relative to this container and are a fixed width */
    ul.MenuBarHorizontal li
    margin: 0;
    padding: 0;
    list-style-type: none;
    font-size: 100%;
    position: relative;
    text-align: left;
    cursor: pointer;
    width: auto;
    float: left;
    height: auto;
    /* Submenus should appear below their parent (top: 0) with a higher z-index, but they are initially off the left side of the screen (-1000em) */
    ul.MenuBarHorizontal ul
    margin: 0;
    padding: 0;
    list-style-type: none;
    font-size: 100%;
    z-index: 1020;
    cursor: default;
    width: 8.2em;
    position: absolute;
    left: -1000em;
    /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to auto so it comes onto the screen below its parent menu item */
    ul.MenuBarHorizontal ul.MenuBarSubmenuVisible
    left: auto;
    /* Menu item containers are same fixed width as parent */
    ul.MenuBarHorizontal ul li
    width: 12em;
    /* Submenus should appear slightly overlapping to the right (95%) and up (-5%) */
    ul.MenuBarHorizontal ul ul
    position: absolute;
    margin: -5% 0 0 95%;
    /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to 0 so it comes onto the screen */
    ul.MenuBarHorizontal ul.MenuBarSubmenuVisible ul.MenuBarSubmenuVisible
    left: auto;
    top: 0;
    DESIGN INFORMATION: describes color scheme, borders, fonts
    /* Submenu containers have borders on all sides */
    /*ul.MenuBarHorizontal ul
    border: 1px solid #CCC;
    /* Menu items are a blue block with padding and no text decoration */
    ul.MenuBarHorizontal a
    display: block;
    cursor: pointer;
    background-color: #0000ff;
    color: #fff180;
    text-decoration: none;
    li.MenuBarHorizontal a
    display: block;
    cursor: pointer;
    background-color: #0000FF;
    color: #FFF180;
    text-decoration: none;
    padding-top: 5px;
    padding-bottom: 5px;
    padding-left: 5px;
    padding-right: 5px;
    /* Menu items that have mouse over or focus have a yellow background and blue text */
    ul.MenuBarHorizontal a:hover, ul.MenuBarHorizontal a:focus
    background-color: #fff180;
    color: #0000ff;
    /* Menu items that are open with submenus are set to MenuBarItemHover with a blue background and white text */
    ul.MenuBarHorizontal a.MenuBarItemHover, ul.MenuBarHorizontal a.MenuBarItemSubmenuHover, ul.MenuBarHorizontal a.MenuBarSubmenuVisible
    background-color: #fff180;
    color: #0000FF;
    SUBMENU INDICATION: styles if there is a submenu under a given menu item
    /* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal a.MenuBarItemSubmenu
    background-image: url(SpryMenuBarDown.gif);
    background-repeat: no-repeat;
    background-position: 95% 50%;
    /* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal ul a.MenuBarItemSubmenu
    background-image: url(SpryMenuBarRight.gif);
    background-repeat: no-repeat;
    background-position: 95% 50%;
    /* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal a.MenuBarItemSubmenuHover
    background-image: url(SpryMenuBarDownHover.gif);
    background-repeat: no-repeat;
    background-position: 95% 50%;
    /* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal ul a.MenuBarItemSubmenuHover
    background-image: url(SpryMenuBarRightHover.gif);
    background-repeat: no-repeat;
    background-position: 95% 50%;
    BROWSER HACKS: the hacks below should not be changed unless you are an expert
    /* HACK FOR IE: to make sure the sub menus show above form controls, we underlay each submenu with an iframe */
    ul.MenuBarHorizontal iframe
    position: absolute;
    z-index: 1010;
    filter:alpha(opacity:0.1);
    /* HACK FOR IE: to stabilize appearance of menu items; the slash in float is to keep IE 5.0 from parsing */
    @media screen, projection
    ul.MenuBarHorizontal li.MenuBarItemIE
    display: inline;
    f\loat: left;
    background: #FFF;
    @media screen {
    * html ul.MenuBarVertical ul {position: relative!important; float: left;
    margin: -10px -1000px -1000px 80px; display: inline;}
    * html ul.MenuBarVertical {position: static!important; }
    *:first-child+html ul.MenuBarVertical ul {position: relative!important;
    float: left; margin: -10px -1000px -1000px 80px;}
    *:first-child+html ul.MenuBarVertical {position: static!important; }

    If you want to see the website and menu in action, go to http://www.gwnetworks.com/playtri/index_new2.html
    Thanks again!

  • Please Help.JTable insert styled text

    Hi all java guru,
    on post http://forum.java.sun.com/thread.jsp?forum=57&thread=485469 i've depicted my scenario in which i have a JTable where i want to add styled text.
    i've implemented a CustomTableModel that maintains information about text style, in such way that when renderer cell, i can rebuild exact text with its style....same method is adopted for CellEditor.
    It is possible to have more than one JTable in my application....then to correctly handle all JTables ' put them in a vector and during editing and rendering i find current focusable/selected JTable and edit/render it.
    Clearly i maintain information about style of text when i insert it, that is when i insert text, i update my CustomTableModel...same thing must be done when i delete text from JTable...that is, i must update CustomTableModel too in this case.
    Because my CellEditor is a JEditorPane component (extend it) i've registered document associated to it to a DocumentListener that notify every time that a remove operation is happens.
    What is the problem now???problem is that when i finish to edit a cell and click on another cell i've got a removeUpdate(DocumenEvent e) event, and i can't distinguish it.....it seems a real remove event....
    In this case(when i change cell) the code that is executes returns wrong result and invalidate all the rest.
    I think error is where i register celleditor , now i do it in CustomCellRenderer class that extend JEditorPane and implements TableCellRenderer.
    Please help me...this is a great trouble that invalidate all my work :(
    Any new idea is welcome.
    regards,
    anti-shock

    Hi stanislav, of course i can...you're a myth :)
    public class CustomCellEditor extends AbstractCellEditor implements TableCellEditor {
           CellEditor cellArea;
         JTable table;
         public CustomCellEditor(JTable ta) {
              super();
              table = ta;
              // this component relies on having this renderer for the String class
              MultiLineCellRenderer renderer = new MultiLineCellRenderer();
              table.setDefaultRenderer(String.class,renderer);
         public Object getCellEditorValue() {
              return cellArea.getText();
         public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected,     int row, int column) {
              int start = 0;
              int end = 0;
                                               // Get current selected table
              TableEditor tb = (TableEditor) TableEditor.getSelectedTable();
              TableModel model = (TableModel) tb.getModel();
              Vector fontInfo = model.getFontFor(row,column);
              CellEditor cellArea = (CellEditor) ((CustomCellEditor)tb.getCellEditor (row,column)).getCellEditor();
              Document doc = cellArea.getDocument();
              String content = tb.getValueAt(row,column).toString();     
              if (doc!=null && fontInfo.size()>0 && !content.equals("")) {
                                                     // This method reads from model and get right style info
                                                     // for current text, and restore them
                                                     restoreFontWithAttributes(doc,fontInfo,content);
              else
                   cellArea.setText(tb.getValueAt(row,column).toString());
              cellArea.rowEditing = row;
              cellArea.columnEditing = column;
              cellArea.lastPreferredHeight = cellArea.getPreferredSize().height;
              return cellArea;
          * @return
         public CellEditor getCellEditor() {
              return cellArea;
         public class CellEditor extends JEditorPane {
              private CellStyledEditorKit k;
              public CellEditor() {
                    super("text/plain","");
                    k = new CellStyledEditorKit();
                    setEditorKit(k);
                    // I tried to add document here, but i have had wrong behavior
                   doc = new DocumentListener() {
                   public void removeUpdate(DocumentEvent e) {
                      // Get current selected table
                      TableEditor tb = (TableEditor) TableEditor.getSelectedTable();
                      TableModel model = (TableModel) tb.getModel();
                      model.updateFontInfo();
                   getDocument().addDocumentListener(doc);
    }Ok, stan...this is my CustomCellRenderer class....as i have already said, i have some style text info mainteined by CustomTableModel associated with JTable.
    I update CustomTableModel every time that an insert and remove operation happens.
    If i add a DocumentListener to CellEditor (that rapresents editor cell of my table) happens that, if i remove some character from an editing cell, i got a removeUpdate event.....and this is right!!! But if i change cell (e.g. supposing editing cell(1,1), click on cell(2,1) then stop edit cell(1,1) and start edit cell(2,1)) i got a removeUpdate event, that I don't wait for to me..
    Look at this:
    empty cell | some text
    cell 0 ------- cell1
    supposing you're in cell1 and you have finished to insert "some text".Then click on cell0, that is empty....then document associated with CellArea(extend JEditorPane) before of the click on cell0 had some text, but after click have no text, then for it a removeUpdate is happens.....and is that one i got..
    it's as if an unique document is associated to all cells, while should be one document for each cell (i hope this is right).
    Clearly, i've same code for renderer, in such way that i can restore style of text on rendering.
    Hope is clear....if U have any idea or suggestion please give to me.
    Tnx a lot Stanislav..
    regards,
    anti-shock

  • How can I copy and paste (styled) text in JTextPane/JEditorPane?

    I have a styled text in my editor and I use the copy and the paste action in JTextPane, but i am not able to paste again with previous text formatting(it inserts same text, but with logical attributes - formatting at caret/inserted/ position)
    I use RTFEditor kit.
    Is it possible to put information about styled text into clipboard and paste it back? Shall I simulate clipboard somehow?
    Please help
    Thanks for any suggestion
    Vity

    This [url http://forum.java.sun.com/thread.jsp?forum=57&thread=197091]thread contains a discussion on this topic with a few suggestions. I haven't tried them so I don't know how they work. I found the thread by searching the forum with the keywords "+copy +style +jtextpane".

  • How to show $ sign alongwith the value in message styled text field.

    Hi,
    How to show $ sign alongwith the value in message styled text field.
    The value is coming from the table column in VO.
    I am working on OAF R12.

    Hi,
    Resolved.
    I used the below code in CO for the solution.
    Formatter currencyFormatter = new OADecimalValidater("$#,##0.00;($#,##0.00)",
    "$#,##0.00;($#,##0.00)");
    OAMessageStyledTextBean msrpField = (OAMessageStyledTextBean)webBean.findChildRecursive("MSRP11");
    msrpField.setAttributeValue(ON_SUBMIT_VALIDATER_ATTR, currencyFormatter);

  • Styled Text in Table Cell

    Hi,
    I've got this problem: I'd like to insert a styled text in some cells of a JTable.
    The text should be composed of two kinds of Font, to emphasize some characters in it.
    Suppose I've done a class Test, that extends JPanel. In this class I've done a method appendChar(String c, boolean bol). With this method I can add a JLabel with only a single char (String of length 1) at a time. If bol is true, it emphasizes the char; if false, it uses the "default" font. For example:
    "this is an example"
    This class works fine, but I don't have any idea on how I could be able to insert a Test instance in a JTable cell.
    I think I should create a class that implements TableCellEditor, or extends DefaultCellEditor.. but I don't know how this should be done.
    If there is some other way to have some styled text in a table cell, tell me!

    Hi,
    AFAIK, the default renderer for a table cell is a JLabel in which you can display styled text using html. You would need to provide a custom editor only if the default textfield doesn't fulfil your needs. For rendering, you need to override the renderer.
    Cheers,
    vidyut

  • AWT only canvas - styled text, images, word wrap and url posting.. how???

    Wassup people!
    Ive created a java chat client which uses the JTextPane to post messeges, emoticons and styled text. But the main problem here is that the majority of web browsers only support awt. Telling the users to download the latest jre with swing is long and most would rather go to another site, so i have reprogrammed the whole client in awt apart from the textpane. I now face the problem of creating a canvas that supports styled text, images, word wrap and url posting.
    I am only a beginner in java and the initial client was quite easy to do using swing, but to program an efficient canvas that supports this has proved to be quite challenging. would anyone beable to show me the best way of doing this? or refer me onto a library that already supports this? or is there even an awt version of the JTextPane somewhere which would save alot of time? any help would be most appreciated.
    Thanks

    I've seen a few APIs that are 100% pure java in 1.1 that implement a styled text area. They aren't free though and I'm pretty sure someone made some money off of the fact that java 1.1 didn't implement a styled text area.
    I understand the problem you are having. Before the days of swing styled text was something you wished you had. Just so you know, there is no easy way of doing this. You could always paint it yourself with a canvas in a scroll pane but then you get to the point where, unless you did some serious mouse handling, highlighting text becomes very difficult.

  • Print dynamic styled text with a GUI

    I need to write styled text in a computer and to receive and view it in another.
    But I don't know how to get this styled text: is it possible to get an xml (or html) format of the content of a TextArea (or other text box) and on the other computer to parse the .xml (or .html) and print it in a graphics Area for example (I would also like the text to fit in the area shape but it's another story!)
    could you help me?

    Although I don't know how to use them, I believe the JTextPane class can help you out. There's another thread around here somewhere that is somewhat similar to this one. Check out the docs for it.
    Jason

  • What is the right stream for reading a styled text ?

    I'm trying to write a code for a text processing program..
    It has to have functions to save the document and reopen it...
    how ever I'm trying to find the right stream to deal with the styled text.
    I'll appretiate any help and would be greatful if some piece of code was attached as an example.

    There was a tutorial somewhere on how to write an rtf editor. It basiocally used a jeditorpane, filled it with rtf data and saved the files. RTF is plain text (7bit ascii), like html, but the code is harder to read and nearly impossible to edit manually.
    here is helloworld.rtf:{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss\fprq2\fcharset238 Arial;}{\f3\froman Times New Roman;}{\f4\fswiss\fprq2 Arial;}}
    {\colortbl\red0\green0\blue0;}
    \deflang2057\pard\plain\f4\fs20 Hello, World!\plain\f3\fs20
    \par }of course, all this is done in the background and all you have to see is the word-like document on screen.
    dave.

  • Styled Text in JClient

    Hi
    My clients needed browse and edit styled text (or RTF) and store content in database.
    Site java.sun.com presents many primers text editors with RTF, HTML, styled content.
    But as save this into database?
    Default binding JTextPane to ClobDomain store only text, without styles, images and others elements of the styled text :-(
    Please help!

    Hi,
    AFAIK, the default renderer for a table cell is a JLabel in which you can display styled text using html. You would need to provide a custom editor only if the default textfield doesn't fulfil your needs. For rendering, you need to override the renderer.
    Cheers,
    vidyut

  • TS3276 I'm getting squares on my emails where text and underlines should be? Any idea how to fix it?

    Yesterday I was sending out repeat emails to customers. It was the same content, I just click sent again and changed the email address and the customers name on the content page. After a while I was being rejected by my server and a que was formed in the outbox. On checking the emails they had squares but text or underlines.
    Any had this? Now I have it all the time when I return a reply to an email?
    Buddstar

        Let's get your phone back to work as intended pronto cowsbark! Please contact our prepaid customer service team at 888-294-6804.
    AntonioC_VZW
    Follow us on Twitter at www.twitter.com/VZWSupport

  • Strange behaviour when scaling GREP styled text.

    In the quest for the perfect scaling script I am running into another problem. I tried to scale my GREP styled text, and it came out like this:
    Notice the "$" and "cents" are too small - whereas it should look like this:
    Sorry I used a slightly larger image and different value, but I don't that is an issue with respect to this problem.
    So on the desktop, I decide to check preference>general tab> when scaling> "apply to content" was checked.
    I changed it to "adjust scaling percentage" and my $249.99 came out perfectly proportional to the original set text, (let pretend there is a 2 in front of the $49.99)
    So I upload the template to the server and proceed to scale it and I get this:
    In this example, the decimal has not scaled and thus allowing the "cents" to jam into the dolllar value. I am also unable to reproduce this error on the desktop.
    Can anyone explain what is happening or how to compensate for these errors? Thanks for your help! My script is below:
    function myTransform(myPage, myRectangle, myScaleMatrix)
         app.transformPreferences.whenScaling = WhenScalingOptions.APPLY_TO_CONTENT;
        var everything;
        var origin;
        if ( ssize > 1.0 )
           //origin = myPage.resolve(AnchorPoint.CENTER_ANCHOR,CoordinateSpaces.PASTEBOARD_COORDINATES)[0];
           origin = myPage.resolve(AnchorPoint.CENTER_ANCHOR,CoordinateSpaces.PASTEBOARD_COORDINATES);
            myPage.transform(CoordinateSpaces.PASTEBOARD_COORDINATES,origin,myScaleMatrix);
            everything = myRectangle.everyItem();
            //origin = myPage.resolve(AnchorPoint.CENTER_ANCHOR,CoordinateSpaces.PASTEBOARD_COORDINATES)[0];
            everything.transform(CoordinateSpaces.PASTEBOARD_COORDINATES,origin,myScaleMatrix);
        else
            everything = myRectangle.everyItem();
            origin = myPage.resolve(AnchorPoint.CENTER_ANCHOR,CoordinateSpaces.PASTEBOARD_COORDINATES)[0];
            everything.transform(CoordinateSpaces.PASTEBOARD_COORDINATES,origin,myScaleMatrix);
            myPage.transform(CoordinateSpaces.PASTEBOARD_COORDINATES,origin,myScaleMatrix);

    var myDocument = app.documents.item(0);
    var myPages = myDocument.pages;
    var myRectangle = myDocument.pages.item(0).pageItems;
    var ssize = 2;
    //Scale a page around its center point.
    var myScaleMatrix = app.transformationMatrices.add({horizontalScaleFactor:ssize,  verticalScaleFactor:ssize});
    var idx;
    for(idx = 0; idx < app.documents.item(0).pages.length; idx++)
        myTransform(myPages.item(idx), myDocument.pages.item(idx).pageItems, myScaleMatrix);
    // if you want to export a pdf, uncomment
    //myPDFExport ();
    function myTransform(myPage, myRectangle, myScaleMatrix)
         app.transformPreferences.whenScaling = WhenScalingOptions.APPLY_TO_CONTENT;
        var everything;
        var origin;
        if ( ssize > 1.0 )
           //origin = myPage.resolve(AnchorPoint.CENTER_ANCHOR,CoordinateSpaces.PASTEBOARD_COORDINATES)[0];
           origin = myPage.resolve(AnchorPoint.CENTER_ANCHOR,CoordinateSpaces.PASTEBOARD_COORDINATES);
            myPage.transform(CoordinateSpaces.PASTEBOARD_COORDINATES,origin,myScaleMatrix);
            everything = myRectangle.everyItem();
            //origin = myPage.resolve(AnchorPoint.CENTER_ANCHOR,CoordinateSpaces.PASTEBOARD_COORDINATES)[0];
            everything.transform(CoordinateSpaces.PASTEBOARD_COORDINATES,origin,myScaleMatrix);
        else
            everything = myRectangle.everyItem();
            origin = myPage.resolve(AnchorPoint.CENTER_ANCHOR,CoordinateSpaces.PASTEBOARD_COORDINATES)[0];
            everything.transform(CoordinateSpaces.PASTEBOARD_COORDINATES,origin,myScaleMatrix);
            myPage.transform(CoordinateSpaces.PASTEBOARD_COORDINATES,origin,myScaleMatrix);
    function myPDFExport()
            //Basic PDF output options.
            pageRange = PageRange.allPages;
            acrobatCompatibility = AcrobatCompatibility.acrobat8;
            exportGuidesAndGrids = false;
            exportLayers = false;
            exportNonPrintingObjects = false;
            exportReaderSpreads = false;
            generateThumbnails = false;
            try
                ignoreSpreadOverrides = false;
            catch(e) {}
            includeBookmarks = false;
            includeHyperlinks = false;
            includeICCProfiles = true;
            includeSlugWithPDF = true;
            includeStructure = false;
            interactiveElementsOption = InteractiveElementsOptions.doNotInclude;
            //Setting subsetFontsBelow to zero disallows font subsetting;
            //set subsetFontsBelow to some other value to use font subsetting.
            subsetFontsBelow = 0;
            //Bitmap compression/sampling/quality options.
            colorBitmapCompression = BitmapCompression.none;
            //colorBitmapQuality = CompressionQuality.eightBit;
            colorBitmapSampling = Sampling.none;
            //thresholdToCompressColor is not needed in this example.
            //colorBitmapSamplingDPI is not needed when colorBitmapSampling
            //is set to none.
            grayscaleBitmapCompression = BitmapCompression.none;
            //grayscaleBitmapQuality = CompressionQuality.eightBit;
            grayscaleBitmapSampling = Sampling.none;
            //thresholdToCompressGray is not needed in this example.
            //grayscaleBitmapSamplingDPI is not needed when grayscaleBitmapSampling
            //is set to none.
            monochromeBitmapCompression = BitmapCompression.none;
            monochromeBitmapSampling = Sampling.none;
            //thresholdToCompressMonochrome is not needed in this example.
            //monochromeBitmapSamplingDPI is not needed when
            //monochromeBitmapSampling is set to none.
            //Other compression options.
            compressionType = PDFCompressionType.compressNone;
            compressTextAndLineArt = true;
            cropImagesToFrames = true;
            optimizePDF = true;
            //Printers marks and prepress options.
            //Get the bleed amounts from the document's bleed.
    //~         bleedBottom = myDocument.documentPreferences.documentBleedBottomOffset;
    //~         bleedTop = myDocument.documentPreferences.documentBleedTopOffset;
    //~         bleedInside = myDocument.documentPreferences.documentBleedInsideOrLeftOffset;
    //~         bleedOutside = myDocument.documentPreferences.documentBleedOutsideOrRightOffset;
    //~         //If any bleed area is greater than zero, then export the bleed marks.
    //~         if(bleedBottom == 0 && bleedTop == 0 && bleedInside == 0 && bleedOutside == 0)
    //~         {
    //~             bleedMarks = true;
    //~         }
    //~         else
    //~        {
    //~             bleedMarks = false;
    //~        }
    //~        colorBars = false;
            colorTileSize = 128;
            grayTileSize = 128;
            cropMarks = false;
            omitBitmaps = false;
            omitEPS = false;
            omitPDF = false;
            pageInformationMarks = false;
            pdfColorSpace = PDFColorSpace.unchangedColorSpace;
            //Default mark type.
            pdfMarkType = 1147563124;
            printerMarkWeight = PDFMarkWeight.p125pt;
            registrationMarks = false;
            try
                simulateOverprint = false;
            catch(e) {}
            useDocumentBleedWithPDF = false;
            viewPDF = false;
        //Now export the document.
        var thisDocument = app.documents.item(app.documents.length-1);
        var fullname = app.scriptArgs.getValue("OutputFileName");
        var idx = fullname.indexOf("_");
        var shortname = fullname.substring(0, idx);
        //thisDocument.exportFile(ExportFormat.pdfType, app.scriptArgs.getValue("OutputFolder") + shortname + ".pdf");
        thisDocument.exportFile(ExportFormat.pdfType, "c:\boosttest.pdf");

  • Lov and Message Styled Text Problem in OAF R12

    Hi,
    I am trying to develop a UI page for capturing country information in OAF R12.
    I am facing an issue as described below:
    I am choosing the Country Name for a Lov and the Country Code should get populated automatically into the field as below
    Country Name Country Code Status Flag
    India (Lov) IN (populated from Lov) Active (msg choice)
    Add New Row --- Button Apply -- Button
    Now country Name : Message Lov
    Country Code : Message styled Text
    Now when I click on the Add New Row button, the value in the Country code field gets
    disappeared.If I click on Apply button, value does not get saved to the db.
    But if I make Country Code as : Message Text Input, then the value remains, whether I click on the Add New Row or the Apply button and value gets saved to db.
    Is there a workaround for this. Also I am working on OAF R12. Does this kind of thing occur even in OAF 11.5.10 ?
    Kindly help its very urgent.
    Thanks

    Hi,
    You have to take care of these things...
    1. Return the value from LOV to a form value on a page. Now attach a view instance and view attribute to this form value say VO1 and Attr1 respectively.
    2. Now attach the same VO instance and vo attribute to the Messagestyletext/messagetextinput u are using for the CODE.
    This will surely retain the values and will save to DB too.

Maybe you are looking for