WPC Link List Formatting

Does anyone know how to change the formatting for the Link List in WPC.  Right now the header shows up grey with black text and the body is white.  I would like to have the body be transparent and the header background blue.  If anyone knows how to achieve this please share!

Hi,
in the corresponding document list definition there is xsl which can be changed to use other css. So, for the link list it is: /etc/wpceditor/styles/wpc_link_list_right.xsl
best,
--epexpert

Similar Messages

  • How do you change the font in WPC Link List Header ...

    Does any one know how/where to change the font in Web Page Composer on the Link List Header?  I am using the Link List header delivered with the product. 
    It looks like it is pulling arial font but we are adding content in a different font in the paragraphs and want the fonts to be the same.  Is there something I can change in the theme?
    thanks
    Angie.

    You need to go to the
    Content Adminstration/KM Content/etc/wpceditor/css/runtime  and look in the sdn_general.css file.  The controls are all there.  You can rename or create a new style sheet as this will modify all WPC sites.

  • WPC - link list, teaser and etc cannot appear in web page

    dear expert,
    i have created web page using web page composer. in the web page i added link list, teaser, banner and etc..but when i published the web page,the link list, teaser and etc cannot display. Error "Cannot render container : An error occurred while loading the document from the resource content" was appeared. any idea what error is?
    thanx in advance,
    faeza

    Hi all,
    Thank you on all your points. I have fixed this problem. the problem is the /etc repository is not working. To check it i refer to SAP Note 1178294 regarding /etc repository in cluster environment. The /etc repository is used by the XML form. All my content in my web page such link list, teaser and etc is most often built using XML form.
    Regards,
    Faeza

  • Link List Font

    I am trying to change the font size on the WPC Link List because it is very small.  I have added Font-Size to all the .css Files in etc/wpceditor/styles but nothing changes.  I have even created my own CSS and added the classes (wpcul, wpca, and wpch4) used by the link list but still nothing?
    Perhaps this is a setting in the Theme?  Or else what am I missing here?

    TA,
    I have had similar issues and a work around for this would be to make a copy of the content and increase the size in MS Word and then copy the content onto WPC link list.
    Hope this helps.
    Cheers!
    Sandeep Tudumu

  • WPC - highlighting the link of the current page in the link list

    Hi,
    is there any way to highlight a link in my linklist if it's the link to the page i am currently visiting?
    That would make it possible for me to customize the link list form and change it into some kind of "tab"-list form where the current tab is highlighted.
    A solution via xsl would be fantastic.
    Thanks for your support.
    Sebastian

    You can submit ideas here - http://hendrix.mozilla.org/
    The [https://addons.mozilla.org/firefox/addon/3880/ Add Bookmark Here ²] extension does what you want.

  • Creating a new WPC Content Layout for a Link List

    Hello all,
      As I've been lurking about the innards of Web Page Composer, I noticed that the Link List contains two different XSLTs for it representing different "Content Layouts".
      Has anyone added a new Content Layout for an item?  If so would they happen to have some high level steps on accomplishing it?  It doesn't appear to be as difficult as some of the other custom configurations in adding new content types and new forms. So far I suspect the steps are:
    Create the new XSLT and upload to KM.
    Go to System Admin/System Configuration/KM/CM/Editor/Stylesheets/Stylesheets and hook up the XSLT to the engine
    Go to System Admin/System Configuration/KM/CM/Editor/Stylesheets/Stylesheet Groups/Document Styles Groups and add the stylesheet to the lists group.
    Bounce the Portal
    That seems to be it, but it would shock me if it was all that was required.
    Any thoughts?

    So I answered my own question.
    It is as simple as I listed above. To create a new list rendering:
    Simply create the new XSLT and stick it under /etc/wpceditor/styles
    Then create the StyleSheet reference under: System Admin/System Configuration/KM/CM/Editor/Stylesheets/Stylesheets.
    Then add the StyleSheet reference to the "lists" group.
    Bounce the portal.
    You'll have a new option when you select the style.

  • Need help regarding Linked List

    I'm a beginner who just spent ages working on the following code.. but need help on re-implementing the following using a linked list, i.e. no array is allowed for customer records but you still can use arrays for names, address, etc.. Hopefully I've inserted enough comments..
    Help very much appreciated!! Thanks! =]
    import java.util.Scanner;
    import java.io.*;
    public class Bank
    /* Private variables declared so that the data is only accessible to its own
         class, but not to any other class, thus preventing other classes from
         referring to the data directly */
    private static Customer[] customerList = new Customer[30];               
         //Array of 30 objects created for storing information of each customer
    private static int noOfCustomers;                                                       
         //Integer used to store number of customers in customerList
         public static void main(String[] args)
              Scanner sc = new Scanner(System.in);
              menu();
         public static void menu()
              char choice;
              String filename;
              int custId,counter=0;
              double interestRate;
    Scanner sc = new Scanner(System.in);
              do
              //Displaying of Program Menu for user to choose
         System.out.println("ABC Bank Customer Management System Menu");     
         System.out.println("========================================");
         System.out.println("(1) Input Data from File");
         System.out.println("(2) Display Data");
         System.out.println("(3) Output Data to File");
                   System.out.println("(4) Delete Record");
                   System.out.println("(5) Update Record");
         System.out.println("(Q) Quit");
                   System.out.println();
                   System.out.print("Enter your choice: ");
                   String input = sc.next();
                   System.out.println();
                   choice = input.charAt(0);     
              //switch statement used to assign each 'selection' to its 'operation'               
         switch(choice)
         case '1': int noOfRecords;
                                       System.out.print("Enter file name: ");
              sc.nextLine();                                             
              filename = sc.nextLine();
                                       System.out.println();
              noOfRecords = readFile(filename);
    System.out.println(+noOfRecords+" records read.");
              break;
         case '2': displayRecords();
              break;
         case '3': writeFile();
         break;
                        case '4': System.out.print("Enter account ID to be deleted: ");
                                       sc.nextLine();
                                       custId = sc.nextInt();
                                       deleteRecord(custId);
                                       break;
                        case '5': if(counter==0)
              System.out.print("Enter current interest rate for saving account: ");
                                            sc.nextLine();
                                            interestRate = sc.nextDouble();
                                            update(interestRate);
                                            counter++;
                                       else
              System.out.println("Error: Accounts have been updated for the month.");
                                            break;
                   }System.out.println();
         }while(choice!='Q' && choice!='q');
    /* The method readFile() loads the customer list of a Bank from a specified
         text file fileName into customerList to be stored as array of Customer
         objects in customerList in ascending alphabetical order according to the
         customer names */
    public static int readFile(String fileName)
         int custId,i=0;
              String custName,custAddress,custBirthdate,custPhone,custAccType;
              double custBalance,curRate;
              boolean d;
    /* Try block to enclose statements that might throw an exception, followed by
         the catch block to handle the exception */
    try
                   Scanner sc = new Scanner(new File(fileName));
    while(sc.hasNext())          
    /* sc.next() gets rid of "Account", "Id" and "=" */
    sc.next();sc.next();sc.next();
    custId = sc.nextInt();
                        d=checkDuplicate(custId);               
    /* checkDuplicate() is a method created to locate duplicating ids in array */
    if(d==true)
    /* A return value of true indicates duplicating record and the sc.nextLine()
         will get rid of all the following lines to read the next customer's record */
                             sc.nextLine();sc.nextLine();sc.nextLine();
                             sc.nextLine();sc.nextLine();sc.nextLine();
                             continue;     
    /* A return value of false indicates no duplicating record and the following
         lines containing the information of that customer's record is being read
         in */
                        if(d==false)
    /* sc.next() gets rid of "Name" and "=" and name is changed to upper case*/
         sc.next();sc.next();
         custName = sc.nextLine().toUpperCase();
    /* sc.nextLine get rids of the following lines to read the next customer's
         record if length of name is more than 20 characters*/
         if(custName.length()>21)
    System.out.println("Name of custId "+custId+" is more than 20 characters");
                                  System.out.println();
         sc.nextLine();sc.nextLine();sc.nextLine();sc.nextLine();
         continue;
    /* sc.next() gets rid of "Address" and "=" */           
         sc.next();sc.next();
         custAddress = sc.nextLine();
    /* sc.nextLine get rids of the following lines to read the next customer's
         record if length of address is more than 80 characters*/                         
                             if(custAddress.length()>81)
    System.out.println("Address of custId "+custId+" is more than 80 characters");
                                  System.out.println();
         sc.nextLine();sc.nextLine();sc.nextLine();sc.nextLine();
         continue;
    /* sc.next() gets rid of "DOB" and "=" */                              
         sc.next();sc.next();
         custBirthdate = sc.nextLine();
    /* sc.nextLine get rids of the following lines to read the next customer's
         record if length of date of birth is more than 10 characters*/                         
                             if(custBirthdate.length()>11)
    System.out.println("D.O.B of custId "+custId+" is more than 10 characters");
                                  System.out.println();
         sc.nextLine();sc.nextLine();sc.nextLine();sc.nextLine();
         continue;
    /* sc.next() gets rid of "Phone", "Number" and "=" */                              
         sc.next();sc.next();sc.next();
         custPhone = sc.nextLine();
    /* sc.nextLine get rids of the following lines to read the next customer's
         record if length of phone number is more than 8 characters*/                         
                             if(custPhone.length()>9)
    System.out.println("Phone no. of custId "+custId+" is more than 8 characters");
                                  System.out.println();
         sc.nextLine();sc.nextLine();sc.nextLine();sc.nextLine();
         continue;
    /* sc.next() gets rid of "Account", "Balance" and "=" */                              
         sc.next();sc.next();sc.next();
         custBalance = sc.nextDouble();
    /* sc.next() gets rid of "Account", "Type" and "=" */                              
                             sc.next();sc.next();sc.next();
                             custAccType = sc.next();
                             if(custAccType.equals("Saving"))
    customerList[noOfCustomers] = new Account1(custId,custName,custAddress,custBirthdate,custPhone,custBalance,custAccType);
    sc.nextLine();
                                                 noOfCustomers++;
                                                 i++;
    else if(custAccType.equals("Checking"))
    customerList[noOfCustomers] = new Account2(custId,custName,custAddress,custBirthdate,custPhone,custBalance,custAccType);
                                                 sc.nextLine();
                                                 noOfCustomers++;
                                                 i++;
    else if(custAccType.equals("Fixed"))
    sc.next();sc.next();sc.next();sc.next();
                                                 curRate = sc.nextDouble();
                                                 Account3 temp = new Account3(custId,custName,custAddress,custBirthdate,custPhone,custBalance,custAccType,curRate);
                                                 customerList[noOfCustomers]=temp;
                                                 sc.nextLine();
                                                 noOfCustomers++;
                                                 i++;
                             else
                                  System.out.println("Account type not defined.");
         if(noOfCustomers==30)
         System.out.println("The customer list has reached its maximum limit of 30 records!");
         System.out.println();
         return noOfCustomers;
    //Exceptions to be caught
    catch (FileNotFoundException e)
    System.out.println("Error opening file");
    System.exit(0);
    catch (IOException e)
    System.out.println("IO error!");
    System.exit(0);
    /* Bubblesort method used to sort the array in ascending alphabetical order
         according to customer's name */
    bubbleSort(customerList);
              return i;
    /* The method displayRecords() displays the data of the customer records on
         screen */
    public static void displayRecords()
    int k;
    /* Displaying text using the printf() method */
         for(k=0;k<noOfCustomers;k++)
         System.out.printf("Name = %s\n", customerList[k].getName());
         System.out.printf("Account Balance = %.2f\n", customerList[k].getBalance());
         System.out.printf("Account Id = %d\n", customerList[k].getId());
    System.out.printf("Address = %s\n", customerList[k].getAddress());
    System.out.printf("DOB = %s\n", customerList[k].getBirthdate());
    System.out.printf("Phone Number = %s\n", customerList[k].getPhone());
         String type = customerList[k].getAccType();
         System.out.println("Account Type = " +type);
    if(type.equals("Fixed"))
         System.out.println("Fixed daily interest = "+((Account3)customerList[k]).getFixed());
         System.out.println();               
    /* The method writeFile() saves the content from customerList into a
         specified text file. Data is printed on the screen at the same time */
    public static void writeFile()
    /* Try block to enclose statements that might throw an exception, followed by
    the catch block to handle the exception */
    try
    int i;
              int n=0;
    //PrintWriter class used to write contents of studentList to specified file
              FileWriter fwStream = new FileWriter("newCustomers.txt");
              BufferedWriter bwStream = new BufferedWriter(fwStream);
              PrintWriter pwStream = new PrintWriter(bwStream);     
    for(i=0;i<noOfCustomers;i++)
         pwStream.println("Account Id = "+customerList.getId());
              pwStream.println("Name = "+customerList[i].getName());
    pwStream.println("Address = "+customerList[i].getAddress());
    pwStream.println("DOB = "+customerList[i].getBirthdate());
    pwStream.println("Phone Number = "+customerList[i].getPhone());
              pwStream.printf("Account Balance = %.2f\n", customerList[i].getBalance());
              pwStream.println("Account Type = "+customerList[i].getAccType());
                   if(customerList[i].getAccType().equals("Fixed"))
                        pwStream.println("Fixed Daily Interest = "+((Account3)customerList[i]).getFixed());
              pwStream.println();
              n++;
    //Closure of stream
    pwStream.close();
              System.out.println(+n+" records written.");
    catch(IOException e)
    System.out.println("IO error!");     
    System.exit(0);
         //Deletes specified record from list
    public static void deleteRecord(int id)
    int i;
              i=locate(id);
    if(i==200)
    //checking if account to be deleted does not exist
    System.out.println("Error: no account with the id of "+id+" found!");
              //if account exists
    else
                        while(i<noOfCustomers)
                             customerList[i] = customerList[i+1];
                             i++;
                        System.out.println("Account Id: "+id+" has been deleted");
                        --noOfCustomers;
         //Updates the accounts
    public static void update(double interest)
    int i,j,k;
              double custBalance,addition=0;
    for(i=0;i<noOfCustomers;i++)
                        if(customerList[i] instanceof Account1)
                             for(j=0;j<30;j++)
                                  addition=customerList[i].getBalance()*interest;
                                  custBalance=customerList[i].getBalance()+addition;
                                  customerList[i].setBalance(custBalance);
                        else if(customerList[i] instanceof Account2)
                             continue;
                        else if(customerList[i] instanceof Account3)
                             for(j=0;j<30;j++)
    addition=customerList[i].getBalance()*((Account3)customerList[i]).getFixed();
    custBalance=customerList[i].getBalance()+addition;
    customerList[i].setBalance(custBalance);
                        else
                             System.out.println("Account type not defined");
              System.out.println("The updated balances are: \n");
              for(k=0;k<noOfCustomers;k++)
    System.out.printf("Name = %s\n", customerList[k].getName());
    System.out.printf("Account Balance = %.2f\n", customerList[k].getBalance());
    System.out.println();
    /* ================== Additional methods ==================== */     
    /* Bubblesort method to sort the customerList in ascending alphabetical
         order according to customer's name */
    public static void bubbleSort(Customer[] x)
    int pass, index;
    Customer tempValue;      
    for(pass=0; pass<noOfCustomers-1; pass++)          
    for(index=0; index<noOfCustomers-1; index++)
    if(customerList[index].getName().compareToIgnoreCase(customerList[index+1].getName()) > 0)
    tempValue = x[index];
    x[index] = x[index+1];
    x[index+1]= tempValue;
    /* Method used to check for duplicated ids in array */     
         public static boolean checkDuplicate(int id)
              int i;
              for(i=0;i<noOfCustomers;i++)
                   if(id == customerList[i].getId())
    System.out.println("Account Id = "+id+" already exists");
                        System.out.println();
    return true;
              }return false;
    /* Method to seach for account id in array */
         public static int locate(int id)
              int j;
              for(j=0;j<noOfCustomers;j++)
                   if(customerList[j].getId()==id)
                        return j;
              j=200;
              return j;
    import java.util.Scanner;
    public class Customer
    /* The following private variables are declared so that the data is only
         accessible to its own class,but not to any other class, thus preventing
         other classes from referring to the data directly */
         protected int id;               
         protected String name,address,birthdate,phone,accType;                              
         protected double balance;               
    // Null constructor of Customer
         public Customer()
              id = 0;
              name = null;
              address = null;
              birthdate = null;
              phone = null;
              balance = 0;
              accType = null;
    /* The following statements with the keyword this activates the Customer
         (int id, String name String address, String birthdate, String phone, double
         balance) constructor that has six parameters of account id, name, address,
         date of birth, phone number, account balance and assign the values of the
         parameters to the instance variables of the object */     
         public Customer(int id, String name, String address, String birthdate, String phone, double balance, String accType)
    //this is the object reference that stores the receiver object     
              this.id = id;
              this.name = name;                         
              this.address = address;
              this.birthdate = birthdate;
              this.phone = phone;
              this.balance = balance;
              this.accType = accType;
    /* The following get methods getId(), getName(), getAddress(), getBirthdate(),
         getPhone(), getBalance() return the values of the corresponding instance
         properties */     
         public int getId()
              return id;
         public String getName()
              return name;
         public String getAddress()
              return address;
         public String getBirthdate()
              return birthdate;
         public String getPhone()
              return phone;
         public double getBalance()
              return balance;
         public String getAccType()
              return accType;
    /* The following set methods setId(), setName(), setAddress(), setBirthdate(),
         setPhone and setBalance() set the values of the corresponding instance
         properties */
         public void setId (int custId)
              id = custId;
         public void setName(String custName)
              name = custName;
         public void setAddress (String custAddress)
              address = custAddress;
         public void setBirthdate (String custBirthdate)
              birthdate = custBirthdate;
         public void setPhone (String custPhone)
              phone = custPhone;
         public void setBalance (double custBalance)
              balance = custBalance;
         public void setAccType (String custAccType)
              accType = custAccType;
    class Account1 extends Customer
         public Account1(int id, String name, String address, String birthdate, String phone, double balance, String accType)
              super(id,name,address,birthdate,phone,balance,accType);
              this.id = id;
              this.name = name;                         
              this.address = address;
              this.birthdate = birthdate;
              this.phone = phone;
              this.balance = balance;
              this.accType = accType;
    class Account2 extends Customer
         public Account2(int id, String name, String address, String birthdate, String phone, double balance, String accType)
              super(id,name,address,birthdate,phone,balance,accType);
              this.id = id;
              this.name = name;                         
              this.address = address;
              this.birthdate = birthdate;
              this.phone = phone;
              this.balance = balance;
              this.accType = accType;
    class Account3 extends Customer
         protected double fixed=0;
         public Account3(int id, String name, String address, String birthdate, String phone, double balance, String accType, double fixed)
              super(id,name,address,birthdate,phone,balance,accType);
              this.id = id;
              this.name = name;                         
              this.address = address;
              this.birthdate = birthdate;
              this.phone = phone;
              this.balance = balance;
              this.accType = accType;
              this.fixed = fixed;
         public double getFixed()
              return fixed;
    Example of a customers.txt
    Account Id = 123
    Name = Matt Damon
    Address = 465 Ripley Boulevard, Oscar Mansion, Singapore 7666322
    DOB = 10-10-1970
    Phone Number = 790-3233
    Account Balance = 405600.00
    Account Type = Fixed
    Fixed Daily Interest = 0.05
    Account Id = 126
    Name = Ben Affleck
    Address = 200 Hunting Street, Singapore 784563
    DOB = 25-10-1968
    Phone Number = 432-4579
    Account Balance = 530045.00
    Account Type = Saving
    Account Id = 65
    Name = Salma Hayek
    Address = 45 Mexican Boulevard, Hotel California, Singapore 467822
    DOB = 06-04-73
    Phone Number = 790-0000
    Account Balance = 2345.00
    Account Type = Checking
    Account Id = 78
    Name = Phua Chu Kang
    Address = 50 PCK Avenue, Singapore 639798
    DOB = 11-08-64
    Phone Number = 345-6780
    Account Balance = 0.00
    Account Type = Checking
    Account Id = 234
    Name = Zoe Tay
    Address = 100 Blue Eyed St, Singapore 456872
    DOB = 15-02-68
    Phone Number = 456-1234
    Account Balance = 600.00
    Account Type = Saving

    1) When you post code, please use[code] and [/code] tags as described in Formatting tips on the message entry page. It makes it much easier to read.
    2) Don't just post a huge pile of code and ask, "How do I make this work?" Ask a specific question, and post just enough code to demonstrate the problem you're having.
    3) Don't just write a huge pile of code and then test it. Write a tiny piece, test it. Then write the piece that will work with or use the first piece. Test that by itself--without the first piece. Then put the two together and test that. Only move on to the next step after the current step produces the correct results. Continue this process until you have a complete, working program.

  • Print preview in abap list format

    Dear All
    I am facing a problem with the print preview.
    When i am clicking on print preview button the system is displaying the output in a abap list format.
    but when i m taking the print it is coming correctly.
    The out put format is different in the print preview where as when i am taking the output it is coming correctly.
    Pls help me out on this.

    Please check this answered link:
    Invoice print preview defaults to ABAP List View

  • Linked lists problem -- help needed

    Hello again. I've got yet another problem in my C++ course that stems from my use of a Mac instead of Windows. I'm going to install Parallels so I can get Windows on my MacBook and install Visual Studio this week so that I don't have to deal with these discrepancies anymore, but in the meanwhile, I'm having a problem here that I don't know how to resolve. To be clear, I've spent a lot of time trying to work this out myself, so I'm not just throwing this up here to have you guys do the work for me -- I'm really stuck here, and am coming here as a last resort, so I'll be very, very appreciative for any help that anyone can offer.
    In my C++ course, we are on a chapter about linked lists, and the professor has given us a template to make the linked lists work. It comes in three files (a header, a source file, and a main source file). I've made some adjustments -- the original files the professor provided brought up 36 errors and a handful of warnings, but I altered the #include directives and got it down to 2 errors. The problematic part of the code (the part that contains the two errors) is in one of the function definitions, print_list(), in the source file. That function definition is shown below, and I've marked the two statements that have the errors using comments that say exactly what the errors say in my Xcode window under those two statements. If you want to see the entire template, I've pasted the full code from all three files at the bottom of this post, but for now, here is the function definition (in the source file) that contains the part of the code with the errors:
    void LinkedList::printlist( )
    // good for only a few nodes in a list
    if(isEmpty() == 1)
    cout << "No nodes to display" << endl;
    return;
    for(CURSOR = FRONT_ptr; CURSOR; CURSOR = CURSOR-> link)
    { cout << setw(8) << CURSOR->name; } cout << endl; // error: 'setw' was not declared in this scope
    for(CURSOR = FRONT_ptr; CURSOR; CURSOR = CURSOR-> link)
    { cout << setw(8) << CURSOR->test_grade; } cout << endl; // error: 'setw' was not declared in this scope
    As you can see, the problem is with the two statements that contain the 'setw' function. Can anyone help me figure out how to get this template working and get by these two errors? I don't know enough about linked lists to know what I can and can't mess with here to get it working. The professor recommended that I try using 'printf' instead of 'cout' for those two statements, but I don't know how to achieve the same effect (how to do whatever 'setw' does) using 'printf'. Can anyone please help me get this template working? Thank you very, very much.
    For reference, here is the full code from all three files that make up the template:
    linkedlist.h (header file):
    #ifndef LINKED_LINKED_H
    #define LINKED_LINKED_H
    struct NODE
    string name;
    int test_grade;
    NODE * link;
    class Linked_List
    public:
    Linked_List();
    void insert(string n, int score);
    void remove(string target);
    void print_list();
    private:
    bool isEmpty();
    NODE *FRONT_ptr, *REAR_ptr, *CURSOR, *INSERT, *PREVIOUS_ptr;
    #endif
    linkedlist.cpp (source file):
    #include <iostream>
    using namespace std;
    #include "linkedlist.h"
    LinkedList::LinkedList()
    FRONT_ptr = NULL;
    REAR_ptr = NULL;
    PREVIOUS_ptr = NULL;
    CURSOR = NULL;
    void Linked_List::insert(string n, int score)
    INSERT = new NODE;
    if(isEmpty()) // first item in List
    // collect information into INSERT NODE
    INSERT-> name = n;
    // must use strcpy to assign strings
    INSERT -> test_grade = score;
    INSERT -> link = NULL;
    FRONT_ptr = INSERT;
    REAR_ptr = INSERT;
    else // else what?? When would this happen??
    // collect information into INSERT NODE
    INSERT-> name = n; // must use strcpy to assign strings
    INSERT -> test_grade = score;
    REAR_ptr -> link = INSERT;
    INSERT -> link = NULL;
    REAR_ptr = INSERT;
    void LinkedList::printlist( )
    // good for only a few nodes in a list
    if(isEmpty() == 1)
    cout << "No nodes to display" << endl;
    return;
    for(CURSOR = FRONT_ptr; CURSOR; CURSOR = CURSOR-> link)
    { cout << setw(8) << CURSOR->name; } cout << endl; // error: 'setw' was not declared in this scope
    for(CURSOR = FRONT_ptr; CURSOR; CURSOR = CURSOR-> link)
    { cout << setw(8) << CURSOR->test_grade; } cout << endl; // error: 'setw' was not declared in this scope
    void Linked_List::remove(string target)
    // 3 possible places that NODES can be removed from in the Linked List
    // FRONT
    // MIDDLE
    // REAR
    // all 3 condition need to be covered and coded
    // use Trasversing to find TARGET
    PREVIOUS_ptr = NULL;
    for(CURSOR = FRONT_ptr; CURSOR; CURSOR = CURSOR-> link)
    if(CURSOR->name == target) // match
    { break; } // function will still continue, CURSOR will
    // mark NODE to be removed
    else
    { PREVIOUS_ptr = CURSOR; } // PREVIOUS marks what NODE CURSOR is marking
    // JUST before CURSOR is about to move to the next NODE
    if(CURSOR == NULL) // never found a match
    { return; }
    else
    // check each condition FRONT, REAR and MIDDLE
    if(CURSOR == FRONT_ptr)
    // TARGET node was the first in the list
    FRONT_ptr = FRONT_ptr -> link; // moves FRONT_ptr up one node
    delete CURSOR; // deletes and return NODE back to free memory!!!
    return;
    }// why no need for PREVIOUS??
    else if (CURSOR == REAR_ptr) // TARGET node was the last in the list
    { // will need PREVIOUS for this one
    PREVIOUS_ptr -> link = NULL; // since this node will become the last in the list
    REAR_ptr = PREVIOUS_ptr; // = REAR_ptr; // moves REAR_ptr into correct position in list
    delete CURSOR; // deletes and return NODE back to free memory!!!
    return;
    else // TARGET node was the middle of the list
    { // will need PREVIOUS also for this one
    PREVIOUS_ptr -> link = CURSOR-> link; // moves PREV nodes' link to point where CURSOR nodes' points
    delete CURSOR; // deletes and return NODE back to free memory!!!
    return;
    bool Linked_List::isEmpty()
    if ((FRONT_ptr == NULL) && (REAR_ptr == NULL))
    { return true; }
    else
    { return false;}
    llmain.cpp (main source file):
    #include <iostream>
    #include <string>
    #include <iomanip>
    using namespace std;
    #include "linkedlist.h"
    int main()
    Linked_List one;
    one.insert("Angela", 261);
    one.insert("Jack", 20);
    one.insert("Peter", 120);
    one.insert("Chris", 270);
    one.print_list();
    one.remove("Jack");
    one.print_list();
    one.remove("Angela");
    one.print_list();
    one.remove("Chris");
    one.print_list();
    return 0;

    setw is the equivalent of the field width value in printf. In your code, the printf version would look like:
    printf("%8s", CURSOR->name.c_str());
    I much prefer printf over any I/O formatting in C++. See the printf man page for more information. I recommend using Bwana: http://www.bruji.com/bwana/
    I do think it is a good idea to verify your code on the platform it will be tested against. That means Visual Studio. However, you don't want to use Visual Studio. As you have found out, it gets people into too many bad habits. Linux is much the same way. Both development platforms are designed to build anything, whether or not it is syntactically correct. Both GNU and Microsoft have a long history of changing the language standards just to suit themselves.
    I don't know what level you are in the class, but I have a few tips for you. I'll phrase them so that they answers are a good exercise for the student
    * Look into const-correctness.
    * You don't need to compare a bool to 1. You can just use bool. Plus, any integer or pointer type has an implicit cast to bool.
    * Don't reuse your CURSOR pointer as a temporary index. Create a new pointer inside the for loop.
    * In C++, a struct is the same thing as a class, with all of its members public by default. You can create constructors and member functions in a struct.
    * Optimize your function arguments. Pass by const reference instead of by copy. You will need to use pass by copy at a later date, but don't worry about that now.
    * Look into initializer lists.
    * In C++ NULL and 0 are always the same.
    * Return the result of an expression instead of true or false. Technically this isn't officially Return Value Optimization, but it is a good habit.
    Of course, get it running first, then make it fancy.

  • Open Sharepoint Link List items in new tab?

    I have a sharepoint list which is Link List.Actually When I click on item in that link list it should be open in the new tab/window

    Hi,
    According to your description, you might want to open Link list items in a new tab/windows.
    If it is not a must behavior to use the “URL” column to hold the hyperlink, I would suggest you use “Hyperlink with formatting and constraints for publishing” column
    instead which can let users decide to open the hyperlink in a new tab or not.
    It is required to activate the “SharePoint Server Publishing Infrastructure” in the “site collection features”, create a column of this type in “Site Settings ->
    Web Designer Galleries -> Site Columns”, then you can add it into your list.
    Here is a link about how to add publishing columns to content types, lists, or libraries, you could use it as a reference:
    https://support.office.com/en-ie/article/Add-publishing-columns-to-content-types-lists-or-libraries-4e268d2e-4822-4bc6-a992-88287119a052#__toc337727282
    Best regards
    Patrick Liang
    TechNet Community Support

  • Alv using class In list format

    Hi,
    I am using a method set_table_for_first_display in class cl_gui_alv_grid to display ALV. but by default the output appears in grid format, I want to change the output in LIST format.
    What can I do to change the output in list format.
    Kind Regards,
    Abhishek.

    try this.... this is an example code.... don't use set_table_for_first_display rather use CL_SALV_TABLE and execute the below code
    *& Report  ZAMIT_TEST
    REPORT  zamit_test  MESSAGE-ID z_zzz_ca_messages.
    * constants for icons
    TYPE-POOLS: icon, col.
    * type for internal table
    TYPES: BEGIN OF x_sflight.
    *       selfld TYPE char1.
            INCLUDE STRUCTURE sflight.
    TYPES: seatsfree TYPE sflight-seatsocc,
           usage TYPE n,                    " exception
           icon_future TYPE icon-id,        " icon for future / past
           line_counter TYPE i,             " line counter
           it_colors TYPE lvc_t_scol, " internal tab for cell color info
    END OF x_sflight.
    * Internal table
    DATA: i_sflight  TYPE STANDARD TABLE OF x_sflight,
          wa_sflight TYPE x_sflight,
          wa_colors  TYPE lvc_s_scol,
          list_display TYPE sap_bool,
          vref_cont    TYPE REF TO cl_gui_custom_container,
          vref_alv     TYPE REF TO cl_salv_table,      " ALV instance
          oref_error   TYPE REF TO cx_salv_error,      " Error instance
          l_text_alv_e TYPE string,
          ok_code      TYPE syucomm.
    SELECT-OPTIONS: so_car FOR wa_sflight-carrid MEMORY ID car,
                    so_con FOR wa_sflight-connid.
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN BEGIN OF BLOCK alv WITH FRAME TITLE text-alv.
    PARAMETERS: pa_full RADIOBUTTON GROUP alvd DEFAULT 'X',
                pa_cont RADIOBUTTON GROUP alvd,
                pa_list RADIOBUTTON GROUP alvd.
    SELECTION-SCREEN END OF BLOCK alv.
    PARAMETERS: p_layout TYPE slis_vari.
    *       CLASS lcl_handler DEFINITION
    CLASS lcl_handler DEFINITION.
      PUBLIC SECTION.
        CLASS-METHODS:
        on_added_function FOR EVENT added_function OF cl_salv_events_table
                IMPORTING e_salv_function, " type salv_de_function
        on_double_click FOR EVENT double_click OF cl_salv_events_table
                IMPORTING row,   " type salv_de_row = int4
        on_link_click FOR EVENT link_click OF cl_salv_events_table
                IMPORTING row    " type salv_de_row = int4
                          column." type salv_de_column = char(30)
    ENDCLASS. "lcl_handler definition
    * CLASS lcl_handler IMPLEMENTATION
    CLASS lcl_handler IMPLEMENTATION.
      METHOD on_added_function.
        DATA: l_oref_columns TYPE REF TO cl_salv_columns_table,
              l_oref_column  TYPE REF TO cl_salv_column_table,
              l_oref_column1 TYPE REF TO cl_salv_column,
              l_except1      TYPE REF TO cx_salv_not_found,   "Exception
              l_text1        TYPE string,                     "Exception msg
              l_lvc_s_colo TYPE lvc_s_colo.
        CASE e_salv_function.
          WHEN 'REORDER'.
    * get the COLUMNS object
            l_oref_columns = vref_alv->get_columns( ).
    * positions: (MANDT column + 3 key colums)
            l_oref_columns->set_column_position( columnname = 'SEATSOCC'
                                                 position = 5 ).
            l_oref_columns->set_column_position( columnname = 'SEATSOCC_B'
                                                 position = 6 ).
            l_oref_columns->set_column_position( columnname = 'SEATSOCC_F'
                                                 position = 7 ).
    *       prepare color info
    *       column SEATSOCC
            TRY.
                CALL METHOD l_oref_columns->get_column
                  EXPORTING
                    columnname = 'SEATSOCC'
                  RECEIVING
                    value      = l_oref_column1.
              CATCH cx_salv_not_found INTO l_except1.
                l_text1 = l_except1->get_text( ).
                MESSAGE i000 WITH l_text1.
                LEAVE LIST-PROCESSING.
            ENDTRY.
            l_oref_column ?= l_oref_column1.
            l_oref_column->set_color( value = l_lvc_s_colo ).
    *       column SEATSOCC_B
            TRY.
                CALL METHOD l_oref_columns->get_column
                  EXPORTING
                    columnname = 'SEATSOCC_B'
                  RECEIVING
                    value      = l_oref_column1.
              CATCH cx_salv_not_found INTO l_except1.
                l_text1 = l_except1->get_text( ).
                MESSAGE i000 WITH l_text1.
                LEAVE LIST-PROCESSING.
            ENDTRY.
            l_oref_column ?= l_oref_column1.
            l_oref_column->set_color( value = l_lvc_s_colo ).
    *       column SEATSOCC_F
            TRY.
                CALL METHOD l_oref_columns->get_column
                  EXPORTING
                    columnname = 'SEATSOCC_F'
                  RECEIVING
                    value      = l_oref_column1.
              CATCH cx_salv_not_found INTO l_except1.
                l_text1 = l_except1->get_text( ).
                MESSAGE i000 WITH l_text1.
                LEAVE LIST-PROCESSING.
            ENDTRY.
            l_oref_column ?= l_oref_column1.
            l_oref_column->set_color( value = l_lvc_s_colo ).
        ENDCASE.
      ENDMETHOD. "on_added_function
      METHOD on_double_click.
        DATA: message_text(70),
              lc_seatsfree_e(10),
              lc_seatsfree_b(10),
              lc_seatsfree_f(10).
        READ TABLE i_sflight INTO wa_sflight INDEX row.
        CHECK sy-subrc EQ 0.
        lc_seatsfree_e = wa_sflight-seatsmax - wa_sflight-seatsocc.
        lc_seatsfree_b = wa_sflight-seatsmax_b - wa_sflight-seatsocc_b.
        lc_seatsfree_f = wa_sflight-seatsmax_f - wa_sflight-seatsocc_f.
        CONCATENATE 'FREE SEATS:'(frs) 'ECONOMY:'(eco) lc_seatsfree_e
        'BUSINESS'(bus) lc_seatsfree_b 'FIRST'(fst) lc_seatsfree_f
                        INTO message_text SEPARATED BY space.
        MESSAGE message_text TYPE 'I'.
      ENDMETHOD. "on_double_click
      METHOD on_link_click.
        DATA: lc_carrname TYPE scarr-carrname,
        lc_currcode TYPE scarr-currcode,
        message_text(70).
        READ TABLE i_sflight INTO wa_sflight INDEX row.
        CHECK sy-subrc EQ 0.
        CASE column.
          WHEN 'CARRID'.
            SELECT SINGLE carrname currcode
            INTO (lc_carrname, lc_currcode)
            FROM scarr
            WHERE carrid = wa_sflight-carrid.
            IF sy-subrc EQ 0.
              CONCATENATE 'AIRLINE:'(air) wa_sflight-carrid
              'NAME:'(nme) lc_carrname
              'CURRENCY:' lc_currcode
              INTO message_text
              SEPARATED BY space.
              MESSAGE message_text TYPE 'I'.
            ENDIF.
          WHEN 'SELFLD'.
            MESSAGE i000 with 'Checkbox Clicked'.
        ENDCASE.
      ENDMETHOD. "on_link_click
    ENDCLASS. "lcl_handler IMPLEMENTATION
    START-OF-SELECTION.
    * retrieve data into internal table
      SELECT * FROM sflight
      INTO CORRESPONDING FIELDS OF TABLE i_sflight
      WHERE carrid IN so_car
      AND connid IN so_con.
    END-OF-SELECTION.
    * fill additional data fields
      LOOP AT i_sflight INTO wa_sflight.
    * seats free
        wa_sflight-seatsfree =
        wa_sflight-seatsmax + wa_sflight-seatsmax_b
        + wa_sflight-seatsmax_f
        - wa_sflight-seatsocc - wa_sflight-seatsocc_b
        - wa_sflight-seatsocc_f.
    * usage (exception light)
        IF wa_sflight-seatsfree = 0.
          wa_sflight-usage = '1'.
        ELSEIF wa_sflight-seatsfree <= 20.
          wa_sflight-usage = '2'.
        ELSE.
          wa_sflight-usage = '3'.
        ENDIF.
    * icon "in the future/not in the future"
        IF wa_sflight-fldate > sy-datum.
          wa_sflight-icon_future = icon_positive.
        ELSE.
          wa_sflight-icon_future = icon_negative.
        ENDIF.
    * cell colors
    * single cell if planetype is 747-400
        IF wa_sflight-planetype = '747-400'.
          CLEAR wa_colors.
          wa_colors-fname = 'PLANETYPE'.
          wa_colors-color-col = col_positive.
          wa_colors-color-int = 1.
          APPEND wa_colors TO wa_sflight-it_colors.
        ENDIF.
    * whole line if seatsfree gt 200
        IF wa_sflight-seatsfree >= 200.
          CLEAR wa_colors.
          wa_colors-color-col = col_heading.
          wa_colors-color-int = 1.
          APPEND wa_colors TO wa_sflight-it_colors.
        ENDIF.
        MODIFY i_sflight
        FROM wa_sflight
             TRANSPORTING
        seatsfree
        usage
        icon_future
        it_colors.
      ENDLOOP.
      CASE 'X'.
        WHEN pa_full OR pa_list.
          IF pa_list IS NOT INITIAL.
            list_display = if_salv_c_bool_sap=>true.
          ELSE.
            list_display = if_salv_c_bool_sap=>false.
          ENDIF.
          TRY.
              CALL METHOD cl_salv_table=>factory
                EXPORTING
                  list_display = list_display
                IMPORTING
                  r_salv_table = vref_alv
                CHANGING
                  t_table      = i_sflight.
            CATCH cx_salv_msg INTO oref_error.
              l_text_alv_e = oref_error->get_text( ).
              MESSAGE i000 WITH l_text_alv_e.
              LEAVE LIST-PROCESSING.
          ENDTRY.
    * define settings
          PERFORM define_settings USING vref_alv.
    * display ALV
          vref_alv->display( ).
        WHEN pa_cont.
          CALL SCREEN 100.
      ENDCASE.
    *&      Form  define_settings
    *       text
    *      -->P_ALV      ALV object
    FORM define_settings USING p_alv TYPE REF TO cl_salv_table.
      PERFORM: sub_set_display    USING p_alv,
               sub_set_columns    USING p_alv,
               sub_set_sorts      USING p_alv,
               sub_set_aggregs    USING p_alv,
               sub_set_selections USING p_alv,
               sub_set_layout     USING p_alv,
               sub_set_functions  USING p_alv,
               sub_set_events     USING p_alv,
               sub_set_header     USING p_alv.
    ENDFORM. " define_settings
    *& Form sub_set_display
    * set general display attributs
    * -->P_ALV ALV object
    FORM sub_set_display USING p_alv TYPE REF TO cl_salv_table.
      DATA: lr_display TYPE REF TO cl_salv_display_settings,
            l_title TYPE lvc_title.
    * get display settings object
      lr_display = p_alv->get_display_settings( ).
    * set header
      l_title = text-ttl.
      lr_display->set_list_header( value = text-ttl ).
    * set horizontal lines off
      lr_display->set_horizontal_lines( value = ' '  ).
    * set striped pattern
      lr_display->set_striped_pattern( value = 'X' ).
    ENDFORM. " sub_set_display
    *&      Form  sub_set_columns
    *       text
    *      -->P_ALV      text
    FORM sub_set_columns USING p_alv TYPE REF TO cl_salv_table.
      DATA: l_oref_columns TYPE REF TO cl_salv_columns_table,
            l_oref_column  TYPE REF TO cl_salv_column_table,
            l_oref_column1 TYPE REF TO cl_salv_column,
            l_except1      TYPE REF TO cx_salv_not_found,   "Exception
            l_except2      TYPE REF TO cx_salv_data_error,  "Exception
            l_text1        TYPE string,                     "Exception msg
            l_scrtext_s    TYPE scrtext_s,
            l_scrtext_m    TYPE scrtext_m,
            l_scrtext_l    TYPE scrtext_l,
            l_lvc_tip      TYPE lvc_tip,     " for tooltip
            l_pos          TYPE i,           " column position
            l_lvc_s_colo   TYPE lvc_s_colo.  " column color
      l_oref_columns = p_alv->get_columns( ).   " get columns object
    * set exception column
      TRY.
          CALL METHOD l_oref_columns->set_exception_column
            EXPORTING
              value = 'USAGE'.
        CATCH cx_salv_data_error INTO l_except2.
          l_text1 = l_except2->get_text( ).
          MESSAGE i000 WITH l_text1.
          LEAVE LIST-PROCESSING.
      ENDTRY.
    * set count column
      TRY.
          CALL METHOD l_oref_columns->set_count_column
            EXPORTING
              value = 'LINE_COUNTER'.
        CATCH cx_salv_data_error INTO l_except2.
          l_text1 = l_except2->get_text( ).
          MESSAGE i000 WITH l_text1.
          LEAVE LIST-PROCESSING.
      ENDTRY.
    * set cell colors / line colors column
      TRY.
          CALL METHOD l_oref_columns->set_color_column
            EXPORTING
              value = 'IT_COLORS'.
        CATCH cx_salv_data_error INTO l_except2.
          l_text1 = l_except2->get_text( ).
          MESSAGE i000 WITH l_text1.
          LEAVE LIST-PROCESSING.
      ENDTRY.
    * column ICON_FUTURE
      TRY.
          CALL METHOD l_oref_columns->get_column
            EXPORTING
              columnname = 'ICON_FUTURE'
            RECEIVING
              value      = l_oref_column1.
        CATCH cx_salv_not_found INTO l_except1.
          l_text1 = l_except1->get_text( ).
          MESSAGE i000 WITH l_text1.
          LEAVE LIST-PROCESSING.
      ENDTRY.
      l_oref_column ?= l_oref_column1.
      l_oref_column->set_icon( ).
      l_scrtext_s = text-fut.
      l_oref_column->set_short_text( value = l_scrtext_s ).
      l_oref_column->set_row( value = 2 ).
    * Column SEATSFREE
      TRY.
          CALL METHOD l_oref_columns->get_column
            EXPORTING
              columnname = 'SEATSFREE'
            RECEIVING
              value      = l_oref_column1.
        CATCH cx_salv_not_found INTO l_except1.
          l_text1 = l_except1->get_text( ).
          MESSAGE i000 WITH l_text1.
          LEAVE LIST-PROCESSING.
      ENDTRY.
      l_oref_column ?= l_oref_column1.
    * set color to COL_GROUP
      l_lvc_s_colo-col = col_group.
      l_lvc_s_colo-int = 1.
      l_oref_column->set_color( value = l_lvc_s_colo ).
    ** Column SELFLD
    *  TRY.
    *      CALL METHOD l_oref_columns->get_column
    *        EXPORTING
    *          columnname = 'SELFLD'
    *        RECEIVING
    *          value      = l_oref_column1.
    *    CATCH cx_salv_not_found INTO l_except1.
    *      l_text1 = l_except1->get_text( ).
    *      MESSAGE i000 WITH l_text1.
    *      LEAVE LIST-PROCESSING.
    *  ENDTRY.
    *  l_oref_column ?= l_oref_column1.
    ** set color to COL_GROUP
    *  if pa_list = 'X'.
    *  l_oref_column->set_cell_type( value =
    *                               if_salv_c_cell_type=>CHECKBOX ).
    *  ELSEIF pa_full = 'X'.
    *    l_oref_column->set_cell_type( value =
    *                               if_salv_c_cell_type=>CHECKBOX_HOTSPOT ).
    *  endif.
    ENDFORM.                    "sub_set_columns
    *& Form sub_set_sorts
    * -->P_ALV text
    FORM sub_set_sorts USING p_alv TYPE REF TO cl_salv_table.
      DATA: l_oref_sorts TYPE REF TO cl_salv_sorts,
            l_except1      TYPE REF TO cx_salv_not_found,   "Exception
            l_except2      TYPE REF TO cx_salv_existing,    "Exception
            l_except3      TYPE REF TO cx_salv_data_error,  "Exception
            l_text1        TYPE string.                     "Exception msg
    * get the SORTS object
      l_oref_sorts = p_alv->get_sorts( ).
    * add sorts
      TRY.
          CALL METHOD l_oref_sorts->add_sort
            EXPORTING
              columnname = 'CARRID'
              position   = 1.
        CATCH cx_salv_not_found INTO l_except1.
          l_text1 = l_except1->get_text( ).
          MESSAGE i000 WITH l_text1.
          LEAVE LIST-PROCESSING.
        CATCH cx_salv_existing  INTO l_except2.
          l_text1 = l_except2->get_text( ).
          MESSAGE i000 WITH l_text1.
          LEAVE LIST-PROCESSING.
        CATCH cx_salv_data_error INTO l_except3.
          l_text1 = l_except3->get_text( ).
          MESSAGE i000 WITH l_text1.
          LEAVE LIST-PROCESSING.
      ENDTRY.
      TRY.
          CALL METHOD l_oref_sorts->add_sort
            EXPORTING
              columnname = 'CONNID'
              position   = 2
              subtotal   = if_salv_c_bool_sap=>true.
        CATCH cx_salv_not_found INTO l_except1.
          l_text1 = l_except1->get_text( ).
          MESSAGE i000 WITH l_text1.
          LEAVE LIST-PROCESSING.
        CATCH cx_salv_existing  INTO l_except2.
          l_text1 = l_except2->get_text( ).
          MESSAGE i000 WITH l_text1.
          LEAVE LIST-PROCESSING.
        CATCH cx_salv_data_error INTO l_except3.
          l_text1 = l_except3->get_text( ).
          MESSAGE i000 WITH l_text1.
          LEAVE LIST-PROCESSING.
      ENDTRY.
      TRY.
          CALL METHOD l_oref_sorts->add_sort
            EXPORTING
              columnname = 'FLDATE'
              position   = 3.
        CATCH cx_salv_not_found INTO l_except1.
          l_text1 = l_except1->get_text( ).
          MESSAGE i000 WITH l_text1.
          LEAVE LIST-PROCESSING.
        CATCH cx_salv_existing  INTO l_except2.
          l_text1 = l_except2->get_text( ).
          MESSAGE i000 WITH l_text1.
          LEAVE LIST-PROCESSING.
        CATCH cx_salv_data_error INTO l_except3.
          l_text1 = l_except3->get_text( ).
          MESSAGE i000 WITH l_text1.
          LEAVE LIST-PROCESSING.
      ENDTRY.
    ENDFORM. " sub_set_sorts
    *& Form sub_set_aggregs
    * -->P_ALV text
    FORM sub_set_aggregs USING p_alv TYPE REF TO cl_salv_table.
      DATA: l_oref_aggregs TYPE REF TO cl_salv_aggregations,
            l_except1      TYPE REF TO cx_salv_data_error,  "Exception
            l_except2      TYPE REF TO cx_salv_not_found,   "Exception
            l_except3      TYPE REF TO cx_salv_existing,    "Exception
            l_text1        TYPE string.                     "Exception msg
      l_oref_aggregs = p_alv->get_aggregations( ).
      TRY.
          CALL METHOD l_oref_aggregs->add_aggregation
            EXPORTING
              columnname  = 'SEATSFREE'
              aggregation = if_salv_c_aggregation=>total.
        CATCH cx_salv_data_error INTO l_except1.
          l_text1 = l_except1->get_text( ).
          MESSAGE i000 WITH l_text1.
          LEAVE LIST-PROCESSING.
        CATCH cx_salv_not_found  INTO l_except2.
          l_text1 = l_except2->get_text( ).
          MESSAGE i000 WITH l_text1.
          LEAVE LIST-PROCESSING.
        CATCH cx_salv_existing   INTO l_except3.
          l_text1 = l_except3->get_text( ).
          MESSAGE i000 WITH l_text1.
          LEAVE LIST-PROCESSING.
      ENDTRY.
    ENDFORM. " sub_set_aggregs
    *& Form sub_set_selections
    * -->P_ALV text
    FORM sub_set_selections USING p_alv TYPE REF TO cl_salv_table.
      DATA: lr_selections TYPE REF TO cl_salv_selections.
    * get the SELECTIONS object
      lr_selections = p_alv->get_selections( ).
    * set the selection mode
      lr_selections->set_selection_mode(
                     value = if_salv_c_selection_mode=>cell ).
    ENDFORM. " sub_set_selections
    *& Form sub_set_layout
    * -->P_ALV text
    FORM sub_set_layout USING p_alv TYPE REF TO cl_salv_table.
      DATA: lr_layout TYPE REF TO cl_salv_layout,
      ls_key TYPE salv_s_layout_key.
    * get the LAYOUT object
      lr_layout = p_alv->get_layout( ).
    * set the layout key
      ls_key-report = sy-cprog.
      lr_layout->set_key( value = ls_key ).
    * set save restriction
    * (restriction "none" is intended,
    * so we may use the default)
      lr_layout->set_save_restriction(
    * VALUE = IF_SALV_C_LAYOUT=>RESTRICT_NONE
    * allow setting a default layout
      lr_layout->set_default( value = 'X' ).
    * set initial layout
      lr_layout->set_initial_layout( value = p_layout ).
    ENDFORM. " sub_set_layout
    *& Form sub_set_functions
    * -->P_ALV text
    FORM sub_set_functions USING p_alv TYPE REF TO cl_salv_table.
      DATA: lr_functions TYPE REF TO cl_salv_functions_list,
            l_except1    TYPE REF TO cx_salv_existing,
            l_except2    TYPE REF TO cx_salv_wrong_call,
            l_text1      TYPE string,
    * help variables for method call ADD_FUNCTION
            l_icon       TYPE string,
            l_text       TYPE string,
            l_tooltip    TYPE string.
    IF pa_full = 'X' or pa_list = 'X'.
      p_alv->set_screen_status( pfstatus = 'SALV_TABLE_STANDARD'
                                report = sy-repid
                           set_functions = p_alv->c_functions_all ).
    ENDIF.
    * get the FUNCTIONS object
      lr_functions = p_alv->get_functions( ).
    * offer all generic functions
      lr_functions->set_all( value = if_salv_c_bool_sap=>true ).
    * subtract average
      lr_functions->set_aggregation_average(
                        value = if_salv_c_bool_sap=>false ).
    * subtract all export functions
      lr_functions->set_group_export(
                        value = if_salv_c_bool_sap=>false ).
    * enable exort to local file
      lr_functions->set_export_localfile(
                        value = if_salv_c_bool_sap=>true ).
    * subtract transfer to lotus
      lr_functions->set_view_lotus(
                        value = if_salv_c_bool_sap=>false ).
    * customer defined function:
    * display occupied seats columns most left
    * and highlight them
    *  IF pa_cont = 'X'.
    *    l_icon = icon_insert_row.
    *    l_text = text-tot.
    *    l_tooltip = text-ttt.
    *    TRY.
    *        CALL METHOD lr_functions->add_function
    *          EXPORTING
    *            name     = 'REORDER'
    *            icon     = l_icon
    *            text     = l_text
    *            tooltip  = l_tooltip
    *     position = if_salv_c_function_position=>right_of_salv_functions.
    *      CATCH cx_salv_existing   INTO l_except1.
    *        l_text1 = l_except1->get_text( ).
    *        MESSAGE i000 WITH l_text1.
    *        LEAVE LIST-PROCESSING.
    *      CATCH cx_salv_wrong_call INTO l_except2.
    *        l_text1 = l_except2->get_text( ).
    *        MESSAGE i000 WITH l_text1.
    *        LEAVE LIST-PROCESSING.
    *    ENDTRY.
    *  ENDIF.
    ENDFORM. " sub_set_functions
    *& Form sub_set_events
    * text
    * -->P_ALV text
    FORM sub_set_events USING p_alv TYPE REF TO cl_salv_table.
      DATA: lr_event TYPE REF TO cl_salv_events_table.
    * get the EVENT object
      lr_event = p_alv->get_event( ).
      SET HANDLER :
      lcl_handler=>on_added_function FOR lr_event,
      lcl_handler=>on_double_click   FOR lr_event,
      lcl_handler=>on_link_click     FOR lr_event.
    ENDFORM. " sub_set_events
    *& Form sub_set_header
    * -->P_ALV text
    FORM sub_set_header
    USING p_alv TYPE REF TO cl_salv_table.
      DATA: lr_grid TYPE REF TO cl_salv_form_layout_grid.
    * 1st step: create the grid object
      CREATE OBJECT lr_grid.
    * 2nd step: add some text items
      lr_grid->create_header_information( row = 1  column = 1
                             text = 'Flight List Grp ##'(fll) ).
      lr_grid->create_text( row = 2  column = 1
                             text = 'Please check utilization'(uti) ).
    * 3rd step: declare grid as header of list
      p_alv->set_top_of_list( value = lr_grid ).
    ENDFORM. " sub_set_header
    *& Module STATUS_0100 OUTPUT
    * text
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'SALV_TABLE_STANDARD'.
      SET TITLEBAR 'T100'.
    ENDMODULE. " STATUS_0100 OUTPUT
    *& Module create_control OUTPUT
    * text
    MODULE create_control OUTPUT.
      IF vref_cont IS NOT BOUND.
    * create container control
    * and link it to the dynpro
        CREATE OBJECT vref_cont
        EXPORTING
          container_name = 'MY_CONTAINER'
        EXCEPTIONS
          OTHERS = 1.
        IF sy-subrc <> 0.
          MESSAGE e000 WITH 'Error when creating the container object'.
        ENDIF.
    * create ALV and
    * link it to the container control
        TRY.
            cl_salv_table=>factory(
            EXPORTING
              r_container = vref_cont
            IMPORTING
              r_salv_table = vref_alv
            CHANGING
              t_table = i_sflight ).
          CATCH cx_salv_msg INTO oref_error.
            l_text_alv_e = oref_error->get_text( ).
            MESSAGE i000 WITH l_text_alv_e.
            LEAVE LIST-PROCESSING.
        ENDTRY.
    * display ALV
        vref_alv->display( ).
      ENDIF.
    ENDMODULE. " create_control OUTPUT
    *& Module USER_COMMAND_0100 INPUT
    * text
    MODULE user_command_0100 INPUT.
      CASE sy-ucomm.
        WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
          SET SCREEN 0.
      ENDCASE.
    ENDMODULE. " USER_COMMAND_0100 INPUT
    *&      Module  exit  INPUT
    *       text
    MODULE exit INPUT.
      SET SCREEN 0.
    ENDMODULE.                 " exit  INPUT

  • ABAP List Format

    Hi,
    Any documentation about ALF (ABAP List format) ? Especially ALF specifications?
    Thanks

    Please check this answered link:
    Invoice print preview defaults to ABAP List View

  • Linked list- error problem.... HELP!!!

    Just got to the point that i'm better at drinking java than programing java....
    how ever... I have done person register with Linked list. There are like 4 options:
    1. New post
    2. search
    3. search and change
    4. remove post
    U can enter your name, adress and personal code number while making a new post, but when I've removed it ( l.list.remove(p);)and then search for it I get the error message "Exception in thread "main"....bla bla..". Why? and how do I get around this prob? PLEASE HELP ME!! gotta hand this in tonight!
    Thank U!!
    //Phil

    Phil,
    LinkedList itself works as advertised (1.3.1). For example:
    LL = LinkedList()
    LL.add("apple")
    LL.add("battle")
    LL.add("cattle")
    // printing LL yields all 3
    LL.remove("battle")
    // printing LL yields apple, cattle
    You may need to post for responders to get a better idea. If posting code please enclose in  blocks so it's formatted properly.
    --A                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Configure Frequent visited sites in list format

    Hi Internet Explorer Expert,
    I have a query here. Usually the frequent visited websites will be shown in series of box icon form and usually we only see 10 icons of frequently visited websites.  Is it possible to change or view the those frequent visited websites in listed
    format?
    Thanks so much for the attention
    Regards,
    Henry

    Is it possible to change or view the those frequent visited websites in listed format?
    The only change allowed is to take stuff out never to be seen again.  E.g. it is probably safe to do that with Survey URL.  You can also change the size of it.  There is a registry hack floating around which does that.  Another option
    is to use the History By most visited which is bigger than the normal Frequent list.  You can "edit" that also by removing stuff you don't care to see again.  I don't know if either list gets the idea not to bother showing you similar
    things again, e.g. any other surveys in the future.  FWIW I once used it as a suggestion list for promotion to the Favorites Bar (aka Links bar).  Then I would delete it from the Frequent list, never to be seen there again, but then to get the amusement
    of seeing what would appear in its place.  I think maybe I should do that again because it is a bit useless seeing the same things in both places.
    Robert Aldwinckle

  • Help with linked list code.

    Here's a basic linked list code that I need help on.
    What I need assistance with:
    1. How would I rewrite and delete words/phrases in the file IO section of my code?
    2. How would I make the code recognize all the words on each line of the linked list? Only the words on the first line of the file go into the linked list.
    import java.util.LinkedList;
    import java.io.*;
    import javax.swing.JOptionPane;
    public class LinkedLists {
        public static void delete (LinkedList test)
            int a = Integer.parseInt(JOptionPane.showInputDialog(null,
            "Enter a position to delete"));
            test.remove(a - 1);
            System.out.print(test);
        public static void add (LinkedList test)
            String user = JOptionPane.showInputDialog(null, "What to input?");
            int b = Integer.parseInt(JOptionPane.showInputDialog(null,
                    "What position to enter it in?"));
            test.add(b - 1, user);
            System.out.print(test);
        public static void fileRead(LinkedList test) throws IOException
            BufferedReader fileIn;
            String text;
            fileIn = new BufferedReader(new FileReader("z:/data.txt"));
            text = fileIn.readLine();
            fileIn.close();
            int b = Integer.parseInt(JOptionPane.showInputDialog(null,
                    "What position to enter it in?"));
            test.add(b - 1, text);
            System.out.print(test);
        public static void fileWrite(LinkedList test) throws IOException
            PrintWriter fileOut;
            fileOut = new PrintWriter(new FileWriter("z:/data.txt",true));
            String user = JOptionPane.showInputDialog(null, "What to input?");
            fileOut.println(user);
            fileOut.close();
            fileRead(test);
        public static void main(String[] args)  {
            LinkedList test = new LinkedList();
            test.addLast("Fly");
            test.addLast("money");
            test.addLast("awesome");
            test.addLast("woot");
            test.addLast("yay");
            System.out.print(test);
            System.out.println();
            int x = Integer.parseInt(JOptionPane.showInputDialog(null,
                    "Enter \n1 to Delete \n2 to Add \n3 to read data from file \n4 to write into the file and add to list"));
            if (x == 1) {
                delete(test);
            if (x == 2) {
                add(test);
            if (x == 3) {
                try {
                    fileRead(test);
                } catch (IOException e) {
                    e.printStackTrace();
            if(x==4)
                try {
                    fileWrite(test);
                } catch (IOException e) {
                    e.printStackTrace();
    }Edited by: Johnston on Sep 16, 2007 1:13 AM

    Hi,
    Johnston wrote:
    1. How would I rewrite and delete words/phrases in the file IO section of my code?You want to replace or remove in/from the file?
    First you have to define a file format. This is not a Java technical term, but a thing what you have to keep in mind. Simplest format is:
    - each ListItem is one line in the file closed with newline.
    Now you can read the file line by line and store the lines in a memory structure (LinkedList for ex ;-)). Then replace or remove the designated elements an write the file new by iterate over the list and write each item as line in the file.
    Johnston wrote:
    2. How would I make the code recognize all the words on each line of the linked list? Only the words on the first line of the file go into the linked list.You have to read the file line by line and then add each line as item of the list.
    Examples for reading/writing textfiles:
    http://www.exampledepot.com/egs/java.io/pkg.html#Reading%20and%20Writing
    Btw: Deal with Generics (see http://java.sun.com/docs/books/tutorial/extra/generics/index.html) an use this knowledge to declate your List better.
    greetings
    Axel

Maybe you are looking for