1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    5
    Vote Rating
    0
    biswajit.rout is on a distinguished road

      0  

    Default Unanswered: Request is not coming into my Struts 2 action method from the Extjs

    Unanswered: Request is not coming into my Struts 2 action method from the Extjs


    Hello All,
    We are doing one development activity based on Struts 2 + Spring 3 + Spring JDBC Template + Extjs 4.1

    I want my Combo box to be getting populated with dynamic data fetched from the DB. However when I am running, I can see it is not at all entering into my action method (Not even printing the SOP in the WLS console).

    I am assuming something wrong in my struts.xml or in the js file.




    Please find the list of files


    admin.js that is in Extjs 4.1 technology (only combo box part code)

    Ext.define(
    'MyNamespace.StoreModel', {
    extend:
    'Ext.data.Model',
    fields: [

    {name:
    'tablename'},
    {name:
    'displayName'}]
    });


    var
    crudComboStore = Ext.create('Ext.data.Store', {
    model:
    'MyNamespace.StoreModel',
    proxy : {

    type :
    'ajax',
    url :
    'http://localhost:7001/3pd/adminProcess.action',
    reader : {

    type :
    'json',
    root :
    'crudData'
    }

    }

    });

    crudComboStore.load();


    Struts.xml

    <?
    xml version="1.0" encoding="UTF-8"?>
    <!
    DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"

    "http://struts.apache.org/dtds/struts-2.0.dtd
    ">
    <
    struts>
    <
    constant name="struts.enable.DynamicMethodInvocation" value="false" />
    <
    constant name="struts.devMode" value="false" />

    <
    package name="default" namespace="/" extends="struts-default">

    <
    action name="adminForm">
    <
    result>admin/admin.jsp</result>
    </
    action>

    <
    action name="adminProcess" method="getMasterTableList"
    class
    ="com.xx.xxx.admin.action.AdminAction">

    <
    result name="input">admin/admin.jsp</result>
    <
    result name="error">admin/admin.jsp</result>
    <
    result name="success">admin/success.jsp</result>
    </
    action>
    </
    package>
    </
    struts>

    Action method

    public
    String getMasterTableList() {
    System.
    out.println("AdminAction.getMasterTableList @@@@@");

    List<CRUDSVO> objCRUDTableList =
    null;
    Iterator<CRUDSVO> objItr =
    null;
    CRUDSVO objCRUDSVO =
    null;
    Map<String, String> interfaceObject =
    null;
    List<Map<String, String>> interfaceArray =
    new ArrayList<Map<String, String>>();
    Map<String, List<Map<String, String>>> finalInterfaceObject =
    new HashMap<String, List<Map<String, String>>>();

    try
    {
    HttpServletResponse response = ServletActionContext.getResponse();

    objCRUDTableList =
    adminBo.getCRUDTableList();
    objItr = objCRUDTableList.iterator();

    while
    (objItr.hasNext()) {
    objCRUDSVO =
    null;
    objCRUDSVO = objItr.next();

    interfaceObject =
    new HashMap<String, String>();
    interfaceObject.put(AdminConstants.
    TABLE_NAME, objCRUDSVO.getTableName());
    interfaceObject.put(AdminConstants.
    DISPLAY_NAME, objCRUDSVO.gettableDisplayName());
    interfaceArray.add(interfaceObject);

    }

    finalInterfaceObject
    .put(AdminConstants.CRUD_DATA, interfaceArray);
    response.getWriter().write(finalInterfaceObject
    .toString());
    }
    catch (IOException e) {
    e.printStackTrace();

    }

    return
    SUCCESS;
    }


    Thanks in advance for guiding me.


    Best regards,
    Biswajit

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,801
    Answers
    3467
    Vote Rating
    834
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Looking at the network tab in developer tools in the browser, do you see the request?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi