Listiterator.. problem with browsable list

hello there!
i have a class Text which has variables:
Paragraph: a vector of Vectors each of whom represents a paragraph
Wordlists: each wordlist is a vector of Words representng a paragraph.
Now, i want that in every instance of the class the program will know the actual paragraph and word it is scanning, and so to provide with methods like goForward() or goBack() to move to the next word or the prev in the text.of course if a paragraph ends and there is another one i want the method to point to the 1st word of the new paragraph.
i used also a listiterator which was initialized to the 1st wordlist, that was the 1st paragraph. now, i tried to re-inizialize the listIterator (with a new listIterator() call) in the case goForward() had to go to the next paragraph, but it seems not to work. It is a pity because the listiterator, used as a class variable, was a good way to remember the actual word pointed (i used an int to remember the paragraph)..... But it doesn't work!
can you give me any suggestion please?
thanks a lot!!!

You could write your own ListIterator implementation that internally works on two ListIterators: one, that accesses the paragraph-vector, and another one, that represents the current wordlist-vector. Your own implementation would return the current element provided by the wordlist-iterator. If you reach the begin or end of a paragraph, you change the underlying wordlist iterator.
From outside, you always access the same ListIterator (namely an instance of your implementation).

Similar Messages

  • Having problem with reading list in safari

    i am having problem with reading list in safari some time it work sometimes gets hang....

    Might be a cache issue ...
    Open a Finder window. From the Finder menu bar click Go > Go to Folder
    Type or copy paste the following:
    ~/Library/Caches/com.apple.Safari/Cache.db
    Click Go then move the Cache.db file to the Trash.
    Quit and relaunch Safari to test.

  • Is there a way to fix ipod touch screen display problem with song list?

    I was wondering if anybody has had this problem? I have an ipod touch 64gig 5th gen for probably about 2 years. I hardly use it because I have it as a back up ipod until primary one dies. This is the first time I came across this problem. Upon turning on device, the first artist/song list I choose displays correctly. Once I start choosing any other artist/song list afterwards, the display for the 1st artist/song list re-appears. If the song list is only a single song to 3-4 songs it will display correctly. Any other song list I choose that consist more than 5 songs, the first artist/song list re-appears on screen like the display is messed up.
    For example: Upon turning on device, I choose Aaliyah with a list of 9 songs displaying.
    Upon trying to select a different artist and song, for example I choose Nachtmar with a  list of 20 songs.
    The Aaliyah with the list of 9 songs re appears in place of the song list I am attempting to choose. The songs play and it works, but the display is incorrect. Why is it doing this? Does anybody have this problem? I have tried resetting and it has currently been updated. I have came across this problem just very recently a couple of days ago. I have had a couple of hard resets requiring to erase all data in the past and I don't want to go that way again because I have about 3,500 songs. I have never experience this problem before in the past. I just want it to display the current list of songs. It's inconvenient having to type in every song while playing in the car instead of being able to easily pick an individual song.

    I have this problem too and it drives me crazy. When I view my ipod, I don't want to see a list of the first 8 songs in my ipod library. I just want to see the current song playing. It's like the ipod display goes into some type of "sleep" mode while your music plays,and the display defaults to show the first few songs in your ipod touch library, even though none of those songs are currently being played. I have to take the time to either flip the ipod over a couple of times in order for that list to disappear just to see the current song playing.
    This is an example of what I see on my display after the current song begins playing. These are the first songs in my ipod library. To get rid of this view, I have to either shake the ipod or flip it over a couple of times and the current song is now displayed, allowing you to see the current song, also allowing you access to the arrows to either fast forward or playback/reverse. On the display, the songs are in a grid or table format (unable to show that here).
    Acoustic Soul
    Aaliyah
    Adventers on the Wheels
    Adventures in Paradise
    After Tonight
    Will Downing

  • Simple problem with a list initialization.

    hello ! i have a class Contact and i would like to make a list of lists of Contact variables .. but when i try to run my code , it says "IndexOutOfBoundsException: Index: 0, Size: 0" . I know that every list of the list must be initialized .. but i don't know how .
    here is the declaration of the List
    static  List<List<Contact>> lolContact=new ArrayList<List<Contact>>();and i know that i should do something like :
    lolContact.get(0)=new ArrayList<Contact>();to initialize every list of the list but i don't know how . please help

    badescuga wrote:
    and i know that i should do something like :
    lolContact.get(0)=new ArrayList<Contact>();
    Couple of problems with that.
    1. You can never do methodCall() = something in Java. The result of a method call is not an L-value.
    2. You're trying to assign a ContactList to a Contact variable. Basically, you're trying to do
    Contact c = new ArrayList<Contact>();3. Even if you changed it to
    Contact c = lolContact.get(0);
    c = new Contact();it would not put anything into the list. That would just copy the first reference in the list and stick it into variable c, so that both c and the first list item point to the same object (remember, the list contains references, not objects--no object or data structure ever contains an object in Java), and then assigns a completely different reference to c, forgetting about the one to the object pointed to by the list. It would not affect the list in any way.
    4. You can't do get(0) until you've first put something into the list.

  • Problem with ALV list

    Hi friends,
                  I have created one program with alv list, but i am unable to add one header and footer, also i have to add one logo to the program. Plese some one tell me a easy procedure to add a header, footer and also a logo. If you can show me one with example that would be very helpful.
    This is my program, plz add the necessary parts.
    *& Report Y_BOM2_ALV
    REPORT y_bom2_alv LINE-SIZE 350 LINE-COUNT 350.
    *& Include YINCLUDE1
    TABLES : mast, stko, stpo.
    TYPE-POOLS : slis.
    DATA : BEGIN OF iall OCCURS 10,
    matnr LIKE mast-matnr,
    werks LIKE mast-werks,
    stlan LIKE mast-stlan,
    stlal LIKE mast-stlal,
    stlst LIKE stko-stlst,
    posnr LIKE stpo-posnr,
    idnrk LIKE stpo-idnrk,
    menge LIKE stpo-menge,
    meins LIKE stpo-meins,
    ausch LIKE stpo-ausch,
    lgort LIKE stpo-lgort,
    END OF iall.
    DATA : i_repid LIKE sy-repid,
    i_lines LIKE sy-tabix.
    DATA : int_fcat TYPE slis_t_fieldcat_alv.
    SELECTION-SCREEN BEGIN OF BLOCK a1 WITH FRAME TITLE title1.
    PARAMETER : p_werks LIKE mast-werks.
    SELECT-OPTIONS : s_matnr FOR mast-matnr.
    SELECTION-SCREEN END OF BLOCK a1.
    INITIALIZATION.
    title1(50) = ' Bill Of Material Input Screen '.
    *& Include YINCLUDE2
    START-OF-SELECTION.
    SELECT mastmatnr mastwerks maststlan maststlal stko~stlst
    stpoposnr stpoidnrk stpomenge stpomeins stpo~ausch
    stpo~lgort INTO TABLE iall FROM stpo INNER JOIN stko ON
    stpostlnr = stkostlnr INNER JOIN mast ON
    stpostlnr = maststlnr WHERE mast~werks EQ
    p_werks AND mast~matnr IN s_matnr.
    IF sy-subrc <> 0 OR p_werks EQ ' ' OR s_matnr EQ ' '.
    CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT'
    EXPORTING
    titel = 'ERROR MESSAGE ( INPUT ERROR / WRONG INPUT ) '
    textline1 = ' PLANT / MATERIAL Invalid or Empty '
    textline2 = ' Plese enter plant no / material no again '
    start_column = 20
    start_row = 5.
    EXIT.
    ENDIF.
    CLEAR i_lines.
    DESCRIBE TABLE iall LINES i_lines.
    IF i_lines LT 1.
    WRITE: /
    'No materials found.'.
    EXIT.
    ENDIF.
    END-OF-SELECTION.
    i_repid = sy-repid.
    *& Include YINCLUDE3
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
    i_program_name = i_repid
    i_internal_tabname = 'IALL'
    i_inclname = i_repid
    CHANGING
    ct_fieldcat = int_fcat
    EXCEPTIONS
    inconsistent_interface = 1
    program_error = 2
    OTHERS = 3.
    IF sy-subrc <> 0.
    WRITE: /
    'Returncode',
    sy-subrc,
    'from FUNCTION REUSE_ALV_FIELDCATALOG_MERGE'.
    ENDIF.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    i_callback_program = i_repid
    it_fieldcat = int_fcat
    i_save = 'A'
    TABLES
    t_outtab = iall
    EXCEPTIONS
    program_error = 1
    OTHERS = 2.
    IF sy-subrc <> 0.
    WRITE: /
    'Returncode',
    sy-subrc,
    'from FUNCTION REUSE_ALV_LIST_DISPLAY'.
    ENDIF.

    Hi Tapodipta,
    See below example and modify ur code according to ur requirement..
    REPORT  ZTEST_ALV_CHECK        .
    TYPE-POOLS: SLIS.
    DATA: X_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
          IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
          L_LAYOUT type slis_layout_alv,
          x_events type slis_alv_event,
          it_events type SLIS_T_EVENT.
    DATA: BEGIN OF ITAB OCCURS 0,
          VBELN LIKE VBAK-VBELN,
          POSNR LIKE VBAP-POSNR,
         END OF ITAB.
    SELECT VBELN
           POSNR
           FROM VBAP
           UP TO 20 ROWS
           INTO TABLE ITAB.
    X_FIELDCAT-FIELDNAME = 'VBELN'.
    X_FIELDCAT-SELTEXT_L = 'VBELN'.
    X_FIELDCAT-TABNAME = 'ITAB'.
    X_FIELDCAT-COL_POS = 1.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    X_FIELDCAT-FIELDNAME = 'POSNR'.
    X_FIELDCAT-SELTEXT_L = 'POSNR'.
    X_FIELDCAT-TABNAME = 'ITAB'.
    X_FIELDCAT-COL_POS = 2.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
      x_events-NAME = SLIS_EV_END_OF_PAGE.
      x_events-FORM = 'END_OF_PAGE'.
      APPEND x_events  TO iT_EVENTS.
      CLEAR x_events .
      x_events-NAME = SLIS_EV_TOP_OF_PAGE.
      x_events-FORM = 'TOP_OF_PAGE'.
      APPEND x_events  TO iT_EVENTS.
      CLEAR x_events .
      x_events-NAME = slis_ev_end_of_list.
      x_events-FORM = 'END_OF_LIST'.
      APPEND x_events  TO iT_EVENTS.
      CLEAR x_events .
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
      EXPORTING
        I_CALLBACK_PROGRAM       = SY-REPID
        IS_LAYOUT                = L_LAYOUT
        IT_FIELDCAT              = IT_FIELDCAT
        it_events                = it_events
      TABLES
        T_OUTTAB                 = ITAB
      EXCEPTIONS
        PROGRAM_ERROR            = 1
        OTHERS                   = 2.
    IF SY-SUBRC <> 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    FORM TOP_OF_PAGE.
    * BREAK-POINT.
      WRITE: / 'TOP_OF_PAGE'.
    ENDFORM.
    FORM END_OF_LIST.
    * BREAK-POINT.
    "here you can use this for footer
      WRITE: / 'FOR FOOTER'.
    ENDFORM.
    FORM END_OF_PAGE.
    * BREAK-POINT.
      WRITE: / 'END_OF_PAGE'.
    ENDFORM.
    Go through the link as well..
    Re: ALV  Footer
    Hope it will solve ur problem..
    <b>Reward points if useful..</b>
    Thanks & Regards
    ilesh 24x7

  • Problem with contact list in email w/ 3.0

    After upgrading to 3.0 I'm having a problem with the "To" in emails. I start typing in a name in the "To" field and it does not bring up matching entries in my contact list (it used to do so with the previous version SW).
    I have to try to send the email at which time an error message comes up. I have to cancel the send, delete the name in the "To" field and type the name in again. The second time it brings up the contact list and eveything works fine.
    Anyone else having this problem?

    Jackson_Bill wrote:
    What IDE are you using and what platform?Read first.
    Moh Bob wrote:
    I'm using J2ME platform SDK 3.0
    db

  • Problem with Linked List

    i have make a database with linked list for a School student counselor.
    The to be store is
    student name, ID, Counseling Date, Progress
    In there there will be record for a student and the Date and progress has to be stored for 4-weeks as the counseling is on weekly basis. These data items will be multivalued(what u say in Databases) how i can store this repetitive data in linked list for one student.

    By capsulating the data in objects and adding the objects to a linked list.

  • Problems with Smart List in Forms.

    Hi,
    I set Smart List in my Account Dimension.
    In HP Documentation (9.2 and 9.3.1) I read that is posible to allow or not allow a user using Smart List for a specific member of account through a form option.
    I already used this option in HP 9.2, but in 9.3.1 it do not exist this option in dataform, even so in 9.3.1 documentation says that it's posible.
    I wanna Know if someone have used this option in 9.3.1.
    I have been thinking in re install Planning or duplicate member that I need use sometimes with Smart List and sometimes writing a number.
    Any idea???
    Thanks

    tbian wrote:
    John,
    That is true, it states that there is an option to turn Smart List off and on for any data form. It does state within the admin guides but I don't see the option when I edit the data forms.
    Am I missing something?
    Best Regards,
    Tammy Bian CarlileI think the documentation is saying you can either have all the forms displaying smart lists or the other choice is not to have them, this is defined by using the evaluation order.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Problem with the List/Album List/Cover Flow/Grid view buttons

    Is anyone else having this problem?
    I have each playlist/media in different views. I have my music in List view, my podcasts, TV shows, and certain playlists in Album List view, and my movies and music videos in grid view. But now, any view that I select makes it the same for each playlist/media and I have to manually change it everytime I go to one of those lists. I figure this is a glitch with 10.5.3. Anyone else experiencing this?

    I'm also having that problem.
    It seemed to happen after iTunes 10.5 updates.
    I like my music in album list view and my apps in grid form.  However, now it's just one view for all lists.  Any fixes for this or is this a bug that needs to be ironed out by Apple?

  • RH8 for HTML: Problem with Multilevel List in published topic(s)

    I have discovered that working with the multilevel list and reapplying it (changing a level 2 to a level 1, for example) inserts numerous <span style margin> tags that don't show up in RH design view nor in an IE view of the published content, but the published help renders badly in Firefox (like a "justified" paragraph style that inserts broad spacing between words).
    The bad thing is that broad spacing is added to a command where no spaces should be, which looks fine in IE, but renders like this in Firefox:
    sqlplus XBRLDB/[email protected]:1521/ubmatrix
    @C:\xbrl_database\database\Oracle\       verify_registration        _v1_0        _1        .sql
    The "source" for published content looks like this:
    <p class="CodeSample" style="margin-left: 24px;">sqlplus XBRLDB/[email protected]:1521/ubmatrix
    @C:\xbrl_database\database\Oracle\<span style="margin-left: 40px;">verify_registration</span>
    <span style="margin-left: 40px;">_v1_0</span><span style="margin-left: 40px;">_1</span>
    <span style="margin-left: 40px;">.sql</span></p>
    How do I prevent the <span> tags from getting added to the RH project files? How do I remove them using the RH interface?
    Why are they getting added in such wierd places?
    PS: I have kept the paragraph style Numlist (which is how I define numbered procedures). I just apply the multilevel list to paragraphs tagged with this style. It's been working OK, except for the newly discovered problem above.
    I'm using Verdana family and the numbers look good. I've only looked at the published HTML which looks like this: I
    <p class="Numlist">1<span style='font:6.0pt "Times New Roman"'><font size="1" style="font-size:6pt;">        </font></span>Do this</p>
    looks like this in a broser view:
    1 Do this
    Is this the 'expected' HTML code for numbered procedures (all this to precede a paragraph with a number), or is there a more efficient way to render numbered/mutilevel lists?

    Hi there
    I just created a small video that may be helpful for this.
    Cheers... Rick
    Helpful and Handy Links
    RoboHelp Wish Form/Bug Reporting Form
    Begin learning RoboHelp HTML 7 or 8 within the day - $24.95!
    Adobe Certified RoboHelp HTML Training
    SorcerStone Blog
    RoboHelp eBooks

  • Problems with Student List Part 1

    i have tried a lot of things to make this program run, but it doesn't.. so guys, i really need your help.. the following codes are to be saved as: StudentList.java, Student.java, Person.java, MyListArray.java and MyList.java.. the program will run through compiling and running StudentList.java.. this program adds Student Lists.. the problem is that it does not delete and insert item lists after is has been displayed.. so guys, i hope you can help me with this one..thanks in advance
    * @(#)StudentList.java
    * @author
    * @version 1.00 2009/1/13
    import java.util.*;
    public class StudentList extends MyListArray
         public static void menu()
              String [] menu = {"...Student List...",
                                    "1. Create List",
                                    "2. Add Student",
                                    "3. Delete Student",
                                    "4. Insert Student",
                                    "5. Display Student",
                                    "6. Quit"};
              for(int i = 0; i < menu.length; i++)
                   System.out.println(menu);
         public static void main(String[] args)
              MyListArray list = null;
              Scanner con = new Scanner(System.in);
              String idno = null;
              String familyName = null;
              String givenName = null;
              String mi = null;
              String course = null;
              int option = 0;
              Student t = null;
              Student s = null;
              while(option != 6)
                   menu();
                   System.out.print("Select item from above: ");
                   option = con.nextInt();
                   switch(option)
                        case 1: System.out.println("Create List");
                                  System.out.print("Enter size: ");
                                       int size = con.nextInt();
                                       list = new MyListArray(size);
                                       break;
                        case 2: System.out.println("Add Student");
                                  System.out.print("ID Number: ");
                                       idno = con.next();
                                  System.out.print("Family Name: ");
                                       familyName = con.next();
                                  System.out.print("Given Name: ");
                                       givenName = con.next();
                                  System.out.print("Middle Intitial: ");
                                       mi = con.next();
                                  System.out.print("Course: ");
                                       course = con.next();
                                  list.addItem(new Student(idno,familyName, givenName, mi, course));
                                  break;
                        case 3: System.out.println("Delete Student");
                                  System.out.print("Enter ID Number: ");
                                       idno = con.next();
                                       s = new Student();
                                       s.setIdNo(idno);
                                       list.deleteItem(s);
                                       break;
                        case 4: System.out.println("Insert Student");
                                  System.out.print("ID Number: ");
                                       idno = con.next();
                                  System.out.print("Family Name: ");
                                       familyName = con.next();
                                  System.out.print("Given Name: ");
                                       givenName = con.next();
                                  System.out.print("Middle Intitial: ");
                                       mi = con.next();
                                  System.out.print("Course: ");
                                       course = con.next();
                                  s = new Student(idno, familyName, givenName, mi, course);
                                  System.out.print("Insert at ID Number: ");
                                       idno = con.next();
                                       t = new Student();
                                       t.setIdNo(idno);
                                       list.insertItem(t,s);
                                       break;
                        case 5: System.out.println("Student List");
                                  System.out.println("" + list);
    * @(#)Student.java
    * @author
    * @version 1.00 2009/1/13
    public class Student extends Person
              private String idno;
              private String course;
         public Student(String idno, String familyName, String givenName, String mi, String course)
              super(familyName, givenName, mi);
              this.idno = idno;
              this.course = course;
         public Student()
              super();
              this.idno = "___";
              this.course = "___";           
         public String toString()
              return idno + " " + getFamilyName() + " " + getGivenName() + " " + getMi() + " " + course;
    Edited by: jen_nard on Jan 23, 2009 4:33 AM
    Edited by: jen_nard on Jan 23, 2009 4:36 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    hi, i have added some methods in my program..but still, it does not work correctly..
    * @(#)StudentList.java
    * @author
    * @version 1.00 2009/1/13
    import java.util.*;
    public class StudentList extends MyListArray
         public static void menu()
              String [] menu = {"...Student List...",
                                    "1. Create List",
                                    "2. Add Student",
                                    "3. Delete Student",
                                    "4. Insert Student",
                                    "5. Display Student",
                                    "6. Quit"};
              for(int i = 0; i < menu.length; i++)
                   System.out.println(menu);
         public static void main(String[] args)
              MyListArray list = null;
              Scanner con = new Scanner(System.in);
              String idno = null;
              String familyName = null;
              String givenName = null;
              String mi = null;
              String course = null;
              int option = 0;
              Student t = null;
              Student s = null;
              while(option != 6)
                   menu();
                   System.out.print("Select item from above: ");
                   option = con.nextInt();
                   switch(option)
                        case 1: System.out.println("Create List");
                                  System.out.print("Enter size: ");
                                       int size = con.nextInt();
                                       list = new MyListArray(size);
                                       break;
                        case 2: System.out.println("Add Student");
                                  System.out.print("ID Number: ");
                                       idno = con.next();
                                  System.out.print("Family Name: ");
                                       familyName = con.next();
                                  System.out.print("Given Name: ");
                                       givenName = con.next();
                                  System.out.print("Middle Intitial: ");
                                       mi = con.next();
                                  System.out.print("Course: ");
                                       course = con.next();
                                  list.addItem(new Student(idno,familyName, givenName, mi, course));
                                  break;
                        case 3: System.out.println("Delete Student");
                                  System.out.print("Enter ID Number: ");
                                       idno = con.next();
                                       s = new Student();
                                       s.setIdNo(idno);
                                       list.deleteItem(s);
                                       break;
                        case 4: System.out.println("Insert Student");
                                  System.out.print("ID Number: ");
                                       idno = con.next();
                                  System.out.print("Family Name: ");
                                       familyName = con.next();
                                  System.out.print("Given Name: ");
                                       givenName = con.next();
                                  System.out.print("Middle Intitial: ");
                                       mi = con.next();
                                  System.out.print("Course: ");
                                       course = con.next();
                                  s = new Student(idno, familyName, givenName, mi, course);
                                  System.out.print("Insert at ID Number: ");
                                       idno = con.next();
                                       t = new Student();
                                       t.setIdNo(idno);
                                       list.insertItem(t,s);
                                       break;
                        case 5: System.out.println("Student List");
                                  System.out.println(" " + list);
    * @(#)Student.java
    * @author
    * @version 1.00 2009/1/13
    public class Student extends Person
              private String idno;
              private String course;
         public Student(String idno, String familyName, String givenName, String mi, String course)
              super(familyName, givenName, mi);
              this.idno = idno;
              this.course = course;
         public Student()
              super();
              this.idno = "___";
              this.course = "___";           
         //setters
         public void setIdNo(String idno)
                   this.idno = idno;
         public void setCourse(String course)
              this.course = course;
         //getters
         public String getIdNo()
              return idno;
         public String getCourse()
              return course;
         public boolean equals(Object obj)
              boolean okey = false;
              if(obj instanceof StudentList)
                   Student s = (Student)obj;
                   if(s.getIdNo().equals(idno))
                        okey = true;
              return okey;
         public String toString()
              return idno + " " + super.toString() + " " + course;

  • Problem with DropDown List and ValueChange

    Hi,
    I have the following problem (I use NetBeans 6.1): I have a page, made with the Visual Web Designer, where there is a DropDown List component. The expected behaviour is once I select an item from the dropdown list, something (depending on the item I clicked) appears or happens (so, without any submit button or action link).
    This is the code I have at the moment:
    JSP (Pagina1.jsp):
    <h:selectOneMenu binding="#{Pagina1.dataTypeDropDown}" id="dataTypeDropDown" immediate="true" onchange="return getSearchFields(this);" style="height: 24px; left: 192px; top: 24px; position: absolute; width: 744px" valueChangeListener="#{Pagina1.dataTypeDropDown_processValueChange}">
        <f:selectItems binding="#{Pagina1.dropdown1SelectItems}" id="dropdown1SelectItems" value="#{Pagina1.dropdown1DefaultItems}"/>
    </h:selectOneMenu>
    Bean (Pagina1.java):
    public void dataTypeDropDown_processValueChange(ValueChangeEvent vce)
        String selectedValue = (String)vce.getNewValue();
        System.out.println(selectedValue);    // nothing happens!
        System.out.println("Hello");    // nothing happens!
    [...]My problem is that, whenever I select an item form the dropdown list, ehm... nothing happens.
    What could I do? Isn't that a kind of "change of value"? JavaScript events work fine, but no way with the ValueChange.
    And please consider that I'd like to obtain the same result with both Standard Components and Woodstock Components.
    Any help would be greatly appreciated!
    Thanks!

    try adding "*this.form.submit();*" to your on change attribute of select menu.
    Your on change will look like onchange="return getSearchFields(this);this.form.submit();"
    This should work.

  • Problems with display-lists (Urgent)

    I would like to load 3d polygonal Objects into seperate display lists and deliver them to OGL, which works fine.
    But if I want to clean up my screen with the intention to load some new objects, I have the big problem deleting my old display lists.
    Maybe the problem is caused by other reasons. But finally my Canvas displays everytime the old 3d Object. Here are some essential snippets of my code:
    public class CanvasOGL extends JPanel implements GLEventListener {
    public final static int GL_POLYGON_MODE_LINE = 1;
    public final static int GL_POLYGON_MODE_FILL = 2;
    public final static int GL_POLYGON_MODE_POINT = 3;
    private int iGLPolygonMode = 2;
    private final GLCapabilities caps = new GLCapabilities();
    private final GLJPanel drawable = GLDrawableFactory.getFactory().createGLJPanel(caps);
    private GL gl;
    private GLU glu;
    private float fDistance = -3f;
    private float view_rotx = 0f;
    private float view_roty = 0f;
    private float view_rotz = 0f;
    private int prevMouseX;
    private int prevMouseY;
    private Color bgColor = new Color(255, 255, 255, 0);
    private Color fcolor = new Color(222, 222, 222, 0);
    private String imagePath = "";
    private PgGeometry[] pgGeometries;
    private int lists;
    public CanvasOGL() {
    caps.setAlphaBits(8);
    drawable.setOpaque(false);
    drawable.addGLEventListener(this);
    drawable.addMouseListener(this);
    drawable.addMouseMotionListener(this);
    drawable.addMouseWheelListener(this);
    setLayout(new BorderLayout());
    add(drawable, BorderLayout.CENTER);
    public void setPgGeometries(PgGeometry pgGeometries[]) {
    // delete old lists
    if (gl!=null)
    gl.glDeleteLists(lists,this.pgGeometries.length);
    // create new lists
    this.pgGeometries = pgGeometries;
    createLists();
    drawable.display();
    public void setPgGeometry(PgGeometry pgGeometry) {
    // delete old lists
    if (gl!=null)
    gl.glDeleteLists(lists,pgGeometries.length);
    // create new lists
    pgGeometries = new PgGeometry[1];
    pgGeometries[0] = pgGeometry;
    createLists();
    drawable.display();
    /* GLEventListener Methods */
    public void init(GLDrawable glDrawable) {
    System.out.println("call: init");
    gl = glDrawable.getGL();
    glu = glDrawable.getGLU();
    gl.glClearColor(bgColor.getRed() / 255f, bgColor.getGreen() / 255f, bgColor.getBlue() / 255f, bgColor.getAlpha() / 255f); //This Will Clear The Background Color To Black
    gl.glClearDepth(1.0);
    gl.glEnable(GL.GL_DEPTH_TEST);
    gl.glDepthFunc(GL.GL_LEQUAL);
    gl.glHint(GL.GL_PERSPECTIVE_CORRECTION_HINT, GL.GL_NICEST);
    /* Init Light1 */
    float[] LightAmbient = {0.8f, 0.8f, 0.8f, 1.0f};
    float[] LightDiffuse = {1.0f, 1.0f, 1.0f, 1.0f};
    float[] LightPosition = {2.0f, 0.0f, 2.0f, 1.0f};
    gl.glLightfv(GL.GL_LIGHT1, GL.GL_AMBIENT, LightAmbient); // Setup The Ambient Light
    gl.glLightfv(GL.GL_LIGHT1, GL.GL_DIFFUSE, LightDiffuse); // Setup The Diffuse Light
    gl.glLightfv(GL.GL_LIGHT1, GL.GL_POSITION, LightPosition);
    gl.glEnable(GL.GL_LIGHT1);
    gl.glEnable(GL.GL_LIGHTING);
    gl.glEnable(GL.GL_CULL_FACE);
    gl.glBindTexture(GL.GL_TEXTURE_2D, 1);
    gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MIN_FILTER, GL.GL_LINEAR);
    gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, GL.GL_LINEAR);
    gl.glEnable(GL.GL_TEXTURE_2D);
    gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE);
    createLists();
    public void display(GLDrawable glDrawable) {
    System.out.println("call: display");
    switch (iGLPolygonMode) {
    case GL_POLYGON_MODE_LINE:
    gl.glPolygonMode(GL.GL_FRONT_AND_BACK, GL.GL_LINE);
    break;
    case GL_POLYGON_MODE_FILL:
    gl.glPolygonMode(GL.GL_FRONT_AND_BACK, GL.GL_FILL);
    break;
    case GL_POLYGON_MODE_POINT:
    gl.glPolygonMode(GL.GL_FRONT_AND_BACK, GL.GL_POINT);
    gl.glClearColor(bgColor.getRed() / 255f, bgColor.getGreen() / 255f, bgColor.getBlue() / 255f, bgColor.getAlpha() / 255f);
    gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
    if (!imagePath.equals("")) {
    RenderedImage image = JAI.create("fileload", imagePath);
    BufferedImage img = ImageUtils.toBufferedImage(image);
    makeRGBTexture(img, GL.GL_TEXTURE_2D, false);
    gl.glLoadIdentity();
    // Position des Auges des Betrachters
    gl.glTranslatef(0, 0, fDistance);
    gl.glPushMatrix();
    gl.glRotatef(view_rotx, 1.0f, 0.0f, 0.0f);
    gl.glRotatef(view_roty, 0.0f, 1.0f, 0.0f);
    gl.glRotatef(view_rotz, 0.0f, 0.0f, 1.0f);
    gl.glColor4f(fcolor.getRed() / 255f, fcolor.getGreen() / 255f, fcolor.getBlue() / 255f, fcolor.getAlpha() / 255f);
    for(int i=lists; i<= pgGeometries.length; i++)
    gl.glCallList(i);
    private void createLists() {
    if (gl == null)
    return;
    System.out.println("call: create");
    int num = pgGeometries.length;
    lists = gl.glGenLists(num);
    for (int i = 0; i < num; i++) {
    PgElementSet pgElementSet = (PgElementSet) pgGeometries;
    PdVector[] bounds = pgElementSet.getBounds();
    PdVector pdVectorDiagonal = PdVector.subNew(bounds[1], bounds[0]);
    double dx = pdVectorDiagonal.getEntry(0);
    double dy = pdVectorDiagonal.getEntry(1);
    double dz = pdVectorDiagonal.getEntry(2);
    double temp;
    if (dx < dy)
    temp = dy;
    else
    temp = dx;
    if (temp < dz)
    temp = dz;
    double dScale = 1 / temp;
    double dMaxx,dMaxy,dMaxz,dMinx,dMiny,dMinz;
    dMaxx = pgElementSet.getVertex(0).getEntry(0);
    dMaxy = pgElementSet.getVertex(0).getEntry(1);
    dMaxz = pgElementSet.getVertex(0).getEntry(2);
    dMinx = pgElementSet.getVertex(0).getEntry(0);
    dMiny = pgElementSet.getVertex(0).getEntry(1);
    dMinz = pgElementSet.getVertex(0).getEntry(2);
    int numV = pgElementSet.getNumVertices();
    for (int j = 1; j < numV; j++) {
    if (dMaxx < pgElementSet.getVertex(i).getEntry(0))
    dMaxx = pgElementSet.getVertex(i).getEntry(0);
    if (dMaxy < pgElementSet.getVertex(i).getEntry(1))
    dMaxy = pgElementSet.getVertex(i).getEntry(1);
    if (dMaxz < pgElementSet.getVertex(i).getEntry(2))
    dMaxz = pgElementSet.getVertex(i).getEntry(2);
    if (dMinx > pgElementSet.getVertex(i).getEntry(0))
    dMinx = pgElementSet.getVertex(i).getEntry(0);
    if (dMiny > pgElementSet.getVertex(i).getEntry(1))
    dMiny = pgElementSet.getVertex(i).getEntry(1);
    if (dMinz > pgElementSet.getVertex(i).getEntry(2))
    dMinz = pgElementSet.getVertex(i).getEntry(2);
    double x;
    double y;
    double z;
    PdVector pdVector;
    gl.glNewList(lists+i, GL.GL_COMPILE);
    for (int j = 0; j < pgElementSet.getNumElements(); j++) {
    gl.glBegin(GL.GL_POLYGON);
    PiVector piVector = pgElementSet.getElement(j);
    for (int k = 0; k < piVector.getSize(); k++) {
    int index = piVector.getEntry(k);
    pdVector = pgElementSet.getVertex(index);
    x = dScale * (pdVector.getEntry(0) - (dMaxx + dMinx) / 2);
    y = dScale * (pdVector.getEntry(1) - (dMaxy + dMiny) / 2);
    z = dScale * (pdVector.getEntry(2) - (dMaxz + dMinz) / 2);
    gl.glTexCoord2d(0.5 + x, 0.5 + y);
    gl.glVertex3d(x, y, z);
    gl.glEnd();
    gl.glEndList();
    I would be pleased about every kind of help. Thanks a lot!
    Kindly regards,
    Eldar

    Use Windows Device Manager to set it back to F:
    These directions are for an ipod but will work for an exHD, too:
    http://support.apple.com/kb/TS1493
    Change the drive letter while itunes is closed. When you reopen itunes all the file paths should be OK.

  • Problem with customized "List of GR/IR Balances" Program

    Hi Guru,
    My company has developed a program which is adopted from Transaction MB5S: List of GR/IR Balances.  This new program has been developed to have one more field which is delivery date field on the filter page.  However, when users run this program by filtering delivery date.  The system takes too long to execute this program and runtime error page is displayed due to exceed the maximum runtime limit.
    Currenty, I avoid this problem by executing this program in background mode.  Therefore, users must use T-Code ST02 to view the report. 
    My question is the solution on this problem, therefore, user can execute this program normally in foreground mode without running in background and view report using ST02.  Anyone could suggest me on this case?   Point will be rewarded to you.
    Thank you,

    Hi,
    You may check if either of the following serves your purpose, though I don't think there is any query that would give you both IR/GR:
    0FIGL_M40_Q0001
    0CSAL_C01_Q0020
    0CSAL_C01_Q0021
    0IPM_MC02_Q0001
    0IPM_MC02_Q0002
    0SAL_DS01_Q0003
    0SAL_DS01_Q0002
    0SAL_C01_Q0009
    Rgds,
    Sonal

  • Problem with External List Management; Business Partner Type

    Hello experts;
    I created a mapping format for importing a simple notepad file. In the ELM i see all my fields populated correctly. Once i start the importing process it goes smoothly with no mistakes at all (green lights). The bp is actually imported and i can see it in the BP transaction with most of the fields correctly imported BUT the business partner type (PERS_PERS_BPKIND in ELM). For this field i have a Constant Assignment which is always HH and because of that i don't have it in my notepad file but i pass the value directly from ELM constant assignement=HH. Unfortunately this value is not copied. Any idea? Am i doing something wrong or i'm loosing some steps in between?
    Thank you very much

    Hello,
    the issue is most probably related to missing authorizations. As you know the processing in external list management happens in the background using WF-BATCH user.
    Please check the following notes:
    708557 - 'ELM: Troubleshooting' point 1.
    https://service.sap.com/sap/support/notes/708557
    1912414 - ELM upload: Error in the map data-step
    https://service.sap.com/sap/support/notes/1912414
    1664498 - External List will not execute
    https://service.sap.com/sap/support/notes/1664498
    The information provided in the notes should help to solve the issue.
    best regards,
    Johannes

Maybe you are looking for

  • Dual boot Win7 on external eSata drive with Precision M4700

    Because virtualization doesn't support some HW devices I need, I would like to dual boot Win7 Pro/64 on an external (removable) HDD connected to the eSATA port of my Precision M4700. eSata means optimal performances, but will the boot menu be happy w

  • Cannot install itunes. HELP!!

    I am attempting to install itunes 10.5 to my windows xp, while installing process takes place a message appears which reads; "There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Conta

  • Vandor crdit memo, subsequent debit memo and subsequent crdit memo

    Hi,   what is the difference between subsequent debit, credit and credit memo in MIRO transaction.    In case of vendor had given us credit note with relevant to particular for which we had already completed the invoice verification and payment also

  • Scheduling a backup by running a script through crontab

    hello i want to take a backup by rman everyday at a specified time..it's just that i want to create a script and schedule a backup through crontab, so how do i do that? thanks for the help in advance..

  • Runtime error  LOAD_TYPEPOOL_VERSION_MISMATCH

    hi i got this run time error for a stamdard transaction..can anyboby throw some light?           LOAD_TYPEPOOL_VERSION_MISMATCH           02.08.2007 21:23:11 ShrtText     Type group was changed at runtime. What happened?     Error in ABAP application