I18N and dataprovider

Hello,
I'm trying to implement the internationlization for an application. The language should be changed at runtime that's why I use the resourceManger functionality of flex. My problem is that some of our app widgets liek comoboxes are using dataprovider in order to be filled. If I change the language these widgets are not updated. Here is some sample code:
<mx:ComboBox id="combo" dataProvider="{comboArray}"/>
the dataprovider is initialised in the onApplicationComplete method of the view
comboArray = [{label:resourceManager.getString('language', 'form.value1.label'), data:"test1"},
{label:resourceManager.getString('language', 'form.value2.label'), data:"test2"}];
Can anybody give me a hint how to solve this issue or best practices?
Regards,

Hi mwoodpecker,
When you are changing the language of the application...try to rebuild the comboArray array and reset the dataprovider for your
ComboBox.
This will resolve the problem.
Thanks,
Bhasker

Similar Messages

  • I18N and Preferences

    G'day folks,
    We are developing a client/server application and we are not having any problems (yet) with the ResourceBundle approach to locale handling.
    However, the Java Tutorial recommends using the Preferences API in place of Properties. As ResourceBundles are really just a convenience API wrapped around Properties, I was wondering what's the best approach for implementing I18N and L10N using Preferences.
    Has anybody tried this? Any pointers would be much appreciated. Ciao.

    I think that the preferences API may be a sensible approach to storing a user's preferred locale setting...however, it doesn't replace ResourceBundles for translated, localized resources. You can and should continue to use ResourceBundles for localized resources.

  • Text Input and dataProvider

    I have Text input box for the user to enter the heading for a new record in NewRecord form.
    Like:
    <mx:TextInput text="Enter Subject Here"/>
    and then it is saved in the Database...
    I have another form called ChangeRecord so that the user can change the heading or Subject..
    How do i populate the name already in DB in the TextInput Box above... There is no dataProvider pram in TextInput...
    I have the following:
    CODE
    [Bindable] public var NR:ArrayCollection;
    private function resultNR(event:ResultEvent):void{
               NR:ArrayCollection(event.result);
    <mx:TextInput text="Enter Subject Here"/>
    Any help is appreciated.

    Hi,
    Post this over at the flex general discussions forum - they'll have better answers for this.
    -Anirudh

  • Flex 2 beta 3  Menubar icon and dataprovider

    I am using following code:-
    <mx:MenuBar height="100%" labelField="@label"
    showRoot="true" iconField="Icon" >
    <mx:XMLList>
    <menuitem label="AWB">
    <menuitem label="New AWB"
    Icon="@Embed(source='images/menu/create.jpg')"/>
    </menuitem>
    </mx:XMLList>
    </mx:MenuBar>
    I hv 2 qtn:-
    1) how can i populate menubar(tried but failed) from an XML
    file as in flex 1.5.
    eg:-
    dataprovider="xmlsource" where xmlsource is the id for xml
    file.
    2) how can i show menuicons . in simple coding(as above)
    .And when using external xml source as dataprovider for
    menubar.
    early response appreciated!
    thanks in advance!
    vinay sharma

    I just successfully deployed all three FDS web applications
    on Tomcat 5.5.17 with Sun 1.5.0_06 without any exceptions. From the
    stack trace it looks like this is thrown at startup. Can you
    confirm?
    Are you sure you deployed the war files cleanly?

  • Netbeans and DataProvider

    Hello,
    I have put an own DataProvider in an SessionBean and at first it worked when i bound it to a Table. I restarted my Netbeans and now this connection is lost.... I cannot attach my DataProvider to the Table. It is not in the drop down list from the Table Layout Bind to Data.
    Please help.

    Solution:
    You have to Close the Project and reopen it. Than the DataProvider is available.

  • DataGrid and DataProvider

    Hello,
    Could you explain me we how access different Node Level of an
    XML dataProvider, from a DataGrid ??
    Thanks very much

    I posted a similar question on another site, have not heard
    anything back yet.
    http://www.actionscript.org/forums/showthread.php3?t=146034
    when having e4x or XMLCollection as dataProvider, it seems
    impossible to access anything but the immediate children or
    immediate attributes from the root. I found a hack to get around
    it, but it makes little sense to me. Here's a link:
    http://www.adobe.com/devnet/flex/articles/e4x_04.html.
    The suggestion described in the link works, but the resultant rows
    are no longer sortable by the affected columns.
    I played around with Laszlo and i know that Grid works in
    it's simplest form in Laszlo just fine. Can someone help me
    understand why there is a need to have a separate function of
    parsing e4x to display in the DataGrid.
    Thanks

  • I18N and jar files

    We have a site fully i18n'd. My question is this: how can we separate the .properties files from the jar file so we do not have to update the jar file for a static text change?
    I've searched the forums and haven't benn able to find a solution.
    Any help would be appreciated.
    Thanks, Joe

    you can put your properties file anywhere in the classpath.
    Most likely you classpath consists of
    - one or more jar file
    - one or more directories
    just move the properties from the jar file into on of the directories (in the proper subdirectory according to the package name of course) and it should work
    regards
    Spieler

  • UIX EventHandler  and DataProvider to JSF

    Does the migration utility provide a mapping for Java code, or is this a manual process?
    If manual, what are the patterns are required for these UIX interfaces.
    DataProvider's can map striaght to a managed bean, but EventHanlder's are a different matter.
    JSF Events (Listeners) do not provide the same function as the UIX Event Handlers. JSF has separate concepts, Controllers and Listeners.
    Thus, again, I'm a little confused on which direction to take.
    Our product makes heavy use of UIX Event Handlers and a complex Page Flow Engine.
    Any help welcome.
    Thanks
    Pat

    Brado,
    we are looking at UIX migration but there isn't much we can do for JSPs. UIX is a technology close to Faces, which is why we might be able to help here. There is a statement of direction available on the Jdeveloper website on OTN that talks about our UIX plans (otn.oracle.com/products/jdev)
    Frank

  • Access to Class Instance inside TileList and DataProvider?

    I have a TileList that is fed by a DataProvider.  The DataProvider places a source Class (and corresponding MovieClip) into the TileList as visual and interactive objects.
         dpChords.addItem({ label:tt, source:ChordUnit, data:i, scaleContent:true }); 
    How do I pass unique values to the instances of the "ChordUnit" within the TileList?
    public function setChordBin(song:int):void {
              var dpChords:DataProvider = new DataProvider();
              var i:uint;
              // determine chord set
              if (song == -1) {
                        activeChords = allChords;
               else {
                        activeChords = songChordSets[song];
              // fill dataProvider
              for(i=0; i<activeChords.length; i++) {
                        var tt = activeChords[i];
              dpChords.addItem({ label:tt, source:ChordUnit, data:i, scaleContent:true }); 
              chordBin.dataProvider = dpChords;
         // FORMATTING
              chordBin.columnWidth = 105;
         chordBin.rowHeight = 115; 
              chordBin.direction = ScrollBarDirection.HORIZONTAL;
              chordBin.setStyle("contentPadding", 5); 
              chordBin.setRendererStyle("imagePadding", 0);
              chordBin.scrollPolicy  = ScrollPolicy.ON;
              // set style for labels
              chordBin.setRendererStyle("textFormat", textFormat2);
              // set the background skin
              chordBin.setStyle("skin", lightBackground);
              //set the cell renderer
              chordBin.setStyle("cellRenderer", MyTileListRenderer);
        // EVENTS
              chordBin.addEventListener(ListEvent.ITEM_ROLL_OVER, chordBinItemOVER);
              chordBin.addEventListener(ListEvent.ITEM_ROLL_OUT, chordBinItemOUT);
              chordBin.addEventListener(ListEvent.ITEM_CLICK, chordBinItemCLICK);

    Here is the "" Class:
    package {
              // associates to "ChordUnit" MC graphic in library
              import flash.display.*;
              import flash.events.*;
              import flash.net.URLRequest;
              public class ChordUnit extends MovieClip {
                   public var imagePath:String;
                   public function ChordUnit():void {
                        loadDiagramImage(imagePath);
                   public function loadDiagramImage(imagePath:String) {
                        trace (imagePath)
                        var request:URLRequest = new URLRequest(imagePath);
                       this.diagramView.scaleContent = true;
                        // this.diagramView.addEventListener(Event.COMPLETE,loadComplete);
                        // this.diagramView.addEventListener(ProgressEvent.PROGRESS,loadProgress);           
                        this.diagramView.load(request);
    Of course, without being able to pass a unique "imagePath" value into the Class instance, the trace is "null".

  • Same WAD Template to be used for different queries and dataprovider

    Hi All,
    I want to create a WAD template that cound be use by 100 more queries.
    Making setting in SPRO or RSCUSTV27 will make it a default template for all the queries.
    I only want the template to be used for say MM module(100 queries).
    Any way it can be done?
    Please help.
    Thanks
    Vinay

    Hi Vin Loh,
    I assume your requirement as this:
    Case 1: You have N querie(s) on several infoproviders in your case MM module, and that you would like to display all the queries in a single WAD report? You can do it! Its a feasible solution.
    Goto WAD > Insert a 2 X 2 table > In the (1,1) box insert a drop down box. In the (1,2) You may add a Title of type 'Text' > In the (2,1) box you may add a 'Navigational Pane' > In the (2,2) cell add the 'Analysis Grid' > Create a Dataprovider DP_1 referencing any frequently accessed query. As of now a template has been created, which can be modified as accordance to suit your requirements.
    Now, once done, goto the dropdown box settings. This DDBox's main objective is to give you acess to all the N queries in your MM module. Goto 'Web Item Params' > Choose the 'Data Binding' option > Edit Parameter > In the 'Data Binding Type' choose 'QUERY VIEW' > Goto the 'Selection of Query Views' > Check the option 'Specify List of Query Views' > Under 'Single Entry in DD...' choose Initial State as QUERY; Not QUERYVIEWS > Choose your N queries as listed here. No need to create N different DPs or N different reports.
    Here, your iView is of type ..TEMPLATE=ZTEST.. for WAD based reports; not ..QUERY=ZTEST...
    Guess it will resolve your issue.
    Case 2: You wish to create a BEx template for all your existing MM queries as run on BEx Web based analyzer? In this case you need to check on the KM config. In the portal you have the Imported iViews templates.
    Thanks,
    Arun Bala

  • I18n and UTF8

    Hello.
    I have a problem with a web application that handles 3 languages (English, Spanish and Portuguese). The web pages are showed correctly using the fmt:message tag library. But, one of the application features is to send email notifications, and in the email text the characters that do not bellow to English language are showed incorrectly.
    I have the text in a .properties file, this is the value in the file:
    --- Por favor no responda a esta direcci{color:#000000}\u00F3{color}n de correo electr\u00F3nico, este mensaje es enviado autom\u00E1ticamente por el sistema ---
    And this is how it showed in the email text:
    --- Por favor no responda a esta direcci{color:#ff0000}?{color}n de correo electr{color:#ff0000}?{color}nico, este mensaje es enviado autom{color:#ff0000}?{color}ticamente por el sistema ---
    The correct message should be:
    --- Por favor no responda a esta direcci{color:#ff0000}&oacute;{color}n de correo electr{color:#ff0000}&oacute;{color}nico, este mensaje es enviado autom{color:#ff0000}&aacute;{color}ticamente por el sistema ---
    We are using the getMessage method of the org.springframework.context.MessageSource class to "translate" the key value.
    We have one developing environment that is on a Windows server and one production environment that is on a Solaris server. The error occurs in the production environment but in the developing enviroment does not. Both environment runs Tomcat 5.0.28. On developing server we have java 1.4.2_14 and 1.4.2_17 on production server, Solaris version is 2.9 and runs on a sun sparc.
    I think that the problem could be in the Java configuration instance of the source code, maybe a environment variable or some Java property which should have a different value.
    Thanks for the help you can give me... if you need more information, just let me know.
    Regards
    P.S: I am not a good English writer, I did my best hoping you can understand the problem.
    Edited by: carlos.bracho on Apr 15, 2008 12:09 PM
    Edited by: carlos.bracho on Apr 15, 2008 12:11 PM

    carlos.bracho wrote:
    If that was the problem, why the message is sent correctly in the windows environment and in the solaris environment is not? Perhaps in your Windows environment the something.properties file is encoded in ISO-8859-1 (as it is required to be) but in the Solaris environment it is encoded some other way?
    Although I would expect it to be correct in Solaris and wrong in Windows if that sort of problem existed. Have you done anything to test what data is being sent? Right now you have two steps:
    1. Get data from properties
    2. Send data via e-mail
    and you are trying to test those two steps in a single test. Break them apart and test them separately.
    Edit: and are both of those servers connecting to the same SMTP server, or is that different as well?

  • MSS Object and Dataprovider

    Dear Guru's
    I have question about the selection of employees in the approve working time feature based on the following example:
    Manager X is the Line manager of organizational unit X, but he has to approve working time from both employee Y that is in organization unit Y and emplyee Z that is in organizational unit Z. Both organizational units are under the supervision of another manager. Also the organizational units have no relationship to each other in the organization structure.
    Is it possible the use OADP or any other method (except using workflow)  to select both employees for manager X so he can approve their working times ?
    Please let me know.
    Kind regards.

    Hi Stephen,
    It is very much possible using OADP. You need to ensure the following:
    1) There is proper relationship is maintained in OM between the Org Unit X and Y and X and Z ( may be u can have custom relationship for that, specifically for this requirement.)
    2) You have created proper evaluation paths to read employees ( via positions) in from org unit Z and Y ( use the relationship created above).
    3) Create view in OADP node of IMG and do the needful customizing
    4) Assign the view to view grp..etc...
    Hope this helps.
    Cheers!
    Aditya

  • I18N and netui-template:setAttribute ..

    Hi,
    In my jsp I am using setAttribute tag as follows
    <b><netui-template:setAttribute name="title" value="My Page title"></netui-template:setAttribute>
    </b>
    I want to read the "value" attribute from a Application Resource.
    So I did the following:
    <i> <netui-template:setAttribute name="title" value="<bean:message key="my.value.title"/>"></netui-template:setAttribute></i>
    But it does not compile, wondering if you can help.
    Thanks in advance
    Jaan

    You can also decalre the bundle in your JSP, when you don't use a pageflow:
    JSP:
    <netui-data:declareBundle name="labels" bundlePath="bundle.test" />
    Submit Button:     <netui:button value="{bundle.labels.submit}"/>
    Cancel Button:     <netui:button value="{bundle.labels.cancel}"/>
    Bundle file:
    submit=Submit
    cancel=Reset
    Thomas Cook wrote:
    If you're using page flows you can do the following...
    In your page flow in the class comment:
    @jpf:message-resources resources="messages"
    In your JSP:
    <netui:label value="{bundle.default.nameLabel}"/>
    In your /WEB-INF/classes/messages.properties file:
    nameLabel=Name
    Alternately, if you're using the "key" attribute on your
    message-resources annotation you'd do the following...
    In your page flow in the class comment:
    @jpf:message-resources key="foo" resources="messages"
    In your JSP:
    <netui:label value="{bundle['foo/jpfDirectory'].nameLabel}"/>
    In your /WEB-INF/classes/messages.properties file:
    nameLabel=Name:
    Where your .jpf file is /jpfDirectory/Controller.jpf.
    I hope this helps.
    Thomas
    Claus Ljunggren wrote:
    Hi,
    I want to i18n my netui:button. Does it have to be this uggly?
    <i18n:getMessage messageName="labelCreateContact"
    id="createContact"/>
    <netui:button type="submit" value="<%=createContact%>"/>
    btw, workshop claims that it doesn't know the createContact inside <%=%>,
    but it works when run.
    TIA,
    Claus Ljunggren

  • Sharing dataProvider and rowSet in multiple threads....

    Hi,
    I did the followings:
    Created rowset that to become a prepared statement:
    'select username where username=?'
    Initialized rowset and provider at the start of the program.
    Pass the rowset and dataprovider to all the threads.
    Now, let's say all the threads run at once.. is this thread-safe?
    thread1
    setObject(1,value1);
    thread2
    setObject(1,value2);
    etc.
    Any issue in doing this? Really appreciate any info anyone can give.

    Hello,
    We are still working on the VWP version of how to do inserts/updates/deletes. In the meantime, you can draw your coding examples from http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/inserts_updates_deletes.html
    I am confused by the relation ship between the prev/next buttons and the table. I assume that the prev/next are for the master fields and that the table is showing detail data? If that is the case, then how are you coordinating the change? Are you calling setObject on the rowset for the detail data?

  • Font embedding and font fallback

    I am attemping to use Myriad Pro as an embedded font in my
    Flex application. Unfortunately, this application must support
    international input and Myriad Pro does not have the necessary
    glyphs to display, e.g. Japanese. Text using glyphs not in the font
    appears as simply blank. I've tried to add a fallback for these
    glyphs, e.g. 'fontFamily: "Myriad Pro", "Arial Unicode MS"' but if
    I do that the embedded font is ignored and it always uses Arial
    Unicode MS. Is there any way I can support i18n and use the
    embedded font simultaneously?

    And I just found this...
    "Beginning with Flash Professional CS5, Flash automatically embeds all characters used by any text objects that contain text."
    So basically I don't need to build out the embedded font.

Maybe you are looking for

  • Dynamic Forms

    Two questions: 1. What am I doing wrong? 2. Is this the best way to do it? Let's say I have a form.  And that form has many possibilities for what fields may be needed. Instead of showing irrelevant fields in the form, I'd like to only show the ones

  • AME: Parallel notification is not working

    Hi, While setting up AME for Invoice Apporval(in R 12.1.2), even after configuring action type(approval-group chain of authority) ordering mode as "parallel" and voting menthod as "First Responder Wins", AME is not sending notification to all the mem

  • Gtk-gir conflicts with atk and gtk2 updates [SOLVED]

    When upgrading with pacman -Syu I get the following error: error: failed to commit transaction (conflicting files) atk: /usr/share/gir-1.0/Atk-1.0.gir exists in filesystem gtk2: /usr/share/gir-1.0/Gdk-2.0.gir exists in filesystem gtk2: /usr/share/gir

  • URL:s, the way to specify them ?

    I have a file on my filesystem, lets say C:\file.txt. I want to send an URL to a server so it can connect to my computer and download it via http ( in this case the file file.txt). Therefore I need to specify the host ( in my case my computer ) when

  • Unable to read Tokens

    Help~! Once again, my program can work on IDE but not on DOS I wanted to read the data as token.... like this while (recordTk.hasMoreTokens()){                  System.out.println("Any more token?");                 processStr = recordTk.nextToken();