1. #1
    Ext User
    Join Date
    May 2010
    Posts
    1
    Vote Rating
    0
    fitzwilliam is on a distinguished road

      0  

    Default [ExtJS - Animated Multisort DataView Example] Can NOT display data from Servlet

    [ExtJS - Animated Multisort DataView Example] Can NOT display data from Servlet


    I modify the example and try to transfer data from servlet, but failed to display in JSP page.

    Always have the following error:
    IE:Expected ')'
    FF: missing ) after argument list

    Servlet code:
    Code:
            ServletContext sc = getServletContext();
            RequestDispatcher rd = sc.getRequestDispatcher("/multisort-dataview.jsp");
            req.setAttribute("phones", getResArray());
            rd.forward(req, resp);
    
    
    
        private Object[][] getResArray(){
            Object[][] ret =new Object[][]{
                        {true,  false, 1,  "LG KS360000000000000",                              70,  "240 x 320 pixels", 2,   "Pink",             "Slider",             359, 2.400000},
                        {true,  true,  2,  "Sony Ericsson C510a Cyber-shot",        180, "320 x 240 pixels", 3.2, "Future black",     "Candy bar",          11,  0.000000},
                        {true,  true,  3,  "LG PRADA KE850",                        155, "240 x 400 pixels", 2,   "Black",            "Candy bar",          113, 0.000000},
                        {true,  true,  4,  "Nokia N900 Smartphone 32 GB",           499, "800 x 480 pixels", 5,   "Black",            "Slider",             320, 3.500000},
                        {true,  false, 5,  "Motorola RAZR V3",                      65,  "96 x 80 pixels",   0.3, "Silver",           "Folder type phone",  5,   2.200000},
                        {true,  true,  6,  "LG KC910 Renoir",                       180, "240 x 400 pixels", 8,   "Black",            "Candy bar",          79,  0.000000},
                        {true,  true,  7,  "BlackBerry Curve 8520 BlackBerry",      135, "320 x 240 pixels", 2,   "Frost",            "Candy bar",          320, 2.640000},
                        {true,  true,  8,  "Sony Ericsson W580i Walkman",           70,  "240 x 320 pixels", 2,   "Urban gray",       "Slider",             1,   0.000000},
                        {true,  true,  9,  "Nokia E63 Smartphone 110 MB",           170, "320 x 240 pixels", 2,   "Ultramarine blue", "Candy bar",          319, 2.360000},
                        {true,  true,  10, "Sony Ericsson W705a Walkman",           274, "320 x 240 pixels", 3.2, "Luxury silver",    "Slider",             5,   0.000000},
                        {false, false, 11, "Nokia 5310 XpressMusic",                170, "320 x 240 pixels", 2,   "Blue",             "Candy bar",          344, 2.000000},
                        {false, true,  12, "Motorola SLVR L6i",                     50,  "128 x 160 pixels", 2,   "Black",            "Candy bar",          38,  0.000000},
                        {false, true,  13, "T-Mobile Sidekick 3 Smartphone 64 MB",  170, "240 x 160 pixels", 1.3, "Green",            "Sidekick",           115, 0.000000},
                        {false, true,  14, "Audiovox CDM8600",                      50,  "240 x 160 pixels", 2,   "Blue",             "Folder type phone",  1,   0.000000},
                        {false, true,  15, "Nokia N85",                             70,  "320 x 240 pixels", 5,   "Copper",           "Dual slider",        143, 2.600000},
                        {false, true,  16, "Sony Ericsson XPERIA X1",               180, "800 x 480 pixels", 3.2, "Solid black",      "Slider",             14,  0.000000},
                        {false, true,  17, "Motorola W377",                         135, "128 x 160 pixels", 0.3, "Black",            "Folder type phone",  35,  0.000000},
                        {true,  true,  18, "LG Xenon GR500",                        50,  "240 x 400 pixels", 2,   "Red",              "Slider",             658, 2.800000},
                        {true,  false, 19, "BlackBerry Curve 8900 BlackBerry",      135, "480 x 360 pixels", 3.2, "Silver",           "Candy bar",          21,  2.440000},
                        {true,  false, 20, "Samsung SGH U600 Ultra Edition 10.9",   135, "240 x 320 pixels", 3.2, "Rainbow",          "Slider",             169, 2.200000}
            };
    JS code in multisort-dataview.js
    Code:
     store.loadData(${phones});
    Did I miss anything?

  2. #2
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,717
    Vote Rating
    88
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      0  

    Default


    This is the GXT open discussion forum - we all use GWT to build out javascript, not the ExtJs library. Try one of the other forums.

Similar Threads

  1. Replies: 9
    Last Post: 6 Jul 2010, 2:33 PM
  2. how to send XML data from servlet to EXTjs
    By ahmed1812 in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 5 May 2010, 6:12 AM
  3. Replies: 1
    Last Post: 22 Mar 2010, 9:25 AM
  4. ExtJs Combo loading data from servlet.
    By Rats in forum Ext 2.x: Help & Discussion
    Replies: 6
    Last Post: 20 Aug 2009, 8:50 PM
  5. how to read data from a servlet and display it in a datagrid?
    By linker85 in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 25 Mar 2009, 11:25 PM

Thread Participants: 1

Tags for this Thread