WebView / HTMLEditor - caret position and selected content

Hey :)
Is it possible to get the caret position and the selected content in the HTMLEditor / WebView? How?
Thanks in advance.

Use JavaScript methods. For example:
http://stackoverflow.com/questions/9370197/caret-position-cross-browser
http://stackoverflow.com/questions/6129006/get-the-raw-html-of-selected-content-using-javascript
Use the Java\JavaScript bridge if you want the result in Java:
http://docs.oracle.com/javafx/2/webview/jfxpub-webview.htm

Similar Messages

  • JEditorPane: transforming between caret position in html and text/plain

    Hi all,
    I've done quite a bit of searching, and found problems similar to this one, but not this exactly, so I'll try asking it here.
    I have a JEditorPane with HTMLEditorKit, which I'm using for a WYSIWYG text editor. When the user wants to insert something, say an image, I get the caret position and insert a String into the document's underlying text.
    The problem is that if we are the WYSIWYG mode, the caret position isn't the same as the caret position in text/plaain mode.
    So if the underlying text is
    <html>
      <body>
         Some text
      </body>
    </html>the user will just see "Some text". If they place the caret between "Some" and "text", editorPane.getSelectionStart() will return '5'. But I want to insert my text at position '16' in the plain text.
    Is there a simple way to go back and forth between these two positions? Or to have getSelectionStart() to return the index relative to the text/plain mode?
    Thanks!
    Tim

    Very poor that no one answered this one.
    Did you still need the answer?
    I have 'a' answer. But not a complete one.
    In fact I only found this in search for an answer for my problem:
    http://forums.sun.com/thread.jspa?threadID=5409216&tstart=0
    Did you actually just test out what you knew so far to test what happens?
    If you were to use the HTMLEditorKit.insertHTML function, it just wants the visual caret position. So '5' would have been reasonably correct for you.
    I was doing something like this:
                   HTML.Tag tag = null;
                   Pattern p = Pattern.compile("\\s*\\<\\s*(\\w+).*", Pattern.MULTILINE|Pattern.DOTALL);
                   Matcher m = p.matcher(text);
                   if (m.matches())
                        tag = HTML.getTag(m.group(1));
                   kit.insertHTML(doc, offset,// +1
                                  text, 0,// 0
                                  0,// 0
                                  tag);
    Assuming you were inserting a tag, my code there checks what tag it is, and if that is known by the java implementation, assigns that to 'tag', so that the element is correctly inserted.
    If it is not known, we just use 'null'. Which for me wasn't such a great result.
    In fact, nothing really was a great result, as with the default java implementation being buggy (so far as I can see) it inserted to the wrong position and caused all sorts of anomalies.
    Hope you worked it out. And if you did, and have a better result than what I have, maybe you can let me know what you did!
    Sincerely,
    sean

  • How to read itemlistbox fully and its selected contents..

    Hi,
    When I read using the wizard it give only strucure values.
    But I want to catch both fully and selected contents when selected some items.
    Can any one help in this.
    Thanks
    Pons

    you can use <i>node->get_selected_elements( ).</i>
    Look at below thread: it will help you:
    Re: item selection between two lists
    Raja T

  • Text field highlight problem after caret position is set

    Hi,
    What I am trying to do is: set caret position and then highlight the text after it. The problem is: if I set caret position first, and highlight the rest of the text, the caret position is then set at the end of the entire text; if I highlight text first, and set caret position, then the text is not highlighted.
    I am wondering how I can achieve this. Thanks.
    The simple test program is below:
    import java.awt.FlowLayout;
    import javax.swing.JFrame;
    import javax.swing.JTextField;
    public class TestTextFieldHighlight {
         public static void main(String[] args) {
             JFrame f = new JFrame("Text Field Examples");
             f.getContentPane().setLayout(new FlowLayout());
             JTextField tf = new JTextField("SampleTextField", 20);
             tf.setEditable(true);
             f.getContentPane().add(tf);
             tf.setCaretPosition( 5 );
            tf.setSelectionStart( 6 );
            tf.setSelectionEnd( tf.getText().length() );
            //tf.setCaretPosition( 5 );
             f.pack();
             f.setVisible(true);
    }

          //tf.setCaretPosition( 5 );
          tf.setCaretPosition( tf.getDocument().getLength() );
          tf.moveCaretPosition(6);
          //tf.setSelectionStart( 6 );
          //tf.setSelectionEnd( tf.getText().length() );

  • I have just downloaded Photoshop CC 2014. However, I don't see these 2 new features: Content Aware Color Adaptation and Select Focus Area

    I have just updated to PS CC 2014. However, I don't see these 2 new features: Content Aware > Color Adaptation; and Select> Focus Area
    There're not there, not listed. What am I missing? Thanks.

    You will likely get better program help in a program forum Photoshop General Discussion
    The Cloud forum is not about using individual programs
    The Cloud forum is about the Cloud as a delivery & install process
    If you will start at the Forums Index https://forums.adobe.com/welcome
    You will be able to select a forum for the specific Adobe product(s) you use
    Click the "down arrow" symbol on the right (where it says All communities) to open the drop down list and scroll

  • How to listen and obtain caret positions of changed text in JTextPane?

    Hi,
    I have a JTextPane that displays text with some styles on particular words in the text. For example, I highlight words with red color if they are in my dictionary file. I use regular expression to find matches, replace them with their corresponded definitions, and call setCharacterAttributes to add styles to the definitions. I store all start and end caret positions of the matched words/definitions in a vector. So, I can redisplay styles of all previous matches.
    The problem is that I'd like to be able to edit the text of some previous matches. So, with those changes all caret positions that I already store in the vector need to be updated.
    How can I obtain caret positions of changed text in JTextPane?
    How can I know that a user is currently changing text in the JTextPane?
    How can I get style of text such as color that is being changed?
    Thank you very much.

    Thank you very much, camickr, for your reply.
    I think that I might not know the right way to handle JTextPane and Document object.
    What I have done are:
    - Add style to JTextPane using, for example,
    Style targetCurrentMatchStyle = this.targetWindowTextPane.addStyle("Red", null);
    StyleConstants.setForeground(targetCurrentMatchStyle, Color.red);//For highlight - Then, I use regular expression (Pattern and Matcher) to find a match in text. For each match, I get start and end position from matcher.start() and matcher.end().
    if(matcher.find(start)){
    String term=matcher.group();
    int start=matcher.start();
    int end = matcher.end();
    //find definition for the matched term.
    String definition=mydictionaryHash.get(term);
    //Store caret positions in lists
    startPositionList.add(start);
    matchedLength=lengthList.add(definition.length());
    //Add changed to text in textpane
    StringBuffer sb=new StringBuffer();
    matcher.appendReplacement(sb, definition);
    matcher.appendTail(sb);
    //Get translated text from StringBuffer after replacement
    String translatedText=sb.toString();
    targetWindoTextPane.setText(translatedText);
    //Update start position for next search
    start=start+definition.length();
    //Add style to matched regions below.
    }- From the lists of start positions and matched lengths, I use the following code to add "Red" color to the matched text regions including all previously matched.
    for(int i=0;i<startPositionList.size();i++){
    this.targetWindowTextPane.getStyledDocument().setCharacterAttributes(
    startPositionList.get(i),
    lengthList.get(i),
    this.targetWindowTextPane.getStyle("Red"),
    true);
    }My issue is that I'd like to be able edit previously matched regions and update all positions of the matched regions stored in the lists.

  • Is caret positioning in right-to-left oriented jtextpane corruptable?

    Dear all -
    Below is a serious problem. I hope I can get help from you experts out there; otherwise, I think it is a bug that should be reported to the JDK developers.
    I am writing an editor using my own keyboard layout to type in Arabic. To do so, I use jTextPane, and my own implementation of DocumentFilter (where I map English keys to Arabic letters). I start by i) setting the component orientation of jTextPane to be from RIGHT_TO_LEFT, and ii) attaching a caretListener to trace the caret's position.
    The problem (I think it is a bug just like what is recorded here: http://bugs.adobe.com/jira/browse/SDK-16315):
    Initially as I type text in Arabic, there is one-to-one correspondence between where I point my mouse and where the caret displays, basically, the same place. However, a problem occurs (and can always be re-produced) when I type a word towards the end of the line, follow it by a space character, and that space character causes the word to descend to the next line as a result of a wrap-around. Now, as I point my mouse to that first line again, the location where I click the mouse and the location where the caret flashes are no longer coincident! Also, the caret progression counter is reversed! That is, if there are 5 characters on Line 1, then whereas initially the caret starts from Position 0 on the right-hand side and increases as more text is added from right to left, it is now reversed where the the caret now increases from left to right for the first line, but correctly increases from right to left in the second line! yes funny stuff and very hard to describe to.
    So, here is an example. I wrote the code below (JDK1.6_u10, on Netbeans 6.5 RC2) to make it easy to reproduce the problem. In the example, I have replaced the keys A, S, D, F and G with their Arabic corresponding letters alif, seen, daal, faa and jeem. Now, type these letters inside the double quotes (without the double quotes) including the two spaces please and watch out for the output: "asdfg asdfg ". Up until you type the last g and before you type space, all is perfect, and you should notice that the caret position correctly moves from 0 upwards in the printlines I provided. When you type that last space, the second word descends as a result of the wrap-around, and hell breaks loose! Notice that whereas the mouse and caret position are coincident on the second line, there is no way to fine-control the mouse position on the first line any more. Further, whereas adding text on the second line is intuitive (i.e., you can insert more text wherever you point your mouse, which is also where the caret would show up), for the first line, if you point the mouse any place over the written string, the caret displays in a different place, the any added text is added in the wrong place! All this because the caret counter is now reversed, which should never occur. Any ideas or fixes?
    Thank you very much for reading.
    Mohsen
    package workshop.onframes;
    import java.awt.ComponentOrientation;
    import java.awt.Rectangle;
    import javax.swing.event.CaretEvent;
    import javax.swing.event.CaretListener;
    import javax.swing.text.BadLocationException;
    public class NewJFrame1 extends javax.swing.JFrame {
    public NewJFrame1() {
    initComponents();
    jTextPane1.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
    CaretListener caretListener = new CaretListener() {
    public void caretUpdate(CaretEvent e) {
    int dot = e.getDot();
    int mark = e.getMark();
    if (dot == mark) {
    try {
    Rectangle cc = jTextPane1.modelToView(dot);
    System.out.println("Caret text position: " + dot +
    ", view location (x, y): (" + cc.x + ", " + cc.y + ")");
    } catch (BadLocationException ble) {
    System.err.println("CTP: " + dot);
    } else if (dot < mark) {
    System.out.println("Selection from " + dot + " to " + mark);
    } else {
    System.out.println("Selection from " + mark + " to " + dot);
    jTextPane1.addCaretListener(caretListener);
    /** This method is called from within the constructor to
    * initialize the form.
    * WARNING: Do NOT modify this code. The content of this method is
    * always regenerated by the Form Editor.
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">
    private void initComponents() {
    jScrollPane3 = new javax.swing.JScrollPane();
    jTextPane1 = new javax.swing.JTextPane();
    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    jTextPane1.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
    jTextPane1.setAutoscrolls(false);
    jTextPane1.addKeyListener(new java.awt.event.KeyAdapter() {
    public void keyTyped(java.awt.event.KeyEvent evt) {
    jTextPane1KeyTyped(evt);
    jScrollPane3.setViewportView(jTextPane1);
    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(layout.createSequentialGroup()
    .addContainerGap()
    .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 159, Short.MAX_VALUE)
    .addContainerGap())
    layout.setVerticalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(layout.createSequentialGroup()
    .addContainerGap()
    .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    pack();
    }// </editor-fold>
    private void jTextPane1KeyTyped(java.awt.event.KeyEvent evt) {
    if (evt.getKeyChar() == 'a') {
    evt.setKeyChar('\u0627');
    } else if (evt.getKeyChar() == 's') {
    evt.setKeyChar('\u0633');
    } else if (evt.getKeyChar() == 'd') {
    evt.setKeyChar('\u062f');
    } else if (evt.getKeyChar() == 'f') {
    evt.setKeyChar('\u0641');
    } else if (evt.getKeyChar() == 'g') {
    evt.setKeyChar('\u062c');
    public
    static void main(String args[]) {
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    new NewJFrame1().setVisible(true);
    // Variables declaration - do not modify
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JTextPane jTextPane1;
    // End of variables declaration
    }

    Hi Mohsen,
    I looked at it and indeed, I see what you describe. Sorry, but I can't shed any light. I tried to figure out what software component, or combination of components, is the cause of the problem. I see several candidates:
    1) The JTextPane
    2) The Document
    3) RTL support
    4) BIDI support
    5) Interpretation (by any other software component) of the left and right arrow key
    6) The font
    To clarify number 6: I know virtually nothing of Arabic language (apart from it being written from right to left). I remember however that the actual representation of a letter is dependent of its position between other letters: front, middle and end. What I see to my astonishment is that it seems that the rendering is also aware of this phenomenon. When you insert an A between the S and D of ASDFG, the shape of the S changes. Quite magic.
    I tried to add a second textpane with the same Document, but a different size, to see what would happen with number one if one types text in number two and vice versa.
    In my first attempt, the font that you set on textpane one was gone after I set its document to number two. For me that is very strange. The font was set to the textpane, not to the document. The separation betweem Model and View seems not very clear in this case. So I now also set that font on the second textpane.
    I will post the changed code so that you may experiment some more and hopefully will find the problem.
    You might be interested in a thread on java dot net forums that discusses a memory leak for RTL [http://forums.java.net/jive/message.jspa?messageID=300344#300344]
    Piet
    import java.awt.ComponentOrientation;
    import java.awt.EventQueue;
    import java.awt.Font;
    import java.awt.Rectangle;
    import java.awt.event.KeyAdapter;
    import java.awt.event.KeyEvent;
    import javax.swing.GroupLayout;
    import javax.swing.JFrame;
    import javax.swing.JScrollPane;
    import javax.swing.JTextPane;
    import javax.swing.WindowConstants;
    import javax.swing.event.CaretEvent;
    import javax.swing.event.CaretListener;
    import javax.swing.text.BadLocationException;
    import javax.swing.text.Document;
    public class NewJFrame1 extends JFrame {
        private static final long serialVersionUID = 1L;
        public NewJFrame1() {
         initComponents();
         // jTextPane1.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
         this.applyComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
         CaretListener caretListener = new CaretListener() {
             public void caretUpdate(CaretEvent e) {
              int dot = e.getDot();
              int mark = e.getMark();
              if (dot == mark) {
                  try {
                   Rectangle cc = jTextPane1.modelToView(dot);
                   System.out.println("Caret text position: " + dot
                        + ", view location (x, y): (" + cc.x + ", "
                        + cc.y + ")");
                  } catch (BadLocationException ble) {
                   System.err.println("CTP: " + dot);
              } else if (dot < mark) {
                  System.out.println("Selection from " + dot + " to " + mark);
              } else {
                  System.out.println("Selection from " + mark + " to " + dot);
         jTextPane1.addCaretListener(caretListener);
        private KeyAdapter toArabic = new KeyAdapter() {
         public void keyTyped(KeyEvent evt) {
             jTextPane1KeyTyped(evt);
         * This method is called from within the constructor to initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is always
         * regenerated by the Form Editor.
        // @SuppressWarnings("unchecked")
        // <editor-fold defaultstate="collapsed" desc="Generated Code">
        private void initComponents() {
         jScrollPane3 = new JScrollPane();
         jTextPane1 = new JTextPane();
         setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
         jTextPane1.setFont(new Font("Tahoma", 0, 24)); // NOI18N
         jTextPane1.setAutoscrolls(false);
         jTextPane1.addKeyListener(toArabic);
         jScrollPane3.setViewportView(jTextPane1);
         GroupLayout layout = new GroupLayout(getContentPane());
         getContentPane().setLayout(layout);
         layout.setHorizontalGroup(layout.createParallelGroup(
              GroupLayout.Alignment.LEADING).addGroup(
              layout.createSequentialGroup().addContainerGap().addComponent(
                   jScrollPane3, GroupLayout.DEFAULT_SIZE, 159,
                   Short.MAX_VALUE).addContainerGap()));
         layout.setVerticalGroup(layout.createParallelGroup(
              GroupLayout.Alignment.LEADING).addGroup(
              layout.createSequentialGroup().addContainerGap().addComponent(
                   jScrollPane3, GroupLayout.PREFERRED_SIZE, 85,
                   GroupLayout.PREFERRED_SIZE).addContainerGap(
                   GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
         pack();
        }// </editor-fold>
        private void jTextPane1KeyTyped(KeyEvent evt) {
         if (evt.getKeyChar() == 'a') {
             evt.setKeyChar('\u0627');
         } else if (evt.getKeyChar() == 's') {
             evt.setKeyChar('\u0633');
         } else if (evt.getKeyChar() == 'd') {
             evt.setKeyChar('\u062f');
         } else if (evt.getKeyChar() == 'f') {
             evt.setKeyChar('\u0641');
         } else if (evt.getKeyChar() == 'g') {
             evt.setKeyChar('\u062c');
        public static void main(String args[]) {
         EventQueue.invokeLater(new Runnable() {
             public void run() {
              final NewJFrame1 frameOne = new NewJFrame1();
              frameOne.setLocationRelativeTo(null);
              frameOne.setVisible(true);
              EventQueue.invokeLater(new Runnable() {
                  public void run() {
                   Document doc = frameOne.jTextPane1.getDocument();
                   JTextPane textPane2 = new JTextPane();
                   textPane2.setFont(new Font("Tahoma", 0, 24)); // NOI18N
                   textPane2.setAutoscrolls(false);
                   textPane2.setDocument(doc);
                   textPane2.addKeyListener(frameOne.toArabic);
                   JFrame frameTwo = new JFrame();
                   frameTwo.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                   frameTwo.add(new JScrollPane(textPane2));
                   frameTwo.setSize(400, 300);
                   frameTwo.setLocationByPlatform(true);
                   frameTwo.setVisible(true);
                   frameTwo
                        .applyComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
        // Variables declaration - do not modify
        private JScrollPane jScrollPane3;
        private JTextPane jTextPane1;
        // End of variables declaration
    }

  • Problem with focus and selecting text in jtextfield

    I have problem with jtexfield. I know that solution will be very simple but I can't figure it out.
    This is simplified version of situation:
    I have a jframe, jtextfield and jbutton. User can put numbers (0-10000) separated with commas to textfield and save those numbers by pressing jbutton.
    When jbutton is pressed I have a validator which checks that jtextfield contains only numbers and commas. If validator sees that there are invalid characters, a messagebox is launched which tells to user whats wrong.
    Now comes the tricky part.
    When user presses ok from messagebox, jtextfield should select the character which validator said was invalid so that user can replace it by pressing a number or comma.
    I have the invalid character, but how can you get the focus to jtextfield and select only the character which was invalid?
    I tried requestFocus(), but it selected whole text in jtextfield and after that command I couldn't set selected text. I tried with commands setSelectionStart(int), setSelectionEnd(int) and select(int,int).
    Then I tried to use Caret and select text with that. It selected the character I wanted, but the focus wasn't really there because it didn't have keyFocus (or something like that).
    Is there a simple way of doing this?

    textField.requestFocusInWindow();
    textField.select(...);The above should work, although read the API on the select(...) method for the newer recommended approach on how to do selection.
    If you need further help then you need to create a "Short, Self Contained, Compilable and Executable, Example Program (SSCCE)",
    see http://homepage1.nifty.com/algafield/sscce.html,
    that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.
    Don't forget to use the "Code Formatting Tags",
    see http://forum.java.sun.com/help.jspa?sec=formatting,
    so the posted code retains its original formatting.

  • After aborted rebuild in Mail: I can see and select the message in the center pane and when I click on it to display, I get "Loading" text, but nothing comes up

    I have searched quite a bit to find a resolution to this problem, with no success. Any help would be appreciated.
    I decided to rebuild my inboxes by following this advice: http://support.apple.com/kb/PH11704. The rebuild took several hours and at 96% (4 minutes remaining apparently), the indexing froze (that is, after 8 hours, the message was still telling me "4 minutes left"). I forced quit mail, restored the previous Envelope files from the trash, and everything seemed fine.
    However, since this failed attempt, I can see and select the message in the center pane and when I click on it to display, I get "Loading" text, but nothing comes up. All messages in my various inboxes have the reloading problem, EXCEPT messages that I downloaded since the aborted rebuild (in other words, there are about 40 messages that I downloaded since I tried the rebuild and I have no problem with these). The other 70,000 messages however wont load, even though I can see them in the centre pane and spotlight has no problem finding them and showing me their contents (when I hover the mouse over the message). When I click on the message in spotlight, mail opens and the loading problem re-occurs.
    Since then, based on various suggestions I found for similar issues, I have used Disk Utility to verify and repair permissions and the drive. I used Onix to rebuild the Mail index (that only took about a minute - I am not sure how to interpret this when compared to the hours the rebuild took with Mail). No joy, I still have the same problem. I even restored one of my inboxes via Time Machine and the same issue with loading continues.
    I am using ML 10.8.2. I have a combination of IMAP accounts (work) and POP accounts (personal). The issue of loading occurs irrespective of the account.
    I am baffled and am now considering migrating to either Thunderbird or Postbox 3 to try and solve my problem. I prefer to stay with Mail. I should note also that I am using MailTags with Mail (http://www.indev.ca/MailTags.html), although I have not used any of the features. I upgraded to ML from SL about 2 weeks ago. It was very smooth and there appear to be no issues (not sure how helpful this is and probably not at all related to this issue).
    Any suggestions much appreciated!

    Maybe these will help:
    https://discussions.apple.com/message/17677533#17677533
    https://discussions.apple.com/message/18324129#18324129
    https://discussions.apple.com/message/18203126#18203126

  • Hi - HELP PLEASE - I have had a bad bug, now fixed, But Have Lost the Library in iTunes - how can I transfer the music and artwork content of my iPone back to iTunes so that I have a base library again

    Hello - can someone help me please - I am not really well versed in modern electronics
    So, as I mentioned in my heading which is rather long (sorry lol) I have had a bad computer virus, now fixed, which has lost me a lot of information. This includes the content of ,my iTunes Library and my ability to access it.
    So, can someone help me by telling me how I can gethte music currently in my iPhone back in to the Music Library in my new version of iTunes. Aslo hiow do I now get Album Artwork in to iTunes as well - iI recall that it was really easy when I set it up but this new version is causing me all sorts of heartache when I tried just now - hence my plea for help.
    I hope you can help and that I can hear fromoyuvery soon
    Thanks guys 
    Keith

    iDevices are not backup devices.
    Use the backup of the computer to put the content back on the computer.
    If not backup exists and the content was purchased via iTunes, connect the device and select File > Transfer purchases.  This will not restore playlists, playcounts or any other library specific data.
    If the media was not purchased via iTunes, search google for ways to extract it from the iPhone.
    Whatever you do, going forward make sure you back up your media and other important files regularly.

  • How to suppress blank page and selection criteria in SPOOL ?

    My Z program submits two programs to spool and converts the ABAP List in the spool to PDF and emails.
    After upgrade to ECC6, the first (a report painter report) resulting PDF there was one blank page and the contents were displayed on second page. For the second report (RKPEP003 - CJI3)  the selection criteria that the report used was printed as the first page of output and the result on a subsequent page. The same thing happens when I individually execute these two reports directly in SE38 with the same selection criteria. I believe the blank page is there in the spool because when I view the spool as a RAW, there is a P in the first column, however the spool shows that there is only one page in the first and two in the second (this is true - one for selection criteria "which I don't want" and then the actual content). In 46C, when I look at the RAW view of the spool there is no additional P's in the first column.
    I do not want to have the blank page on the first report and the selection criteria listed on the output of the report. How can I do that ? I am thinking get_print_parameters can in someway get me there, but I am not sure.
    Thanks
    Hari
    Edited by: Hari Sudarsanan on Apr 8, 2009 7:28 PM
    Edited by: Hari Sudarsanan on Apr 8, 2009 8:05 PM

    The first report painter program writes a regular ABAP list.
    The second outputs an ALV.

  • Can the position and szing of a control element in a View be controlled from the ViewModel?

    Is it possible to change the position of a control, say a label, as a response to some action/operation from the ViewModel?  Like if one response to something is true then place the label in the top left corner.  If false, place the label
    in the lower right corner.  I realize you could have a label in each position and just set the visibility.  But can the position and sizing of said label be controlled from the View Model?  What would be a sample coding of this?  would
    it be in the xaml or combination of a method in the ViewModel and the xaml? 
    Rich P

    First off Rich, say TextBlock to yourself ten times.
    Use a TextBlock rather than a label.
    There are a bunch of different ways to do this and the easiest is to have two controls whose text is bound to the one property.
    Bind the Visibility of each to another 2 properties in the viewmodel.
    Collapse one and Visible the other.
    The reason for that is that it's easier.
    Technically, you could put one textblock in a grid and use margin to control this.  You could animate x y co-ordinates and move the textblock mysteriously across the window if you put your mind to it.
    Or you could put it in a row/column "cell" of a grid and change which cell it goes in - but that would involve some mechanism like messaging from the viewmodel to the view and is not really ideal if you can avoid it.
    I'd have a pair of textblocks, here's one:
    <TextBlock Name="TopLeftMsg"
    Text="{Binding Msg}"
    Visiblity="{Binding TopLeftVis}"
    Both would bind to a public string property msg in the viewmodel.
    They each get their own public visibility property  and that'd be switched between Visibility.Visible and Visibility.Collapsed.
    Sizing of textblocks is best fitted to content because all you see is the text.
    Textboxes are arguably different because you can see the things.
    Hope that helps.
    Recent Technet articles:
    Property List Editing;  
    Dynamic XAML

  • Chart Error - scroller positions should be positive and integer

    <p>
    Hello Expert
    I have created a flash chart with two filters on the chart region.
    i) &lsquo;Select list with submit' ----- (:P23_TRC)
    ii) &lsquo;Radio button with submit' -----(:P23_IMPACTC)
    The chart should display as per the filters selection.
    However, I get the error message "<strong>scroller positions should be positive and integer</strong>", once, whenever I load this chart page for the 1st time in a new IE window.
    After I change the filter's value it will work perfectly fine.
    In filters default value is one value from respective filter list of value
    </p>
    <p>
    If I remove the filter conditions from chart query, it works perfectly without error.
    <u>Here are my chart series queries</u>
    select null link, V.LOB label, COUNT(TR) "Customer Care"
    from V_PROCESSTRACKING V
    Where V.ProcessArea like '%Customer Care%' and (V.TR = :P23_TRC) AND ((V.IMPACT = :P23_IMPACTC)OR (:P23_IMPACTC = 'ALL'))
    group by V.LOB
    order by V.LOB
    select null link, V.LOB label, COUNT(TR) "Sales"
    from V_PROCESSTRACKING V
    Where V.ProcessArea like '%Sales%' and (V.TR = :P23_TRC) AND ((V.IMPACT = :P23_IMPACTC)OR (:P23_IMPACTC = 'ALL'))
    group by V.LOB
    order by V.LOB
    <u>Customer XML</u>
    &lt;?xml version = "1.0" encoding="utf-8" standalone = "yes"?&gt;
    &lt;root&gt;
    &lt;type&gt;
    &lt;chart type="Stacked Horizontal 3DColumn"&gt;
    &lt;animation enabled="yes" appearance="size" speed="10" /&gt;
    &lt;hints auto_size="yes"&gt;
    &lt;text&gt;&lt;![CDATA[{NAME}, {VALUE}]]&gt;&lt;/text&gt;
    &lt;font type="Verdana" size="10" color="0x000000" /&gt;
    &lt;/hints&gt;
    &lt;names show="no"/&gt;
    &lt;values show="no" prefix="" postfix="" decimal_separator="." thousand_separator="," decimal_places="0" /&gt;
    &lt;arguments show="no" /&gt;
    &lt;column_chart column_space="3" block_space="12"&gt;
    &lt;border enabled="no" /&gt;
    &lt;block_names enabled="yes" placement="chart" position="left" &gt;
    &lt;font type="Verdana" size="10" color="0x000000" /&gt;
    &lt;/block_names&gt;
    &lt;/column_chart&gt;
    &lt;/chart&gt;
    &lt;workspace&gt;
    &lt;background enabled="yes" type="solid" color="0xffffff" alpha="0" /&gt;
    &lt;base_area enabled="no" /&gt;
    &lt;chart_area enabled="yes" x="215" y="50" width="705" height="500" deep="0"&gt;
    &lt;background enabled="no"/&gt;
    &lt;border enabled="yes" size="1"/&gt;
    &lt;/chart_area&gt;
    &lt;x_axis name="Line of Business" smart="yes" direction="horizontal" rotation="-90" position="left_center" &gt;
    &lt;font type="verdana_embed_tf" size="14" color="0x000099" bold="yes" align="center" /&gt;
    &lt;/x_axis&gt;
    &lt;y_axis name="No. of Process" smart="yes" position="center_bottom" &gt;
    &lt;font type="Verdana" size="14" color="0x000099" bold="yes" align="center" /&gt;
    &lt;/y_axis&gt;
    &lt;grid&gt;
    &lt;values /&gt;
    &lt;/grid&gt;
    &lt;/workspace&gt;
    &lt;legend enabled="yes" x="935" y="50"&gt;
    &lt;names enabled="yes"&gt;
    &lt;font type="Verdana" size="9" color="0x000000" bold="yes"/&gt;
    &lt;/names&gt;
    &lt;values enabled="no"/&gt;
    &lt;scroller enabled="no"/&gt;
    &lt;header enabled="no"/&gt;
    &lt;background alpha="0"/&gt;
    &lt;/legend&gt;
    &lt;/type&gt;
    #DATA#
    &lt;/root&gt;
    <strong>Help please!!!!! It's urgent</strong>
    Sagar
    </p>

    Hi Rima,
    I found the solution,
    My graph is dependent on the page items. What I found was when I load the page, item default value was displayed but it was not stored in the memory. Item value only gets stored in memory when the page is submitted.
    Line: -----
    Soultion : - Create a page level before header process and define the default value over here as well. This will resolve your error.
    Hopefully you understood what I am trying to explain. If not let me know and I will trying to put in picture and email you.
    Sagar

  • Mac OS 10.5 /  I deleted the " Private" folder ... and emptied the trash. So the folder and its contents no longer exists on my computer at all !!!  I do have the OS dvd that i purchased years ago...  But my computer will not start from it on its own. My

    Mac OS 10.5 /
    I deleted the " Private" folder ... and emptied the trash. So the folder and its contents no longer exists on my computer at all !!!
    I do have the OS 10.5 dvd that i purchased years ago...
    But my computer will not start from it on its own.
    My question is what is the open source or terminal language code used to tell my mac to look in the DVD rom drive for startup info?  I know that im not the only person in this world who has deleted the "PRIVATE" folder and emptied the trash so it no longer exists on their machine...
    That said theres gotta be a common fix for a Power PC G4 that has the OS X dvd in the rom drive but wont look to it to reinstall the vital contents of the PRIVATE folder.
    Once again there is not a copy of this file or its contents in the recycle bin...
    Also rebooting the machine , pressing and holding the letter C does not prompt the machine to look to the dvd rom drive.
    I was reinstalling pro tools and figured I would make some room by cleaning my computers HD...
    Lol It was a bad choice to delete this file ...
    Thanks guys

    Okay sorry it took forever to respond... But for a while there I gave up on this computer!!!!
    Money's been tight lately , so taking it in to a professional was not yet an option... though I did consider it eventhough.
    Anyway long story short im glad I didnt spend any money because I already had all the tools necessary to fix this issue but was going about it in the wrong way. Okay so here is my scenario and the breakdown... Though this may not fix the issue for everyone :( which *****... But I know we all will have different circumstances.
    Anyway here we go...
    Okay so first things first....  Years ago I purchased the OS 10.5.1 disk ... So that has always been in my possession!!!!
    I realize that some may not have a disk to reflash your OS to your hard drive... but if you do your in luck.
    2ndly ... I had an external harddrive with all of my itunes downloaded music so it was more than okay with me to delete my primary HD because all the important stuff could either be copied over or repathed to be located.
    -------If you dont want to read through the whole story the fix is summed up in the bottom section-------
    Okay so now the SOLUTION!!!!
    By trial and error , and pure boredom I opened up my computer to clean the inside...
    AND
    "Disconnected the primary HD"
    and just because ....... REBOOTED my computer. Just to see what it would do.
    Upon restart and though it looked like it would repeat its usual cycle...
    About 1 minute in to that process my computer froze for about 2 seconds and flashed to the OS installation screen.
    Mind you I havent seen this screen yet... Probably hasnt been since I installed the OS years ago.
    After a bit of trial and error...
    I decided to tell my computer to startup from the OS 10.5 disk located in my dvd rom drive and restarted once again...
    this setting is under
    Utilities / startup disk
    After a little more trial and error ... I realized that I could reconnect the primary HD , restart the machine and return to the OS installation menu.
    So upon this discovery
    I went to the Disk Utility located under Utilities
    Highlighted my primary HD located in the left hand column
    Once highlighted ...
    In the heading section on the right I selected the option
    Erase
    in which I erased My current OS on my primary HD ...
    I used the first option in the list under security... Because it seemed like the least invasive and would take the least amount of time to see if this process would actually work.
    I FORGOT to add something... 
    Another reason why I deleted my primary HD!!!!!
    I forgot to say that it WOULD NOT!!!!! Show up in the STARTUP list as an option...Even After multiple reboots....
    But like clockwork... Once I deleted its name IT SHOWED UP as an option!!!!
    So back to the next step...
    I returned to the STARTUP option under utilities ... And was then able to see MY primary HD now as a startup option...
    But ofcourse it had no name because it we previously erased it.
    So when Clicking my newly erased HD ... I was almost immediately prompted to REINSTALL the OS ...
    Which said it would take about 57 minutes ... But I believe was alot less...
    My issue was resolved ... My computer then stated the install was SUCCESSFUL!!!!!!! :))))))))))) lol ;)
    It was like I was setting up for the first time ;) asking for my registration info...
    The dilemma of deleting the private folder and emptying the trash is finally over resolved. Done ... and no extra money spent!!!!!!!!! 
    Its really crazy that the information for such a simple thing is not readily available. Especially being such a simple fix.
    I know im not the only person who's had this issue , because i've seen numerous posts with similar wording.
    I also know I wont be the last person to have this issue... So I hope this synopsis makes sense.
    -------One more time the fix------
    *Insert your OS dvd into your dvd rom drive.
    *Unplug your primary HD or corrupted startup disk
    *Reboot your machine...
    Upon restart your primary HD will not be recognized...
    * you will then be prompted to select your language.
    Once selected
    *Click Utilities/startup... Highlight the the selection that refers to the OS dvd located in the dvd rom drive.
    * Click restart...
    !!!!!!!!!!Be sure to reconnect your Primary HD Before your computer restarts and you hear the chime!!!!!!!!
    If you do not replug your HD before the chime it will not be recognized.
    In that case restart again.
    Upon restart once again
    *Choose your language...
    *Click Utilities / disk utility
    In the left column select and
    *Highlight your HD ...
    Then towards the top portion / center of the page
    *Click the heading Erase
    Then on the page toward the bottom
    *Click security options
    This will then provide erase options.
    I USED THE FIRST OPTION
    "Dont erase data"...
    *click OK
    * click erase...
    Once erased which should take a few seconds
    *Cancel the disk utility...
    * Click Utilities / startup
    And your newly erased HD should now appear in the list.
    * Select your drive from the list by highlighting
    It should no longer have a name.
    *Once selected, you will then be prompted to restart and install the OS to your newly erased HD...
    Thats it!!!!
    Once everything reinstalls re-add your personal info or registration info and you are up and running.
    Goodluck ;)

  • ITunes and Apple TV and purchased content

    I have a new 2nd gen Apple TV.  To test things out, I bought a couple of TV shows via the Apple TV.  Should I see those shows in iTunes on my computer?
    Conversely, if I have TV or Movie content on my computer that I bought via iTunes, should I see that on the atv under the Movies or TV Shows menus?  Right now, I see them only through home sharing and the Computers menu.
    If "yes" is the answer to either of those questions, I'd like to know how to make it happen.  Everything else seems to work fine, including home sharing.
    Thanks in advance!

    AppleTV1?
    This issue affects AppleTV1 users since end of October.
    Please send feedback.
    http://www.apple.com/feedback/appletv.html
    Simplest soution seems to be to buy a free TV episode on AppleTV itself which somehow updates authorisation.
    If it's a streaming only (My Shared library content on AppleTV) library simply go to AppleTV Computers, highlight the library and select and remove it.  Next add it back to itunes as a share/stream library (or top sync library if you don't have one) and again this should sort it out (did on mine).  If it's an existing sync library then removing/readding will work but will erase AppleTV content and require a complete resync.  Transfer AppleTV purchases first (right click on device in iTunes) just in case.
    AC

Maybe you are looking for

  • Page item not changing

    I have a page item (Actor) this is either billing system, user CSR or all. When I run the report in viewer with actor as a page item I can't change it from ALL. Any ideas?

  • Yosemite has left me with a white screen.  2011 model

    I haven't managed to get passed a white screen since installation.  Is there a fix for this? I'm worried.  Running on imac Intel 2011 model

  • NI Update Service Error

    Hi, I am having problem with installing updates using the Update Service. I was able to download all the updates, but I am having trouble installing them. I got the following error. The Update Service version is 2.3.0.70. I tried to run it as adminis

  • F.16 or GVTR

    Hi All, I have one big problem since 2 months with the balance carry forward but especially with F.16 transaction, and I don't know what can I do. I thought that I could execute the F.16 transaction, I had balance carry forward with GLTO with the led

  • Process Configuration

    I am working through the guide on JMF, but one of the examples is giving me problems. The lines of code are as follows: Processor processor = null; try     processor = Manager.createProcessor(ml); catch (IOException e)     System.exit(-1); catch (NoP