[CLOSED] Global Resources in DirectEvent Beforehandler

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] Global Resources in DirectEvent Beforehandler

    Is something like this even possible? I can't seem to find a way to have the Resources load up from my language packs.

    I tried even using a function like I use for my page title,

    <title><%= GetResource("LanguagePack", "systemTitle")%></title>

    it works for the title but not after I embed it into javascript.

    Any ideas!?! Thanks!

     
     <ext:Button ID="btnLogin" runat="server" Text="<%$ Resources:LanguagePack, txtLogin %>">
                                            <DirectEvents>
                                                <Click OnEvent="ProcessLogin" Before="#{sbStatus}.showBusy('<%$ Resources:LanguagePack, msgVerifyAccount %>');"
                                                    Failure="Ext.Msg.show({ 
                                    title   : 'Error', 
                                    msg     : '<%$  Resources:LanguagePack, msgLoginError %>',
                                    minWidth: 200, 
                                    modal   : true, 
                                    icon    : Ext.Msg.ERROR, 
                                    buttons : Ext.Msg.OK 
                                }); #{sbStatus}.clearStatus('<%$  Resources:LanguagePack, msgReady %>');">
                                                </Click>
                                            </DirectEvents>
                                        </ext:Button>
    Last edited by Daniil; Mar 01, 2012 at 7:15 PM. Reason: [CLOSED]
  2. #2
    Just to test I can do it this way, but I would prefer to do it in markup..

    btnLogin.DirectEvents.Click.Before = "#{sbStatus}.showBusy('" & Enterprise_Management_System.Resources.LanguagePack.msgVerifyAccount & "');"
  3. #3
    Hi,

    Unfortunately, I think the ASP.NET parser only supports adding localized resources on markup configured properties if the <%$ ... %> tag is the sole value.

    Try the following samples. The first should work, and the second will fail.

    // Works
    Text="<%$ Resources:LanguagePack, txtLogin %>"
    
    // Does not Work
    Text="Title : <%$ Resources:LanguagePack, txtLogin %>"
    Hope this helps.
    Geoffrey McGill
    Founder

Similar Threads

  1. [CLOSED] Javascript Global Error Handling
    By adelaney in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Jun 20, 2012, 8:30 PM
  2. Global Error Handling
    By wdk in forum 1.x Help
    Replies: 2
    Last Post: Apr 03, 2012, 2:34 AM
  3. [CLOSED] Global Exception Handling How to?
    By ISI in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: May 11, 2011, 11:57 AM
  4. [CLOSED] [1.0] Global error handling of DirectMethods
    By jchau in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Jul 27, 2010, 7:59 PM
  5. How to setting global Locale ?
    By guaike in forum 1.x Help
    Replies: 1
    Last Post: May 13, 2009, 4:26 PM

Posting Permissions