I need help with my hangman project

I'm working on a project where we are developing a text based version of the game hangman. For every project we add a new piece to the game. Well for my project i have to test for a loser and winner for the game and take away a piece of the game when the user guesses incorrectly. these are the instrcutions given by my professor:
This semester we will develop a text based version of the Game Hangman. In each project we will add a new a piece to the game. In project 4 you will declare the 'figure', 'disp', and 'soln' arrays to be attributes of the class P4. However do not create the space for the arrays until main (declaration and creation on separate lines). If the user enters an incorrect guess, remove a piece of the figure, starting with the right leg (looking at the figure on the screen, the backslash is the right leg) and following this order: the left leg (forward slash), the right arm (the dash or minus sign), the left arm (the dash or minus sign), the body (vertical bar), and finally the head (capital O).
Not only will you need to check for a winner, but now you will also check to see if all the parts of the figure have been removed, checking to see if the user has lost. If the user has lost, print an error message and end the program. You are required to complete the following operations using for loops:
intializing appropriate (possible) variables, testing to see if the user has guessed the correct solution, testing to see if the user has guessed a correct letter in the solution, and determining / removing the next appropriate part of the figure. All other parts of the program will work as before.
Declare figure, disp, and soln arrays as attributes of the class
Creation of the arrays will remain inside of main
Delete figure parts
Check for loss (all parts removed)
Implement for loops
Init of appropriate arrays
Test for winner
Test if guess is part of the solution
Removal of correct position from figure
Output must be
C:\jdk1.3.1\bin>java P3
|
|
O
-|-
Enter a letter: t
|
|
O
-|-
t _ _ t
Enter a letter: a
|
|
O
-|-
t _ _ t
Enter a letter: e
|
|
O
-|-
t e _ t
Enter a letter: l
|
|
O
-|-
t e _ t
Enter a letter: s
|
|
O
-|-
t e s t
YOU WIN!
C:\jdk1.3.1\bin>java P3
Pete Dobbins
Period 5, 7, & 8
|
|
O
-|-
Enter a letter: a
|
|
O
-|-
Enter a letter: b
|
|
O
-|-
Enter a letter: c
|
|
O
-|
Enter a letter: d
|
|
O
|
Enter a letter: e
|
|
O
|
_ e _ _
Enter a letter: f
|
|
O
_ e _ _
Enter a letter: g
|
|
_ e _ _
YOU LOSE!
Well i have worked on this and come up with this so far and am having great dificulty as to i am struggling with this class. the beginning is just what i was suppose to comment out. We are suppose to jave for loops for anything that can be put into a for loop also.
/* Anita Desai
Period 5
P4 description:
1.Declare figure, disp, and soln arrays as attributes of the class
2.Creation of the arrays will remain inside of main
3.Delete figure parts
4.Check for loss (all parts removed)
5.Implement for loops
A.Init of appropriate arrays
B.Test for winner
C.Test if guess is part of the solution
D.Removal of correct position from figure
//bringing the java Input / Output package
import java.io.*;
//declaring the program's class name
class P4
//declaring arrays as attributes of the class
public static char figure[];
public static char disp[];
public static char soln[];
// declaring the main method within the class P4
public static void main(String[] args)
//print out name and period
System.out.println("Anita Desai");
System.out.println("Period 5");
//creating the arrays
figure = new char[6];
soln = new char[4];
disp = new char[4];
figure[0] = 'O';
figure[1] = '-';
figure[2] = '|';
figure[3] = '-';
figure[4] = '<';
figure[5] = '>';
soln[0] = 't';
soln[1] = 'e';
soln[2] = 's';
soln[3] = 't';
//for loop for disp variables
int i;
for(i=0;i<4;i++)
disp='_';
//Using a while loop to control program flow
while(true)
//drawing the board again!
System.out.println("-----------");
System.out.println(" |");
System.out.println(" |");
System.out.println(" " + figure[0]);
System.out.println(" " + figure[1] + figure[2] + figure[3]);
System.out.println(" " + figure[4] + " " + figure[5]);
System.out.println("\n " + disp[0] + " " + disp[1] + " " + disp[2] + " " + disp[3]);
//getting input
System.out.print("Enter a letter: ");
//declaring a string variable
String data = " ";
// call the readString method
data = readString();
//retrieves the character at position zero
char temp;
temp=data.charAt(0);
int h;
for(h=0;h<4;h++)
if(temp==soln[h])
disp[h]=soln[h];
return;
if(disp[h]==soln[h])
System.out.println("You Win");
else
for(h=0;h<6;h++)
if(temp!=soln[h])
figure[h] = ' ';
return;
if(disp[h]!=soln[h])
System.out.println("You Lose");
///Test if statements to replace user input with soln if correct
int j;
for(j=0;j<4;j++)
if(temp==soln[j])
disp[j]=soln[j];
//declared the readString method, we specified that it would
//be returning a string
public static String readString()
//make connection to the command line
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
//declaring a string variable
String s = " ";
//try to do something that might cause an error
try
//reading in a line from the user
s = br.readLine();
catch(IOException ex)
//if the error occurs, we will handle it in a special way
//give back to the place that called us
//the string we read in
return s;
If anyone cann please help me i would greatly appreciate it. I have an exam coming up on wednesday also so i really need to understand this material and see where my mistakes are. If anyoone knows how to delete the parts of the hangman figure one by one each time user guessesincorrectly i would appreciate it greatly. Any other help in solving this program would be great help. thanks.

Hi thanks for responding. Well to answer some of your questions. The professors instructions are the first 2 paragraphs of my post up until the ende of the output which is You lose!. I have to have the same output as the professor stated which is testing for a winner and loser. Yes the program under the output is what i have written so far. This is the 3rd project and in each we add a little piece to the game. I have no errors when i run the program my problem is when it runs it just prints the hangman figure, disp and then asks user ot enter a letter. Well once i enter a letter it just prints that letter to the screen and the prgram ends.
As far as the removal of the parts. the solution is TEST. When the user enters a letter lets say Tthen the figure should display again with the disp and filled in solution with T. Then ask for a letter again till user has won and TEST has been guessed correctly. Well then we have to test for a loser. So lets the user enters a R, well then the right leg of the hangman figure should be blank indicating a D the other leg will be blank until the parts are removed and then You lose will be printed to the screen.
For the program i am suppose to use a FOR LOOPto test for a winner, to remove the parts one at a time, and to see if the parts have been removed if the user guesses incorrectly.
so as u can see in what i have come up with so far i have done this to test for a winner and loser:
//declaring a string variable
String data = " ";
// call the readString method
data = readString();
//retrieves the character at position zero
char temp;
temp=data.charAt(0);
int h;
for(h=0;h<4;h++)
if(temp==soln[h])
disp[h]=soln[h];
return;
if(disp[h]==soln[h])
System.out.println("You Win");
else
for(h=0;h<6;h++)
if(temp!=soln[h])
figure[h] = ' ';
return;
if(disp[h]!=soln[h])
System.out.println("You Lose");
Obviously i have not writtern the for loops to do what is been asked to have the proper output. the first for loop i am trying to say if the user input is equal to the soln thencontinue till all 4 disp are guessed correctly and if all the disp=soln then the scrren prints you win.
then for the incorrect guesses i figured if the user input does not equal the soln then to leave a blank for the right leg and so on so i have a blank space for the figure as stated
:for(h=0;h<6;h++)
if(temp!=soln[h])
figure[h] = ' ';
well this doesnt work and im not getting the output i wanted and am very confused about what to do. I tried reading my book and have been trying to figure this out all night but i am unable to. I'm going to try for another hr then head to bed lol its 4am. thanks for your help. Sorry about posting in two different message boards. I wont' do it again. thanks again, anita

Similar Messages

  • Need help with lost iMovie project.

    I was creating an iMovie project for school and needed to save it on a USB, so I clicked on 'Export Movie' from the 'Share' options menu in iMovie. I chose the type I wanted it saved in (viewing for computers) and then a smaller screen in iMovie popped up saying it was exporting the movie, or something like that. It took about a good 30 minutes and my project was a 7 minute movie with film clips, music, transitions, ect. I exported this project to my USB but when it finished it wasn't on there and when I finally found it on the Mac somewhere, I went to drag it into my USB but it said it was full. I then dragged the project onto my desktop and tried to open it to see if it worked. When I did the iMovie icon jumped once and stopped. I clicked on iMovie and it was still there in the projects screen. I then decided to close iMovie and open the project again from my desktop to see if it would play like a normal movie but once I clicked it the iMovie icon jumped again, opened but my project that I was trying to open was not there anymore and wouldn't open from my desktop file. I cannot open it at all and view it, it has been lost from my iMovie. Is there a way that I can get it back? Really need some help with this.

    What version of iMovie are you using?
    Matt

  • Need help with saving my project

    When I try to export and save my project, iMovie answers that I need more storage space to go on and that I need to end and restart the program. What can I do to save my project? There is lots of work in it. Thank you.

    If iMovie is only preventing you from sharing/exporting your movie, your project itself should still be OK.
    If you have everything on your internal drive it is probably getting too full (you can check with finder).   You need to free up some space or get an external hard drive.  An external drive is almost essential if you are going to do a lot of video work since file are so large.
    Geoff.

  • Need help with a class project

    I'm new to Java and I'm having problems converting a small program to be more functional. Here is my original codeimport java.util.Arrays;
    public class Product
    // initialize arrays
       private int cdNums[] = { 0,0,0,0 };
       private String cdNames[] = { "null", "null", "null", "null" };
       private int cdUnits[] = { 0,0,0,0 };
       private double cdValue[] = { 0.0, 0.0, 0.0, 0.0 };
       private double inventoryValue[] = { 0.0, 0.0, 0.0, 0.0 };
    // initialize instance variable
       private double totalValue = 0;
       private int count;
       public Product( int invNumber[], String albumName[], int invUnits[], double invValue[] )
             cdNums = invNumber;  // store inventory number
             cdNames = albumName;  //store album name
             cdUnits = invUnits;  //store number of units
             cdValue = invValue; // store unit price
       public double calcInventoryValue()
             // calculate Inventory value
                for ( int count = 0; count < cdNums.length; count++ )
                       totalValue =0; // initialize totalValue
                       totalValue =( cdUnits[ count ] * cdValue [ count ] );
               System.out.printf( "%s%d%s%s%s%d%s%.2f%s%.2f\n", "Item #", cdNums[ count ], " is: ", cdNames[ count ], " with ", cdUnits [ count ], " units priced at $", cdValue [ count ], " gives value of $", totalValue );
             return totalValue;
          } // end calcinventoryValue method
    } // end classand the test application: import java.util.Arrays;
    public class ProductTest
       public static void main( String args[] )
            int invNumber [] = { 1,2,3,4 };
            String albumName[] = { "Wish You Were Here", "Abacab", "Animals", "Security" };
            int invUnits[] = { 200, 150, 50, 500 };
            double invValue[] = { 14.99, 9.99, 23.49, 12.99 };
         Product myProduct = new Product (invNumber, albumName, invUnits, invValue );       
            myProduct.calcInventoryValue();
         } // end main
    } // end class ProductTestWhat I want to do is convert it to read in user input instead of static lists. Here is what I have so far:
    import java.util.Arrays;
    public class Product
    // initialize arrays
       private int cdNums[];
       private String cdNames[];
       private int cdUnits[];
       private double cdValue[];
       private double inventoryValue[];
    // initialize instance variable
       private double runValue = 0;
       private double totalValue = 0;
       private int count;
       public Product( int invNumber[], String albumName[], int invUnits[], double invValue[] )
             cdNums = invNumber;  // store inventory number
             cdNames = albumName;  //store album name
             cdUnits = invUnits;  //store number of units
             cdValue = invValue; // store unit price
       public double calcInventoryValue()
             // calculate Inventory value
                totalValue = 0; // Initialize totalValue variable
                for ( int count = 0; count < cdNums.length; count++ )
                       runValue =0; // initialize runValue
                       runValue =( cdUnits[ count ] * cdValue [ count ] );
               System.out.printf( "%s%d%s%s%s%d%s%.2f%s%.2f\n", "Item #", cdNums[ count ], " is: ", cdNames[ count ], " with ", cdUnits [ count ], " units priced at $", cdValue [ count ], " gives value of $", runValue );
                     totalValue = totalValue += runValue;
              calcTotalValue( totalValue );
             return totalValue;
          } // end calcinventoryValue method
        public double calcTotalValue( double totalValue )
             System.out.printf( "%s%.2f\n", "The total value of the inventory is: $", totalValue );
              return totalValue;
           } // end calcTotalValue method
    } // end classand the new test application:
    import java.util.Arrays;
    import java.util.Scanner;
    public class ProductTest
       public static void main( String args[] )
            double totalValue = 0;
          do 
            { //  open dowhile
             int count = 0; // initialize counter
             Scanner input = new Scanner( System.in ); // call scanner to get input
             for ( int count = 0; count > 0; count++ )
               {  // open for loop
                         System.out.printf ( "%s%d%s\n", "Please enter the inventory # of Item ", count, " or 0 to quit: " );  // prompt for inventory number or sentinel value
                          int invNumber[ count ] = input.nextInt();  // get user input of Item Number
                 if ( invNumber[ count ] != 0 )  // check for sentinel
                   {  // open if
                         System.out.printf ( "%s%d\n","Please enter the album name of Item #", invNumber[ count ] );  // prompt for album name
                         String albumName[ count ] = input.nextLine();  // get input album name
                         System.out.printf ( "%s%d\n", "Please enter the number of units in stock for Item #", invNumber[ count ] );  // prompt for number of units in stock
                         int invUnits[ count ] = input.nextint();  // input rate of payment
                         System.out.printf ( "%s%.2f\n", "Please enter the unit price for Item #", invNumber[ count ] );  // prompt for unit price
                         double unitValue = input.nextDouble();  // input rate of payment
                         System.out.println();  // print blank line for readability
                   } // close if
                else
                   {  // open else
                      Product myProduct = new Product (invNumber, albumName, invUnits, invValue );       
                         myProduct.calcInventoryValue();
                   } // close else
               } // close for loop           
           } while ( invNumber != 0 );  // loop back to inputting employee name and close dowhile
        } // end main
    } // end class ProductTestthe compiler is telling me for ProductTest that it is expecting "]" for the following line: int invNumber[ count ] = input.nextInt();Do I need to store the data in a variable first and then feed it into the array? What do I need to do to complete this code?

    OK, yeah. Change the Product constructor so that it takes scalar values (as opposed to arrays) -- a single int for units in stock, and single String for name, etc.
    Then you can create multiple objects of that class, one for each CD or whatever.
    It makes sense to hardcode values in the ProductTest class, but not really in the Product class. Your ProductTest class is almost there. You know how in the main method you create a single Product object with those arrays? Change it so that you have a loop. Loop through the prices, album names, etc., and create a Product for each set of values. Then put the Product objects in an array, or better yet (and if you've covered it in class) into a Collection like a java.util.HashSet or a java.util.ArrayList.
    You said you wanted to make it take values from user input, rather than hardcoded lists. Once you've made the above change, move on to doing that. You can read user input with a java.util.Scanner. Or you can use a java.io.BufferedReader. Did the prof say to use one particular method or another?

  • Need help with an array project please =)

    I'm having trouble figuring out where to start. My project is to create an applet that accepts 20 numbers from a text field one by one and adds them to an array. The numbers have to be between 10 and 50 or else the applet shouldn't include them in the 20 but duplicates should be included in the 20. The applet then has to display all the numbers except for duplicates. example:
    user inputs:
    10,11,12,13,14,15,16,16,16,17,18,19,20,20,20,21,23,24,25,26
    applet detects that 20 numbers have been entered and displays them exluding duplicates:
    10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26
    If the user imputs a number like 72 I need to make it alert them that the number was not in the 10-50 range and not add that number to the total 20.
    I'm not asking anyone to do this for me, I'm just asking for tips on where to get a good start.
    Thanks!

    //i haven't tryed that code, and it might not work
    // anyhow, just in case, i'll also say that this is not an applet
    public class NoDublicates {
    public static void main(String[] args) {
      if (args.length < 20) {
       System.out.println("usage:\njava NoDublicates "
         + "<and 20 space separated numbers from 10 to 50 here>");
       System.exit(1);
      byte[] nums = new byte[args.length];
      int i = 0;
      for (int j = 0; j < args.length; j++) {
       try {
        int temp = Integer.parseInt(args[j]);
        if (temp <= 50 && temp >= 10) {
         nums[i++] = temp;
       } catch (NumberFormatException nfe) {
        // very bad exception, i think i'll ignore it
      if (i != 20) {
       System.out.println("it seems that i didn't get exactly 20 "
        + "parseable numbers as arguments, let's exit now.");
       System.exit(1);
      java.util.Arrays.sort(nums);
      int old = 0;
      for (int j = 0; j < 20; j++) {
       if (nums[j] != old) {
        System.out.print(nums[j] + " ");
       old = nums[j];
    }

  • Need Help with my JSF-Project - ResultSet to List to DataTable/c:foreach

    Hello!
    I am struggeling heavily with JSF and JSTL and JSPs...
    I want to show a list of names from a database in my JSF-Document.
    I have the following bean "Category":
    package de.fh_offenburg.audiodb.webapp;
    import java.sql.Connection;
    import java.sql.ResultSet;
    import java.sql.Statement;
    import java.util.ArrayList;
    import java.util.List;
    import javax.servlet.jsp.jstl.sql.Result;
    public class Category {
         String name = "";
         String creationDate = "";
         int id_kategorie = 0;
         ResultSet resultset;
         Result result;
         Connection con;
         String query = "";
         List result_list;
         Category() {
              result_list = new ArrayList();
              try{
                   con = new ConnectDB().connect();
                   Statement statement = con.createStatement();
                   query = "SELECT * FROM Category WHERE isUKat = '0'";
                   resultset = statement.executeQuery(query);
                   while (resultset.next()) {
                     // Get the data from the row using the column index
                     String name = resultset.getString("name");
                     // create an object for each row (yes, it is hibernate biased) ;-)
                     Cat cat = new Cat();
                     cat.setName(name);
                     cat.setId_kategorie(id_kategorie);
                     // Add the object to the list
                     result_list.add(cat);
              } catch(Exception hcat){
                   System.out.println("HCat-Problem: "+hcat.getMessage());
         public java.lang.String getCreationDate() {
              return creationDate;
         public void setCreationDate(java.lang.String creationDate) {
              this.creationDate = creationDate;
         public int getId_kategorie() {
              return id_kategorie;
         public void setId_kategorie(int id_kategorie) {
              this.id_kategorie = id_kategorie;
         public java.lang.String getName() {
              return name;
         public void setName(java.lang.String name) {
              this.name = name;
         public java.sql.ResultSet getResultset() {
              return resultset;
         public void setResult_cat(java.sql.ResultSet result_cat) {
              this.resultset = result_cat;
         public void setResult(Result result) {
              this.result = result;
         public Result getResult() {
              return result;
         public List getResult_list() {
              return result_list;
         public void setResult_list(ArrayList result_list) {
              this.result_list = result_list;
         }This Bean is registered in my faces-config.xml like this:
    <managed-bean>
      <managed-bean-name>category</managed-bean-name>
      <managed-bean-class>de.fh_offenburg.audiodb.webapp.Category</managed-bean-class>
      <managed-bean-scope>application</managed-bean-scope>
      <managed-property>
       <property-name>creationDate</property-name>
       <property-class>java.lang.String</property-class>
       <value/>
      </managed-property>
      <managed-property>
       <property-name>id_kategorie</property-name>
       <property-class>int</property-class>
       <value/>
      </managed-property>
      <managed-property>
       <property-name>name</property-name>
       <property-class>java.lang.String</property-class>
       <value/>
      </managed-property>
      <managed-property id="result">
       <property-name>result</property-name>
       <property-class>javax.servlet.jsp.jstl.sql.Result</property-class>
       <value/>
      </managed-property>
      <managed-property id="resultset">
       <property-name>resultset</property-name>
       <property-class>java.sql.ResultSet</property-class>
       <value/>
      </managed-property>
      <managed-property id="result_list">
       <property-name>result_list</property-name>
       <property-class>java.util.List</property-class>
       <value/>
      </managed-property>
    </managed-bean>Now I try to read the list of Cats out in my JSF:
                                                      <h:dataTable value="#{category.result_list}" var="result">
                                                           <h:column>
                                                                          <h:outputText value="#{result.name}" />
                                                           </h:column>
                                                      </h:dataTable>... but that doesnt work... I got an error:
    javax.servlet.ServletException: Cannot get value for expression '#{category.result_list}'
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:152)
         org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
         org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
         org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
    root cause So what am I doing wrong?
    I did try to do the same with an JSTL-Syntax (which would be better for me, because I want to layout with DIVs not with a Table...):
                                                      <c:forEach items="#{category.result_list}" var="result">
                                                           <div class="div_mini_kat"><c:out value="#{result.name}"/></div>
                                                      </c:forEach>But that doesnt work out neigther...
    Could someone please tell me what I am doing wrong? I am trying this for days now and I am feeling like a bumble-bee in a glasshouse with one small open doorway which I dont see and thousands of m^2 to crash with...
    Thanks to everyone who answers in advance!!!
    Fuchur

    Hello!
    I am struggeling heavily with JSF and JSTL and JSPs...
    I want to show a list of names from a database in my JSF-Document.
    I have the following bean "Category":
    package de.fh_offenburg.audiodb.webapp;
    import java.sql.Connection;
    import java.sql.ResultSet;
    import java.sql.Statement;
    import java.util.ArrayList;
    import java.util.List;
    import javax.servlet.jsp.jstl.sql.Result;
    public class Category {
         String name = "";
         String creationDate = "";
         int id_kategorie = 0;
         ResultSet resultset;
         Result result;
         Connection con;
         String query = "";
         List result_list;
         Category() {
              result_list = new ArrayList();
              try{
                   con = new ConnectDB().connect();
                   Statement statement = con.createStatement();
                   query = "SELECT * FROM Category WHERE isUKat = '0'";
                   resultset = statement.executeQuery(query);
                   while (resultset.next()) {
                     // Get the data from the row using the column index
                     String name = resultset.getString("name");
                     // create an object for each row (yes, it is hibernate biased) ;-)
                     Cat cat = new Cat();
                     cat.setName(name);
                     cat.setId_kategorie(id_kategorie);
                     // Add the object to the list
                     result_list.add(cat);
              } catch(Exception hcat){
                   System.out.println("HCat-Problem: "+hcat.getMessage());
         public java.lang.String getCreationDate() {
              return creationDate;
         public void setCreationDate(java.lang.String creationDate) {
              this.creationDate = creationDate;
         public int getId_kategorie() {
              return id_kategorie;
         public void setId_kategorie(int id_kategorie) {
              this.id_kategorie = id_kategorie;
         public java.lang.String getName() {
              return name;
         public void setName(java.lang.String name) {
              this.name = name;
         public java.sql.ResultSet getResultset() {
              return resultset;
         public void setResult_cat(java.sql.ResultSet result_cat) {
              this.resultset = result_cat;
         public void setResult(Result result) {
              this.result = result;
         public Result getResult() {
              return result;
         public List getResult_list() {
              return result_list;
         public void setResult_list(ArrayList result_list) {
              this.result_list = result_list;
         }This Bean is registered in my faces-config.xml like this:
    <managed-bean>
      <managed-bean-name>category</managed-bean-name>
      <managed-bean-class>de.fh_offenburg.audiodb.webapp.Category</managed-bean-class>
      <managed-bean-scope>application</managed-bean-scope>
      <managed-property>
       <property-name>creationDate</property-name>
       <property-class>java.lang.String</property-class>
       <value/>
      </managed-property>
      <managed-property>
       <property-name>id_kategorie</property-name>
       <property-class>int</property-class>
       <value/>
      </managed-property>
      <managed-property>
       <property-name>name</property-name>
       <property-class>java.lang.String</property-class>
       <value/>
      </managed-property>
      <managed-property id="result">
       <property-name>result</property-name>
       <property-class>javax.servlet.jsp.jstl.sql.Result</property-class>
       <value/>
      </managed-property>
      <managed-property id="resultset">
       <property-name>resultset</property-name>
       <property-class>java.sql.ResultSet</property-class>
       <value/>
      </managed-property>
      <managed-property id="result_list">
       <property-name>result_list</property-name>
       <property-class>java.util.List</property-class>
       <value/>
      </managed-property>
    </managed-bean>Now I try to read the list of Cats out in my JSF:
                                                      <h:dataTable value="#{category.result_list}" var="result">
                                                           <h:column>
                                                                          <h:outputText value="#{result.name}" />
                                                           </h:column>
                                                      </h:dataTable>... but that doesnt work... I got an error:
    javax.servlet.ServletException: Cannot get value for expression '#{category.result_list}'
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:152)
         org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
         org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
         org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
    root cause So what am I doing wrong?
    I did try to do the same with an JSTL-Syntax (which would be better for me, because I want to layout with DIVs not with a Table...):
                                                      <c:forEach items="#{category.result_list}" var="result">
                                                           <div class="div_mini_kat"><c:out value="#{result.name}"/></div>
                                                      </c:forEach>But that doesnt work out neigther...
    Could someone please tell me what I am doing wrong? I am trying this for days now and I am feeling like a bumble-bee in a glasshouse with one small open doorway which I dont see and thousands of m^2 to crash with...
    Thanks to everyone who answers in advance!!!
    Fuchur

  • Need help with calculator project for an assignment...

    Hi all, I please need help with my calculator project that I have to do for an assignment.
    Here is the project's specifications that I need to do"
    """Create a console calculator applicaion that:
    * Takes one command line argument: your name and surname. When the
    program starts, display the date and time with a welcome message for the
    user.
    * Display all the available options to the user. Your calculator must include
    the arithmetic operations as well as at least five scientific operations of the
    Math class.
    -Your program must also have the ability to round a number and
    truncate it.
    -When you multiply by 2, you should not use the '*' operator to perform the
    operation.
    -Your program must also be able to reverse the sign of a number.
    * Include sufficient error checking in your program to ensure that the user
    only enters valid input. Make use of the String; Character, and other
    wrapper classes to help you.
    * Your program must be able to do conversions between decimal, octal and
    hex numbers.
    * Make use of a menu. You should give the user the option to end the
    program when entering a certain option.
    * When the program exits, display a message for the user, stating the
    current time, and calculate and display how long the user used your
    program.
    * Make use of helper classes where possible.
    * Use the SDK to run your program."""
    When the program starts, it asks the user for his/her name and surname. I got the program to ask the user again and again for his/her name and surname
    when he/she doesn't insert anything or just press 'enter', but if the user enters a number for the name and surname part, the program continues.
    Now my question is this: How can I restrict the user to only enter 'letters' (and spaces of course) but allow NO numbers for his/her surname??
    Here is the programs code that I've written so far:
    {code}
    import java.io.*;
    import java.util.*;
    import java.text.*;
    public class Project {
         private static String nameSurname = "";     
         private static String num1 = null;
         private static String num2 = null;
         private static String choice1 = null;
         private static double answer = 0;
         private static String more;
         public double Add() {
              answer = (Double.parseDouble(num1) + Double.parseDouble(num2));
              return answer;
         public double Subtract() {
              answer = (Double.parseDouble(num1) - Double.parseDouble(num2));
              return answer;
         public double Multiply() {
              answer = (Double.parseDouble(num1) * Double.parseDouble(num2));
              return answer;
         public double Divide() {
              answer = (Double.parseDouble(num1) / Double.parseDouble(num2));
              return answer;
         public double Modulus() {
              answer = (Double.parseDouble(num1) % Double.parseDouble(num2));
              return answer;
         public double maximumValue() {
              answer = (Math.max(Double.parseDouble(num1), Double.parseDouble(num2)));
              return answer;
         public double minimumValue() {
              answer = (Math.min(Double.parseDouble(num1), Double.parseDouble(num2)));
              return answer;
         public double absoluteNumber1() {
              answer = (Math.abs(Double.parseDouble(num1)));
              return answer;
         public double absoluteNumber2() {
              answer = (Math.abs(Double.parseDouble(num2)));
              return answer;
         public double Squareroot1() {
              answer = (Math.sqrt(Double.parseDouble(num1)));
              return answer;
         public double Squareroot2() {
              answer = (Math.sqrt(Double.parseDouble(num2)));
              return answer;
         public static String octalEquivalent1() {
              int iNum1 = Integer.parseInt(num1);
    String octal1 = Integer.toOctalString(iNum1);
    return octal1;
         public static String octalEquivalent2() {
              int iNum2 = Integer.parseInt(num2);
              String octal2 = Integer.toOctalString(iNum2);
              return octal2;
         public static String hexadecimalEquivalent1() {
              int iNum1 = Integer.parseInt(num1);
              String hex1 = Integer.toHexString(iNum1);
              return hex1;
         public static String hexadecimalEquivalent2() {
              int iNum2 = Integer.parseInt(num2);
              String hex2 = Integer.toHexString(iNum2);
              return hex2;
         public double Round1() {
              answer = Math.round(Double.parseDouble(num1));
              return answer;
         public double Round2() {
              answer = Math.round(Double.parseDouble(num2));
              return answer;
              SimpleDateFormat format1 = new SimpleDateFormat("EEEE, dd MMMM yyyy");
         Date now = new Date();
         SimpleDateFormat format2 = new SimpleDateFormat("hh:mm a");
         static Date timeIn = new Date();
         public static long programRuntime() {
              Date timeInD = timeIn;
              long timeOutD = System.currentTimeMillis();
              long msec = timeOutD - timeInD.getTime();
              float timeHours = msec / 1000;
                   return (long) timeHours;
         DecimalFormat decimals = new DecimalFormat("#0.00");
         public String insertNameAndSurname() throws IOException{
              boolean inputCorrect = false;
                   while (inputCorrect == false) {
                        while (nameSurname == null || nameSurname.length() == 0) {
                             for (int i = 0; i < nameSurname.length(); i++) {
                             if ((nameSurname.charAt(i) > 'a') && (nameSurname.charAt(i) < 'Z')){
                                       inputCorrect = true;
                        else{
                        inputCorrect = false;
                        break;
                        try {
                             BufferedReader inStream = new BufferedReader (new InputStreamReader(System.in));
                             System.out.print("Please enter your name and surname: ");
                             nameSurname = inStream.readLine();
                             inputCorrect = true;
                        }catch (IOException ex) {
                             System.out.println("You did not enter your name and surname, " + nameSurname + " is not a name, please enter your name and surname :");
                             inputCorrect = false;
                        System.out.println("\nA warm welcome " + nameSurname + " ,todays date is: " + format1.format(now));
                        System.out.println("and the time is now exactly " + format2.format(timeIn) + ".");
                        return nameSurname;
              public String inputNumber1() throws IOException {
              boolean inputCorrect = false;
                   while (inputCorrect == false) {
                        try {
                             BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
                             System.out.print("\nPlease enter a number you want to do a calculation with and hit <ENTER>: ");
                             num1 = br.readLine();
                             double number1 = Double.parseDouble(num1);
                             System.out.println("\nThe number you have entered is: " + number1);
                             inputCorrect = true;
                        } catch (NumberFormatException nfe) {
                             System.out.println("\nYou did not enter a valid number: " + "\""+ num1 + "\" is not a number!!");
                             inputCorrect = false;
                        return num1;
         public String calculatorChoice() throws IOException {
              System.out.println("Please select an option of what you would like to do with this number from the menu below and hit <ENTER>: ");
              System.out.println("\n*********************************************");
              System.out.println("---------------------------------------------");
              System.out.println("Please select an option from the list below: ");
              System.out.println("---------------------------------------------");
              System.out.println("1 - Add");
              System.out.println("2 - Subtract");
              System.out.println("3 - Multiply");
              System.out.println("4 - Divide (remainder included)");
              System.out.println("5 - Maximum and minimum value of two numbers");
              System.out.println("6 - Squareroot");
              System.out.println("7 - Absolute value of numbers");
              System.out.println("8 - Octal and Hexadecimal equivalent of numbers");
              System.out.println("9 - Round numbers");
              System.out.println("0 - Exit program");
              System.out.println("**********************************************");
              boolean inputCorrect = false;
                   while (inputCorrect == false) {
                        try {
                             BufferedReader inStream = new BufferedReader (new InputStreamReader(System.in));
                             System.out.print("Please enter your option and hit <ENTER>: ");
                             choice1 = inStream.readLine();
                             int c1 = Integer.parseInt(choice1);
                             System.out.println("\nYou have entered choice number: " + c1);
                             inputCorrect = true;
                        } catch (NumberFormatException nfe) {
                             System.out.println("You did not enter a valid choice number: " + "\""+ choice1 + "\" is not in the list!!");
                             inputCorrect = false;
                        return choice1;
         public String inputNumber2() throws IOException {
              boolean inputCorrect = false;
                   while (inputCorrect == false) {
                        try {
                             BufferedReader br2 = new BufferedReader (new InputStreamReader(System.in));
                             System.out.print("\nPlease enter another number you want to do the calculation with and hit <ENTER>: ");
                             num2 = br2.readLine();
                             double n2 = Double.parseDouble(num2);
                             System.out.println("\nThe second number you have entered is: " + n2);
                             System.out.println("\nYour numbers are: " + num1 + " and " + num2);
                             inputCorrect = true;
                        } catch (NumberFormatException nfe) {
                             System.out.println("You did not enter a valid number: " + "\""+ num2 + "\" is not a number!!");
                             inputCorrect = false;
                        return num2;
         public int Calculator() {
              int choice2 = (int) Double.parseDouble(choice1);
              switch (choice2) {
                        case 1 :
                             Add();
                             System.out.print("The answer of " + num1 + " + " + num2 + " is: " + decimals.format(answer));
                             break;
                        case 2 :
                             Subtract();
                             System.out.print("The answer of " + num1 + " - " + num2 + " is: " + decimals.format(answer));
                             break;
                        case 3 :
                             Multiply();
                             System.out.print("The answer of " + num1 + " * " + num2 + " is: " + decimals.format(answer));
                             break;
                        case 4 :
                             Divide();
                             System.out.print("The answer of " + num1 + " / " + num2 + " is: " + decimals.format(answer));
                             Modulus();
                             System.out.print(" and the remainder is " + decimals.format(answer));
                             break;
                        case 5 :
                             maximumValue();
                             System.out.println("The maximum number between the numbers " + num1 + " and " + num2 + " is: " + decimals.format(answer));
                             minimumValue();
                             System.out.println("The minimum number between the numbers " + num1 + " and " + num2 + " is: " + decimals.format(answer));
                             break;
                        case 6 :
                             Squareroot1();
                             System.out.println("The squareroot of value " + num1 + " is: " + decimals.format(answer));
                             Squareroot2();
                             System.out.println("The squareroot of value " + num2 + " is: " + decimals.format(answer));
                             break;
                        case 7 :
                             absoluteNumber1();
                             System.out.println("The absolute number of " + num1 + " is: " + decimals.format(answer));
                             absoluteNumber2();
                             System.out.println("The absolute number of " + num2 + " is: " + decimals.format(answer));
                             break;
                        case 8 :
                             octalEquivalent1();
                             System.out.println("The octal equivalent of " + num1 + " is: " + octalEquivalent1());
                             octalEquivalent2();
                             System.out.println("The octal equivalent of " + num2 + " is: " + octalEquivalent2());
                             hexadecimalEquivalent1();
                             System.out.println("\nThe hexadecimal equivalent of " + num1 + " is: " + hexadecimalEquivalent1());
                             hexadecimalEquivalent2();
                             System.out.println("The hexadecimal equivalent of " + num2 + " is: " + hexadecimalEquivalent2());
                             break;
                        case 9 :
                             Round1();
                             System.out.println("The rounded number of " + num1 + " is: " + decimals.format(answer));
                             Round2();
                             System.out.println("The rounded number of " + num2 + " is: " + decimals.format(answer));
                             break;
                        case 0 :
                             if (choice2 == 0) {
                                  System.exit(1);
                             break;
                   return choice2;
              public String anotherCalculation() throws IOException {
                   boolean inputCorrect = false;
                   while (inputCorrect == false) {
                             try {                              
                                  BufferedReader br3 = new BufferedReader (new InputStreamReader(System.in));
                                  System.out.print("\nWould you like to do another calculation? Y/N ");
                                  more = br3.readLine();
                                  String s1 = "y";
                                  String s2 = "Y";
                                  if (more.equals(s1) || more.equals(s2)) {
                                       inputCorrect = true;
                                       while (inputCorrect = true){
                                            inputNumber1();
                                            System.out.println("");
                                            calculatorChoice();
                                            System.out.println("");
                                            inputNumber2();
                                            System.out.println("");
                                            Calculator();
                                            System.out.println("");
                                            anotherCalculation();
                                            System.out.println("");
                                            inputCorrect = true;
                                  } else {
                                       System.out.println("\n" + nameSurname + " thank you for using this program, you have used this program for: " + decimals.format(programRuntime()) + " seconds");
                                       System.out.println("the program will now exit, Goodbye.");
                                       System.exit(0);
                             } catch (IOException ex){
                                  System.out.println("You did not enter a valid answer: " + "\""+ more + "\" is not in the list!!");
                                  inputCorrect = false;
              return more;
         public static void main(String[] args) throws IOException {
              Project p1 = new Project();
              p1.insertNameAndSurname();
              System.out.println("");
              p1.inputNumber1();
              System.out.println("");
              p1.calculatorChoice();
              System.out.println("");
              p1.inputNumber2();
              System.out.println("");
              p1.Calculator();
                   System.out.println("");
                   p1.anotherCalculation();
                   System.out.println("");
    {code}
    *Can you please run my code for yourself and have a look at how this program is constructed*
    *and give me ANY feedback on how I can better this code(program) or if I've done anything wrong from your point of view.*
    Your help will be much appreciated.
    Thanks in advance

    Smirre wrote:
    Now my question is this: How can I restrict the user to only enter 'letters' (and spaces of course) but allow NO numbers for his/her surname??You cannot restrict the user. It is a sad fact in programming that the worst bug always sits in front of the Computer.
    What you could do is checking the input string for numbers. If it contains numbers, just reprompt for the Name.
    AND you might want to ask yourself why the heck a calculator needs to know the users Name.

  • Need help with almost completed plugin engine project

    Hi all,
    For a while now I have been working on a plugin engine. After a few iterations, the engine is similar to the Eclipse engine, in that plugins use extension points and extensions to allow contributions. Unlike the eclipse engine I have added the ability for plugins to fire events through the engine and other plugins can add listeners, all through the plugin.xml manifest. Dependencies are mostly handled automatically at plugin load time (when extensions get resolved to extension points, and listeners get resolved to events). For the case where a plugin needs to use classes from another plugin, dependencies are also allowed to be declared. Like the eclipse engine, activation of plugins occurs the first time a class is used within the plugin's classpath, OR a plugin can be activated after it is loaded.
    What I need help with is testing, working on examples to provide with the engine project, and feedback/suggestions before we release the M1 build. I am asking for those that are interested in this type of work to volunteer to help where applicable and possible. I want to provide a solid plugin engine to the java community, one that is easy to use, works well, and is pretty effecient in terms of resource usage and performance.
    Of particular interest to me right at the moment is dealing with multiple versions. As I see it, the engine will be used within an application and as such plugins would be distributed with a specific application version. The plugin version itself is more of a notification as to what version a plugin is, although I imagine it will help when updating at runtime as well.
    Just a few other details of the engine. It handles (or will soon) dynamic load, unload and reload of plugins at runtime. Plugins can be distributed in an archive file format, we call .par (Plugin ARchive), with additional plugin filename extensions configurable at runtime. The plugins can be developed and deployed in an expanded directory format as they are in Eclipse as well, or in the archive format. In the archive format they do not need to be unzipped when deployed, and they can contain embeded jar/zip libraries. The engine handles finding and creating classes directly out of the .par file at runtime.
    Multiple locations to find plugins are configurable before the engine starts, and even after it starts more could be added to allow additional locations to find plugins. URLs are supported, and soon the HTTP protocol will be supported so that plugins can be downloaded and installed at runtime.
    The project can be found at www.sourceforge.net/projects/genpluginengine. If you would like to get involved and help out, please sign up on the dev mail list and send an email to introduce yourself to the rest of the members on the list.
    I'll also add that I am working on a Swing UI Framework built entirely from plugins. It provides a ready-to-launce UI application that developers can simply add their plugins to, extending various extension points of the framework to have menu items, toolbar buttons, status bar access, help and preferences dialog additions, file i/o choosers, tons of open-source components ready to use (or extend to add on to), and like Eclipse, hopefully... draggable window frames that can be dropped on any other frame to form a tabbed frame of windows. Some of this is a ways off, some is getting there now. Presently you can add menu items that do allow plugin activation when first clicked, so plugins can be loaded but not activated until needed. The Preference dialog works but is not completed, and a plugin that adds a plugin control panel to view all loaded plugins, activate them, load/unload/reload, view extension points, extensions, dependencies, etc is partially completed. The point is, to allow a ready to run UI framework in Swing with an easy path for developers to quickly build applications with. If you are interested in this, when you join the mail list and introduce yourself, indicate that you are interested in this as well, as we need help with plugin development for it and would appreciate more help here too.
    Look forward to some replies.

    Might I suggest setting up a project at a known project-site? I've seen your progress and questions posted here from time to time, but one of the drawbacks is that you have to fill each post with the entirity of your vision to explain what you're doing. That's a lot of text to read - and most folks will skip right over it.
    On the other hand, a well-crafted, good-looking project web-site, with appropriate links and docs and vision statements, diagrams, etc. will have more likelyhood of attracting volunteers. java.net and sourceforge.net are likely spots to set up shop. In addition, you get CVS and bug-tracking systems, which can be quite valuable in such a large-scale project where there are lots of pieces.

  • Need Help with a Flash Web Project

    Hello, everyone. I am trying to use Flash to make a two-step
    system. I want the flash document to, first, allow a person to
    upload multiple image files and then, second, for the flash
    document be able to create a slideshow with the uploaded images and
    fade in and out from each image until the slideshow is over. I want
    it to be where the flash document creates its own slideshow with
    the images that are uploaded in the first step that I mentioned. I
    want it to do it completely on its own so I need to know how to
    give it the proper AI so that it can do this task.
    So, are there any tips that anyone has on how to do this? Can
    anyone tell me exactly how to do this? I really need help with this
    for my new website project. Thanks in advance, everyone!

    The problem with the text not appearing at all has to do with you setting the alpha of the movieclip to 0%.  Not within the movieclip, but the movieclip itself.  The same for the xray graphic, except you have that as a graphic symbol rather than a movieclip.  To have that play while inhabiting one frame you'll need to change it to a movieclip symbol.
    To get the text to play after the blinds (just a minor critique, I'd speed up the blinds), you will want to add some code in the frame where you added the stop in the blinds animation.  You will also need to assign instance names for the text movieclips in the properties panel, as well as place a stop(); in their first frames (inside).
    Let's say you name them upperText and lowerText.  Then the code you'd add at the end of the blinds animation (in the stop frame) would be...
    _parent.upperText.play();
    _parent.lowerText.play();
    The "_parent" portion of that is used to target the timeline that is containing the item making the command, basically meaning it's the guy inside the blinds telling the guy outside the blinds to do something.
    You'll probably want to add stops to the ends of the text animations as well.
    If you want to have the first text trigger the second text, then you'd take that second line above and place it in the last frame of the first text animation instead of the blinds animation.
    Note, on occasion, undeterminably, that code above doesn't work for some odd reason... the animation plays to the next frame and stops... so if you run into that, just put a play(); in the second frame to help push it along.
    PS GotoandPlay would actually be gotoAndPlay, and for the code above you could substitute play(); with gotoAndPlay(2);

  • Project Server 2013: I am using Project Server Permission Mode and need help with permission assignments?

    Hi 
    Project Server 2013: I am using Project Server Permission Mode and need help with permission assignments?
    How can I change Permissions for the individual users to see specific projects or all projects in project center and to see specific quick launch items?
    For Example: if i have 4 users, A, B, C and D. what i want is:
    User A can see everything and act as a project manager or Admin.
    User B can view all projects in project centre but can change the schedule or resource assignment etc.
    User C can only act as approver of projects and can view all projects in project centre.
    User D can only view specific projects for which permissions are given.
    can i have some expert help in sorting and understanding permission modes... as i was playing with project server mode permissions and can't figure out how to apply the above scenario to set of my user.
    Thanks in Advance
    Cheers
    AJ
    Ajay Kumar

    Hi Ajay,
    Please refer to this link for detailed explanations about PS2013 security model. 
    http://technet.microsoft.com/en-us/library/cc197638(v=office.15).aspx
    Actually, it will take a couple of days to explain in detail the security model that is a fundamental and tricky aspect of every PS implementation. But basically, you NEVER set permissions for a single user. You have groups in which your insert users. Groups
    define "what users can do". Then you associate groups to a corresponding category. Categories define "what user can see". Thus the association of a group with a category will set "what the user can do on the objects he can see". Then, for more advanced security
    level, you can use the RBS that will consist in "branches" in which you'll insert users. Based on those branches, you'll customize categories to fine-tune what user can see (for projects and resources) depending on the RBS branch and level.
    I'd advice you to start "playing" in a test environment with the default categories/groups that might probably cover your need.
    Concerning your 4 users:
    user A : add him to the "administrator" group. Be careful that you're mentionning either project manager or administrator, which are 2 groups/categories with totally different permissions level.
    user B : basically can see everything and change everything? it could be in the project manager group, assuming that there are no project visibility restrictions on the category via the RBS.
    user C : waht do you mean by "approver"? Workflow approvals? Then it will be the portfolio manager group. Task update or timesheet approval? Then it is another long topic: please refer in the documentation to the "status manager" and "timesheet manager"
    concepts. There are not related to the security model. In a few words, the status manager is the owner of the project plan, is defined for each task and approves tasks updates. The timesheet manager is an attribute defined for each resource in its parameters
    and approves resource timesheet.
    user D : you have to define which permission level must be given to this user. Basically it could be a team member that will see only projects he's in the project team. Note that team member cannot interact with the project plan in another way than submitting
    timesheets and/or tasks updates which must be approved.
    Once more, those are large and complex subjects that require a deep dive into your business model and tons of tests in a test environment.
    Hope this helps.
    Guillaume Rouyre - MBA, MCP, MCTS

  • Need help with a project

    Hi,
    I'm a final year engineering student doing my project on cloud computing. Our project is a web application developed which concerns the issue of cloud security.Our lecturers asked us to put it on the cloud instead of showing it as a web application. So we
    are trying the trial version of Windows Azure. I need help in putting my project on to the cloud. Please help regarding this as soon as possible... 
    We are using Apache tomcat, JDK 1.6, Wamp server for our web application and we have developed this using netbeans IDE
    Very Urgent!!!

    Hello there, if you're still looking for help you might not be in the right forum.  This fourm is all about Azure SQL Database.

  • Need help with Template - unbalanced #EndEditable tag

    I am unable to use this template to create a new page and get the "unbalanced #EndEditable tag" error.
    If I open the file independently it looks great - otherwise I get the error.
    Code for internal_students.dwt
    There is an error at line 45, column 79 (absolute position 2188)
    <div id="metanav"><!-- #BeginLibraryItem "/Library/metaNav.lbi" -->
    <p><a href="../Library/contact/index.html">Contact Us</a></p>
    <!-- #EndLibraryItem --></div>
            <div id="navigation">
                <div id="navigation_l">
                    <div id="navigation_r"><!-- #BeginLibraryItem "/Library/mainNav.lbi" --> <ul>
                            <li><a href="../index.html" class="first"><img src="../images/spacer.gif" alt="CAITE Homepage" width="75" height="20" border="0" /></a></li>
                            <li><a href="../about/index.html">About</a></li>
      <li><a href="../news/index.html">News And Events</a></li>
      <li><a href="../educators/index.html">For Educators</a></li>
      <li><a href="../students/index.html">For Students</a></li>
      <li><a href="../industry/index.html" class="last">For Industry</a></li>
                        </ul>
    <!-- #EndLibraryItem --></div>
    I need help with this as the site and templates were created 2/3 years before I arrived on the job.
    Thank you
    Cheryl

    Okay
    - This is on-line page  http://caite.cs.umass.edu/students/index.html
    If you want code from template here it is:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/internal_about.dwt" codeOutsideHTMLIsLocked="false" -->
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    <!-- InstanceBeginEditable name="doctitle" -->
    <title>CAITE - Commonwealth Alliance for Information Technology Education</title>
    <!-- InstanceEndEditable -->
    <!-- InstanceBeginEditable name="head" -->
    <meta name="Description" content="Commonwealth Alliance for Information Technology Education (CAITE) to design and carry out comprehensive programs that address under representation in information technology (IT) education and the workforce. CAITE will focus on women and minorities in groups that are underrepresented in the Massachusetts innovation economy" />
    <meta name="Keywords" content="Commonwealth Alliance for Information Technology Education CAITE Massachusetts women minorities information technology IT" />
    <meta name="robots" content="all, index, follow" />
    <meta name="revisit-after" content="14 days" />
    <meta name="author" content="Outreach Web Team" />
    <!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable --><!-- InstanceEndEditable -->
    <link rel="shortcut icon" href="/images/favicon.ico" />
    <script type="text/javascript" src="../scripts/jquery.js"></script>
    <script type="text/javascript" src="../scripts/jquery.easing.js"></script>
    <script type="text/javascript" src="../scripts/jquery.pngfix.js"></script>
    <script language="JavaScript" type="text/JavaScript">
        <!--
        $(document).ready(function() {
            $("img[@src$=png], div#wrapper_l, div#wrapper_r, div#whatsnew").pngfix();
        //-->
    </script>
    <link href="../css/screenstyle.css" rel="stylesheet" type="text/css" media="screen" />
    <link href="../css/printstyle.css" rel="stylesheet" type="text/css" media="print" />
    </head>
    <script type="text/javascript">
    var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
    document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
    </script>
    <body>  
        <div id="wrapper">
            <div id="metanav"><!-- #BeginLibraryItem "/Library/metaNav.lbi" -->
    <p><a href="../Library/contact/index.html">Contact Us</a></p>
    <!-- #EndLibraryItem --></div>
            <div id="navigation">
                <div id="navigation_l">
                    <div id="navigation_r"><!-- #BeginLibraryItem "/Library/mainNav.lbi" --> <ul>
                            <li><a href="../index.html" class="first"><img src="../images/spacer.gif" alt="CAITE Homepage" width="75" height="20" border="0" /></a></li>
                            <li><a href="../about/index.html">About</a></li>
      <li><a href="../news/index.html">News And Events</a></li>
      <li><a href="../educators/index.html">For Educators</a></li>
      <li><a href="../students/index.html">For Students</a></li>
      <li><a href="../industry/index.html" class="last">For Industry</a></li>
                        </ul>
    <!-- #EndLibraryItem --></div>
                    <!-- end navigation right -->
                </div><!-- end navigation left -->
           </div><!-- end navigation -->
            <div id="wrapper_l">
                <div id="wrapper_r">
                      <div id="innerwrapper">
                        <div id="internalBanner-print"> <h1>Commonwealth Alliance for Information Technology Education (CAITE)</h1></div>
                        <div id="internalBanner"><!-- InstanceBeginEditable name="internalBanner" -->
                          <div class="students-banner">
                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                              <tr>
                                <td width="125" height="188" align="left" valign="top" id="homeImage"><img src="../images/logo_vertical_small.png" alt="CAITE" width="105" height="188" /></td>
                                <td align="left" valign="top" id="internal-banner-quote"><div id="internalQuote">
                                    <div id="internalQuote-inner">
                                      <p>CAITE designs and carrys out comprehensive programs that address under-representation in information technology (IT).</p>
                                  </div>
                                </div></td>
                              </tr>
                            </table>
                        </div>
                        <!-- InstanceEndEditable --></div> <!-- end banner -->
                        <div id="internalContent">
                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                              <tr>
                                <td width="317" align="left" valign="top" id="secondary-content">
                                  <!-- InstanceBeginEditable name="SecondaryNav" --><!-- #BeginLibraryItem "/Library/studentNav.lbi" -->
                                  <h3><a href="../students/index.html">For Students</a></h3>
                                  <div id="secondaryNav">
                                    <ul>
                                      <li><a href="http://www.takeITgoanywhere.org" target="_blank">TakeITgoanywhere.org</a></li>
                                    </ul>
    </div><!-- #EndLibraryItem --><!-- InstanceEndEditable -->
                                </td>
                                <td align="left" valign="top" id="contentCell"><!-- InstanceBeginEditable name="mainContent" -->
                                  <h1>For Students</h1>
                                  <p>The University of Massachusetts Amherst is leading a Commonwealth Alliance for Information Technology Education (CAITE) to design and carry out comprehensive programs that address under representation in information technology (IT) education and the workforce. CAITE will focus on women and minorities in groups that are underrepresented in the Massachusetts innovation economy; that is, economically, academically, and socially disadvantaged residents.</p>
                                  <p>The project will pilot a series of outreach programs supported by educational pathways in three regions (one rural, one suburban, and one urban). The project will include work with high school teachers, staff, and counselors. CAITE will identify best practices and disseminate, deploy, extend and institutionalize these best practices statewide and nationally.</p>
                                  <p>Community colleges are the centerpiece of CAITE because of the central role they play in reaching out to underserved populations and in serving as a gateway to careers and further higher education.</p>
                                  <p>This project will build a broad alliance built on its leadership in and partnership with the Commonwealth Information Technology Initiative (CITI), the Boston Area Advanced Technological Education Center (BATEC), regional Louis Stokes Alliances and NSF EGEP programs, and other partnerships and initiatives focused on information technology education and STEM pipeline issues</p>
                                  <p> </p>
                                <!-- InstanceEndEditable --></td>
                              </tr>
                          </table>
                        </div>
                        <div id="alliances">
                              <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                  <td height="30"  align="left" valign="top"><h2><a href="../about/alliances.html">Alliances</a></h2></td>
                                </tr>
                                <tr>
                                  <td  align="center" valign="middle"><!-- #BeginLibraryItem "/Library/AllianceTable.lbi" --><p>
    <table border="0" cellpadding="2" cellspacing="0">
                                    <tr>
                                      <td width="35"  align="center" valign="middle"> </td>
                                      <td  align="center" valign="middle"><a href="http://www.citi.mass.edu/" target="_blank"><img src="../images/logo_citi.jpg" alt="Citi" width="65" height="50"  border="0 /"></a></td>
                                      <td align="center" valign="middle"><a href="http://www.batec.org/index.php" target="_blank"><img src="../images/logo_batec.jpg" alt="BATEC" width="69" height="46" border="0" /></a></td>
                                      <td  align="center" valign="middle"><a href="http://www.nsf.gov/index.jsp" target="_blank"><img src="../images/nsflogo.gif" alt="NSF" width="64" height="65" border="0" ></a></td>
                                      <td  align="center" valign="middle"><a href="http://www.nelsamp.neu.edu/" target="_blank"><img src="../images/nelsamplogo.gif" width="100" border="0"></a></td>
                                      <td  align="center" valign="middle"><p><a href="http://mysite.verizon.net/milnerm/" target="_blank"><img src="../images/umlsamp.png" width="85" height="63" border="0"></a></p>                                  </td>
                                      <td  align="center" valign="middle"><a href="http://www.neagep.org/index.asp" target="_blank"><img src="../images/nealogo.gif" border="0" ></a></td>
      </tr>
                                  </table>
    <!-- #EndLibraryItem --></td>
                                </tr>
                          </table>
                        </div>
                    </div> <!-- end inner wrapper -->
                </div><!-- end wrapper right -->
            </div><!-- end wrapper left -->
            <div id="bottom">
                <div id="bottom_l">
                    <div id="bottom_r"> </div><!-- end bottom right -->
                </div><!-- end bottom left -->
            </div>  <!-- end bottom -->
        </div><!-- end wrapper -->
        <div id="copyright"><!-- #BeginLibraryItem "/Library/copyright.lbi" -->
    <p>Sponsored by CAITE an NSF CISE Broadening Participation in Computing Alliance<br />
    &copy; copyright 2008 <a href="http://www.umass.edu/" target="_blank">University of Massachusetts, Amherst</a></p>
    <font color="#666666"><br>
    </font>
    <p><font color="#666666" size=2>  This material is based upon work supported by the National Science Foundation under Grant No.s NSF-0634412 and NSF-0837739. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.</font> </p>
    <!-- #EndLibraryItem --></div>    
    <!-- end copyright -->
    <script type="text/javascript">
    var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
    document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
    </script>
    <script type="text/javascript">
    try {
    var pageTracker = _gat._getTracker("UA-7435501-1");
    pageTracker._trackPageview();
    } catch(err) {}</script>
        </body>
    <!-- InstanceEnd --></html>

  • I need help with a VB Application

    I need help with building an application and I am on a tight deadline.  Below I have included the specifics for what I need the application to do as well as the code that I have completed so far.  I am having trouble getting the data input into
    the text fields to save to a .txt file.  Also, I need validation to ensure that the values entered into the text fields coincide with the field type.  I am new to VB so please be gentle.  Any help would be appreciated.  Thanx
    •I need to use the OpenFileDialog and SaveFileDialog in my application.
    •Also, I need to use a structure.
    1. The application needs to prompt the user to enter the file name on Form_Load.
    2. Also, the app needs to use the AppendText method to write the Employee Data to the text file. My project should allow me to write multiple Employee Data to the same text file.  The data should be written to the text file in the following format (comma
    delimited)
    FirstName, MiddleName, LastName, EmployeeNumber, Department, Telephone, Extension, Email
    3. The Department dropdown menu DropDownStyle property should be set so that the user cannot enter inputs that are not in the menu.
    Public Class Form1
    Dim filename As String
    Dim oFile As System.IO.File
    Dim oWrite As System.IO.StreamWriter
    Dim openFileDialog1 As New OpenFileDialog()
    Dim fileLocation As String
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    openFileDialog1.InitialDirectory = "c:\"
    openFileDialog1.Filter = "Text files (*.txt)|*.txt|All files (*.*)|*.*"
    openFileDialog1.FilterIndex = 1
    openFileDialog1.RestoreDirectory = True
    If openFileDialog1.ShowDialog() = System.Windows.Forms.DialogResult.OK Then
    fileLocation = openFileDialog1.FileName
    End If
    'filename = InputBox("Enter output file name")
    'oWrite = oFile.CreateText(filename)
    cobDepartment.Items.Add("Accounting")
    cobDepartment.Items.Add("Administration")
    cobDepartment.Items.Add("Marketing")
    cobDepartment.Items.Add("MIS")
    cobDepartment.Items.Add("Sales")
    End Sub
    Private Sub btnSave_Click(ByValsender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click
    'oWrite.WriteLine("Write e file")
    oWrite.WriteLine("{0,10}{1,10}{2,10}{3,10}{4,10}{5,10}{6,10}{7,10}", txtFirstname.Text, txtMiddlename.Text, txtLastname.Text, txtEmployee.Text, cobDepartment.SelectedText, txtTelephone.Text, txtExtension.Text, txtEmail.Text)
    oWrite.WriteLine()
    End Sub
    Private Sub btnExit_Click(ByValsender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
    oWrite.Close()
    End
    End Sub
    Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click
    txtFirstname.Text = ""
    txtMiddlename.Text = ""
    txtLastname.Text = ""
    txtEmployee.Text = ""
    txtTelephone.Text = ""
    txtExtension.Text = ""
    txtEmail.Text = ""
    cobDepartment.SelectedText = ""
    End Sub
    End Class

    Hi Mikey81,
    Your issue is about VB programming, so Visual Basic forum is a better forum for your case. I moved this thread there,
    Thanks,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Need help with Berkeley XML DB Performance

    We need help with maximizing performance of our use of Berkeley XML DB. I am filling most of the 29 part question as listed by Oracle's BDB team.
    Berkeley DB XML Performance Questionnaire
    1. Describe the Performance area that you are measuring? What is the
    current performance? What are your performance goals you hope to
    achieve?
    We are measuring the performance while loading a document during
    web application startup. It is currently taking 10-12 seconds when
    only one user is on the system. We are trying to do some testing to
    get the load time when several users are on the system.
    We would like the load time to be 5 seconds or less.
    2. What Berkeley DB XML Version? Any optional configuration flags
    specified? Are you running with any special patches? Please specify?
    dbxml 2.4.13. No special patches.
    3. What Berkeley DB Version? Any optional configuration flags
    specified? Are you running with any special patches? Please Specify.
    bdb 4.6.21. No special patches.
    4. Processor name, speed and chipset?
    Intel Xeon CPU 5150 2.66GHz
    5. Operating System and Version?
    Red Hat Enterprise Linux Relase 4 Update 6
    6. Disk Drive Type and speed?
    Don't have that information
    7. File System Type? (such as EXT2, NTFS, Reiser)
    EXT3
    8. Physical Memory Available?
    4GB
    9. Are you using Replication (HA) with Berkeley DB XML? If so, please
    describe the network you are using, and the number of Replica’s.
    No
    10. Are you using a Remote Filesystem (NFS) ? If so, for which
    Berkeley DB XML/DB files?
    No
    11. What type of mutexes do you have configured? Did you specify
    –with-mutex=? Specify what you find inn your config.log, search
    for db_cv_mutex?
    None. Did not specify -with-mutex during bdb compilation
    12. Which API are you using (C++, Java, Perl, PHP, Python, other) ?
    Which compiler and version?
    Java 1.5
    13. If you are using an Application Server or Web Server, please
    provide the name and version?
    Oracle Appication Server 10.1.3.4.0
    14. Please provide your exact Environment Configuration Flags (include
    anything specified in you DB_CONFIG file)
    Default.
    15. Please provide your Container Configuration Flags?
    final EnvironmentConfig envConf = new EnvironmentConfig();
    envConf.setAllowCreate(true); // If the environment does not
    // exist, create it.
    envConf.setInitializeCache(true); // Turn on the shared memory
    // region.
    envConf.setInitializeLocking(true); // Turn on the locking subsystem.
    envConf.setInitializeLogging(true); // Turn on the logging subsystem.
    envConf.setTransactional(true); // Turn on the transactional
    // subsystem.
    envConf.setLockDetectMode(LockDetectMode.MINWRITE);
    envConf.setThreaded(true);
    envConf.setErrorStream(System.err);
    envConf.setCacheSize(1024*1024*64);
    envConf.setMaxLockers(2000);
    envConf.setMaxLocks(2000);
    envConf.setMaxLockObjects(2000);
    envConf.setTxnMaxActive(200);
    envConf.setTxnWriteNoSync(true);
    envConf.setMaxMutexes(40000);
    16. How many XML Containers do you have? For each one please specify:
    One.
    1. The Container Configuration Flags
              XmlContainerConfig xmlContainerConfig = new XmlContainerConfig();
              xmlContainerConfig.setTransactional(true);
    xmlContainerConfig.setIndexNodes(true);
    xmlContainerConfig.setReadUncommitted(true);
    2. How many documents?
    Everytime the user logs in, the current xml document is loaded from
    a oracle database table and put it in the Berkeley XML DB.
    The documents get deleted from XML DB when the Oracle application
    server container is stopped.
    The number of documents should start with zero initially and it
    will grow with every login.
    3. What type (node or wholedoc)?
    Node
    4. Please indicate the minimum, maximum and average size of
    documents?
    The minimum is about 2MB and the maximum could 20MB. The average
    mostly about 5MB.
    5. Are you using document data? If so please describe how?
    We are using document data only to save changes made
    to the application data in a web application. The final save goes
    to the relational database. Berkeley XML DB is just used to store
    temporary data since going to the relational database for each change
    will cause severe performance issues.
    17. Please describe the shape of one of your typical documents? Please
    do this by sending us a skeleton XML document.
    Due to the sensitive nature of the data, I can provide XML schema instead.
    18. What is the rate of document insertion/update required or
    expected? Are you doing partial node updates (via XmlModify) or
    replacing the document?
    The document is inserted during user login. Any change made to the application
    data grid or other data components gets saved in Berkeley DB. We also have
    an automatic save every two minutes. The final save from the application
    gets saved in a relational database.
    19. What is the query rate required/expected?
    Users will not be entering data rapidly. There will be lot of think time
    before the users enter/modify data in the web application. This is a pilot
    project but when we go live with this application, we will expect 25 users
    at the same time.
    20. XQuery -- supply some sample queries
    1. Please provide the Query Plan
    2. Are you using DBXML_INDEX_NODES?
    Yes.
    3. Display the indices you have defined for the specific query.
         XmlIndexSpecification spec = container.getIndexSpecification();
         // ids
         spec.addIndex("", "id", XmlIndexSpecification.PATH_NODE | XmlIndexSpecification.NODE_ATTRIBUTE | XmlIndexSpecification.KEY_EQUALITY, XmlValue.STRING);
         spec.addIndex("", "idref", XmlIndexSpecification.PATH_NODE | XmlIndexSpecification.NODE_ATTRIBUTE | XmlIndexSpecification.KEY_EQUALITY, XmlValue.STRING);
         // index to cover AttributeValue/Description
         spec.addIndex("", "Description", XmlIndexSpecification.PATH_EDGE | XmlIndexSpecification.NODE_ELEMENT | XmlIndexSpecification.KEY_SUBSTRING, XmlValue.STRING);
         // cover AttributeValue/@value
         spec.addIndex("", "value", XmlIndexSpecification.PATH_EDGE | XmlIndexSpecification.NODE_ATTRIBUTE | XmlIndexSpecification.KEY_EQUALITY, XmlValue.STRING);
         // item attribute values
         spec.addIndex("", "type", XmlIndexSpecification.PATH_EDGE | XmlIndexSpecification.NODE_ATTRIBUTE | XmlIndexSpecification.KEY_EQUALITY, XmlValue.STRING);
         // default index
         spec.addDefaultIndex(XmlIndexSpecification.PATH_NODE | XmlIndexSpecification.NODE_ELEMENT | XmlIndexSpecification.KEY_EQUALITY, XmlValue.STRING);
         spec.addDefaultIndex(XmlIndexSpecification.PATH_NODE | XmlIndexSpecification.NODE_ATTRIBUTE | XmlIndexSpecification.KEY_EQUALITY, XmlValue.STRING);
         // save the spec to the container
         XmlUpdateContext uc = xmlManager.createUpdateContext();
         container.setIndexSpecification(spec, uc);
    4. If this is a large query, please consider sending a smaller
    query (and query plan) that demonstrates the problem.
    21. Are you running with Transactions? If so please provide any
    transactions flags you specify with any API calls.
    Yes. READ_UNCOMMITED in some and READ_COMMITTED in other transactions.
    22. If your application is transactional, are your log files stored on
    the same disk as your containers/databases?
    Yes.
    23. Do you use AUTO_COMMIT?
         No.
    24. Please list any non-transactional operations performed?
    No.
    25. How many threads of control are running? How many threads in read
    only mode? How many threads are updating?
    We use Berkeley XML DB within the context of a struts web application.
    Each user logged into the web application will be running a bdb transactoin
    within the context of a struts action thread.
    26. Please include a paragraph describing the performance measurements
    you have made. Please specifically list any Berkeley DB operations
    where the performance is currently insufficient.
    We are clocking 10-12 seconds of loading a document from dbd when
    five users are on the system.
    getContainer().getDocument(documentName);
    27. What performance level do you hope to achieve?
    We would like to get less than 5 seconds when 25 users are on the system.
    28. Please send us the output of the following db_stat utility commands
    after your application has been running under "normal" load for some
    period of time:
    % db_stat -h database environment -c
    % db_stat -h database environment -l
    % db_stat -h database environment -m
    % db_stat -h database environment -r
    % db_stat -h database environment -t
    (These commands require the db_stat utility access a shared database
    environment. If your application has a private environment, please
    remove the DB_PRIVATE flag used when the environment is created, so
    you can obtain these measurements. If removing the DB_PRIVATE flag
    is not possible, let us know and we can discuss alternatives with
    you.)
    If your application has periods of "good" and "bad" performance,
    please run the above list of commands several times, during both
    good and bad periods, and additionally specify the -Z flags (so
    the output of each command isn't cumulative).
    When possible, please run basic system performance reporting tools
    during the time you are measuring the application's performance.
    For example, on UNIX systems, the vmstat and iostat utilities are
    good choices.
    Will give this information soon.
    29. Are there any other significant applications running on this
    system? Are you using Berkeley DB outside of Berkeley DB XML?
    Please describe the application?
    No to the first two questions.
    The web application is an online review of test questions. The users
    login and then review the items one by one. The relational database
    holds the data in xml. During application load, the application
    retrieves the xml and then saves it to bdb. While the user
    is making changes to the data in the application, it writes those
    changes to bdb. Finally when the user hits the SAVE button, the data
    gets saved to the relational database. We also have an automatic save
    every two minues, which saves bdb xml data and saves it to relational
    database.
    Thanks,
    Madhav
    [email protected]

    Could it be that you simply do not have set up indexes to support your query? If so, you could do some basic testing using the dbxml shell:
    milu@colinux:~/xpg > dbxml -h ~/dbenv
    Joined existing environment
    dbxml> setverbose 7 2
    dbxml> open tv.dbxml
    dbxml> listIndexes
    dbxml> query     { collection()[//@date-tip]/*[@chID = ('ard','zdf')] (: example :) }
    dbxml> queryplan { collection()[//@date-tip]/*[@chID = ('ard','zdf')] (: example :) }Verbosity will make the engine display some (rather cryptic) information on index usage. I can't remember where the output is explained; my feeling is that "V(...)" means the index is being used (which is good), but that observation may not be accurate. Note that some details in the setVerbose command could differ, as I'm using 2.4.16 while you're using 2.4.13.
    Also, take a look at the query plan. You can post it here and some people will be able to diagnose it.
    Michael Ludwig

  • Need help with navigation within a spark list...

    hey guys, so in my application when you click on a list item, it opens up an image, and along with the image a few buttons are created dynamically...
    the image and the url/labels for the dynamic buttons is provided through an xml/xmlListCollection.
    what i need help with is the url or more specifically when you click on one of these dynamic buttons it needs to navigate me to another part of an list or display a certain set of images that is not in my spark list...
    please let me know if this makes no sence
    the code i have is
    <code>
        [Bindable] private var menuXml:XML;
        [Bindable] private var imgList:XMLListCollection = new XMLListCollection();
        [Bindable] private var navControl:XMLListCollection = new XMLListCollection();
        [Bindable] private var fullList:XMLListCollection = new XMLListCollection();
        private var returnedXml:XMLListCollection = new XMLListCollection();
        private var myXmlSource:XML = new XML();
        //[Bindable] private var xmlReturn:Object;
        private var currImage:int = 0;
        //public var userOpProv:XMLListCollection = new XMLListCollection();
        //private var troubleShootProvider:XMLListCollection = new XMLListCollection();
        private function myXml_resultHandeler(event:ResultEvent):void{
            userOptionProvider.source = event.result.apx32.userOptions.children();
            troubleShootProvider.source = event.result.apx32.troubleShooting.children();
            fullList.source = event.result.apx32.children();
            returnedXml.source = event.result[0].children();
            myXmlSource = event.result[0];
        private function myXml_faultHandler(event:FaultEvent):void{
            Alert.show("Error loading XML");
            Alert.show(event.fault.message);
        private function app_creationComplete(event:FlexEvent):void{
            userOptions.scroller.setStyle("horizontalScrollPolicy", ScrollPolicy.OFF);
            myXml.send();
            //trouble.scroller.setStyle("horizontalScrollPolicy", ScrollPolicy.OFF);
            myXml = new HTTPService();
            myXml.url = "modules/apx32/apx32TroubleshootingXml.xml";
            myXml.resultFormat = "e4x";
            myXml.addEventListener(ResultEvent.RESULT, myXml_resultHandeler);
            myXml.addEventListener(FaultEvent.FAULT, myXml_faultHandler);
            myXml.send();
        private function troubleShootChange(event:IndexChangeEvent):void{
            dynamicButtons.removeAllElements();
            navControl.source = troubleShootProvider[event.newIndex].children();
            currImage = 0;
            imgList.source = troubleShootProvider[event.newIndex].images.children();
            definition.source = imgList[currImage].@url;
            if(imgList[currImage].@details == "true"){
                if(imgList[currImage].buttons.@hasButtons == "true"){
                    for each(var item:XML in imgList[currImage].buttons.children()){
                        var newButton:LinkButton = new LinkButton();
                        newButton.label = item.@name;
                        newButton.x = item.@posX;
                        newButton.y = item.@posY;
                        newButton.setStyle("skin", null);
                        newButton.styleName = "dynamicButtonStyle";
                        dynamicButtons.addElement(newButton);
            //var isMultiPage:String = navControl[2]["multiPages"];
            //trace(isMultiPage);
            //        if(isMultiPage){
            if(currImage >= imgList.length - 1){
                next.visible = false;
                back.visible = false;
            else{
                back.visible = false;
                next.visible = true;
        private function customButtonPressed(event:Event):void{
            if(imgList[currImage].button.@changeTo != ""){
        private function userOptionsChange(event:IndexChangeEvent):void{
            dynamicButtons.removeAllElements();
            navControl.source = userOptionProvider[event.newIndex].children();
            currImage = 0;
            imgList.source = userOptionProvider[event.newIndex].images.children();
            definition.source = imgList[currImage].@url;
            if(imgList[currImage].@details == "true"){
                if(imgList[currImage].buttons.@hasButtons == "true"){
                    for each(var item:XML in imgList[currImage].buttons.children()){
                        var newButton:LinkButton = new LinkButton();
                        newButton.label = item.@name;
                        newButton.x = item.@posX;
                        newButton.y = item.@posY;
                        newButton.setStyle("skin", null);
                        newButton.styleName = "dynamicButtonStyle";
                        newButton.addEventListener(MouseEvent.MOUSE_DOWN, customButtonPressed);
                        dynamicButtons.addElement(newButton);
            var isMultiPage:String = navControl[2]["multiPages"];
            if(isMultiPage == "true"){
                if(navControl[2]["next"] == "NEXT STEP"){
                    navContainer.x = 630;
                else{
                    navContainer.x = 640;
                next.label = navControl[2]["next"];
                back.label = navControl[2]["back"];
            if(currImage >= imgList.length - 1){
                next.visible = false;
                back.visible = false;
            else{
                back.visible = false;
                next.visible = true;
        private function nextClickHandler(event:MouseEvent):void{
            currImage += 1;
            dynamicButtons.removeAllElements();
            if(currImage >= imgList.length-1){
                currImage = imgList.length - 1;
                //next.visible = false;
                next.label = "YOU'RE DONE";
            else
                next.label = navControl[2]["next"];
            back.visible = true;
            if(imgList[currImage].@details == "true"){
                if(imgList[currImage].buttons.@hasButtons == "true"){
                    for each(var item:XML in imgList[currImage].buttons.children()){
                        var newButton:LinkButton = new LinkButton();
                        newButton.label = item.@name;
                        newButton.x = item.@posX;
                        newButton.y = item.@posY;
                        newButton.setStyle("skin", null);
                        newButton.styleName = "dynamicButtonStyle";
                        dynamicButtons.addElement(newButton);
            definition.source = imgList[currImage].@url;
        private function backClickHandler(event:MouseEvent):void{
            currImage -= 1;
            dynamicButtons.removeAllElements();
            if(currImage == 0){
                back.visible = false;
            next.visible = true;
            next.label = navControl[2]["next"];
            if(imgList[currImage].@details == "true"){
                if(imgList[currImage].buttons.@hasButtons == "true"){
                    for each(var item:XML in imgList[currImage].buttons.children()){
                        var newButton:LinkButton = new LinkButton();
                        newButton.label = item.@name;
                        newButton.x = item.@posX;
                        newButton.y = item.@posY;
                        newButton.setStyle("skin", null);
                        newButton.styleName = "dynamicButtonStyle";
                        dynamicButtons.addElement(newButton);
            definition.source = imgList[currImage].@url;
    </code>
    i have attached a copy of the xml that i have right now to this post for reference...
    any help will be greatly appretiated!!! i've been stuck on this problem for the last week and my project is due soon
    again thank you in advance...

    hey david... just nevermind my previous post... I was able to subclass a link button, so i now have two variables that get assigned to a link button,
    one is "tabId" <-- contains the information on which tab to swtich to, and the second is, "changeTo"... this contans the label name which it needs to switch to
    I'm just stuck on how to change my selected item in my tabNavigator/list
    the code i have right now is
        private function customButtonPressed(event:Event):void{
            if(event.currentTarget.tabId == "troubleShooting"){
                for each(var item:Object in troubleShootProvider){
                    if(item.@label == event.currentTarget.changeTo){
        private function userOptionsChange(event:IndexChangeEvent):void{
            dynamicButtons.removeAllElements();
            navControl.source = userOptionProvider[event.newIndex].children();
            currImage = 0;
            imgList.source = userOptionProvider[event.newIndex].images.children();
            definition.source = imgList[currImage].@url;
            if(imgList[currImage].@details == "true"){
                if(imgList[currImage].buttons.@hasButtons == "true"){
                    for each(var item:XML in imgList[currImage].buttons.children()){
                        var newButton:customLinkButton = new customLinkButton();
                        newButton.label = item.@name;
                        newButton.tabId = item.@tab;
                        newButton.changeTo = item.@changeTo;
                        newButton.x = item.@posX;
                        newButton.y = item.@posY;
                        newButton.setStyle("skin", null);
                        newButton.styleName = "dynamicButtonStyle";
                        newButton.addEventListener(MouseEvent.MOUSE_DOWN, customButtonPressed);
                        dynamicButtons.addElement(newButton);
            var isMultiPage:String = navControl[2]["multiPages"];
            var videoPresent:String = navControl[1]["videoPresent"];
            if(videoPresent == "true"){
                if(isMultiPage != "true"){
                    navContainer.x = 825;
            if(isMultiPage == "true"){
                if(navControl[2]["next"] == "NEXT STEP"){
                    navContainer.x = 630;
                else{
                    navContainer.x = 640;
                next.label = navControl[2]["next"];
                back.label = navControl[2]["back"];
            if(currImage >= imgList.length - 1){
                next.visible = false;
                back.visible = false;
            else{
                back.visible = false;
                next.visible = true;
    as you know, my xml gets divided into two saperate xmllistcollections one is the userOptionProvider, and the troubleshootingProvider
    as is in the following xml
    <mx:TabNavigator id="tabNav" width="275" tabStyleName="tabStyle" fontWeight="bold" height="400" paddingTop="0"
                             tabWidth="137.5" creationPolicy="all" borderVisible="false">
                <mx:VBox label="USER OPTIONS" width="100%" height="100%" horizontalScrollPolicy="off" verticalScrollPolicy="off">
                    <s:List id="userOptions" width="100%" height="100%" itemRenderer="modules.apx32.myComponents.listRenderer"
                            borderVisible="false" contentBackgroundColor="#e9e9e9"
                            change="userOptionsChange(event)">
                        <s:dataProvider>
                            <s:XMLListCollection id="userOptionProvider" />
                        </s:dataProvider>
                    </s:List>
                </mx:VBox>
                <mx:VBox label="TROUBLESHOOTING">
                    <s:List id="trouble" width="100%" height="100%" itemRenderer="modules.apx32.myComponents.listRenderer"
                            borderAlpha="0" borderVisible="false" contentBackgroundColor="#e9e9e9"
                            change="troubleShootChange(event)">
                        <s:dataProvider>
                            <s:XMLListCollection id="troubleShootProvider" />
                        </s:dataProvider>
                    </s:List>
                </mx:VBox>
            </mx:TabNavigator>
    Im having some trouble updating my list... basically change to the troubleshooting tab, and then select the one that i need...
    hopefully that makes sence...

Maybe you are looking for

  • 1st generation ipod won't download music

    My firend just bought a 1st generation ipod and was only able to download a couple songs. He asked me if I could try and download some of my music on it cause I have a 20GB ipod of my own that works perfectly fine. But when I plug it in it just sits

  • Can't figure this out- cable connection vs wifi connection

    Can't figure this out: when my 13" MBP is connected wirelessly to my Airport base station, my iPad can see it. When I connect the MBP to the base station via ethernet cable (for faster connection), the iPad can no longer see it. Note: my airport is n

  • Pageflow-scoped bean "disappearing" during postbacks

    Hello, I'm getting crazy with an error with a pageflow-scoped bean which suddenly "disappers"... What I need to do is to use a bean to mantain the visibility status of 2 components (one is visible while the other isn't), an edit form and a warning me

  • Multi-language in one report

    Hi, I would just like to confirm that it is still not possible to show three languages in one report. We have description fields (segments of an account combination) that should have English values for the English language, Hebrew for the Hebrew lang

  • Stop running vi from another vi

    Hello All, I have some vi that is running in background and i want to stop it from another vi. The problem is that if i haven't refnum to it, i don't know how to do that. Any suggestions?