1. #1
    Ext User
    Join Date
    Sep 2008
    Posts
    2
    Vote Rating
    0
    dongbin1717 is on a distinguished road

      0  

    Default how to use *.properties file in ExtJS?

    how to use *.properties file in ExtJS?


    Just, I want to know how to use properties file in extJS, just like we can use <s:text name="somestring" /> to get the value of somestring from a properties file by struts 2.0?

    how can get the value in ext, where is the way?

    thanks.

  2. #2
    jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,353
    Vote Rating
    77
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    I would suggest converting it ot a json object for faster client side access or writing an XML digestor.

  3. #3
    Sencha User nlotz's Avatar
    Join Date
    Dec 2007
    Location
    Hamburg, Germany
    Posts
    88
    Vote Rating
    0
    nlotz is on a distinguished road

      0  

    Default


    Taglibs will only work in JSPs, not in static Javascript-Files.
    Just save your Javascript-Sources as JSPs and import the Taglib-Definition:

    index.html :

    <head>
    <script type="text/javascript" src="myApp.js.jsp"></script>
    </head>


    myApp.js.jsp :

    <%@ taglib prefix="s" uri="/tags" %>

    Value of 'somestring': <s:text name="somestring" />

  4. #4
    Ext User
    Join Date
    Sep 2008
    Posts
    2
    Vote Rating
    0
    dongbin1717 is on a distinguished road

      0  

    Default


    Quote Originally Posted by nlotz View Post
    Taglibs will only work in JSPs, not in static Javascript-Files.
    Just save your Javascript-Sources as JSPs and import the Taglib-Definition:

    index.html :

    <head>
    <script type="text/javascript" src="myApp.js.jsp"></script>
    </head>


    myApp.js.jsp :

    <%@ taglib prefix="s" uri="/tags" %>

    Value of 'somestring': <s:text name="somestring" />
    thanks, I will try it and give response.

Thread Participants: 2