Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Bug with screenLoader, i18n, and nested components

    This is part of my screen definition:
    Code:
    ...
    	<DynamicForm ID="ViewsForm">
    		<fields>
    		    <SelectItem ID="ViewsFormSelectItem" width="240">
    		        <title><fmt:message key='tabBar_Views' /></title>
    	    		<icons>
    			    	<PickerIcon ID="SaveViewButton">
    					    <src>[SKIN]/actions/add.png</src>
    					    <prompt><fmt:message key='tabBar_NewTab' /></prompt>
    					</PickerIcon>
    ...
    This is what the screen loader sends to the browser:
    Code:
    ID:"ViewsForm",   
       fields:[
            {
                ID:"ViewsFormSelectItem",
                width:240,
                title:"Views",
                icons:[
                    {
                        ID:"SaveViewButton",
                        src:"[SKIN]/actions/add.png",
                        prompt:{
                            "fmt:message":{
                                key:"tabBar_NewTab"
                            }
                        }
                    },
    Aycs, the fmt:message hasn't been transformed inside the nested icon definition, that on the SelectItem works well.

    v8.3p_2013-04-28/PowerEdition Deployment (built 2013-04-28)

    Regards,
    fatzopilot

    #2
    Thanks for the report, this has been fixed for tomorrow's 3.1 and 4.0 builds.

    Comment


      #3
      Confirmed, thanks!

      Comment


        #4
        Hi,

        there is a problem with i18n fmt transformation again (probably unnoticed so far).
        If in the code below the offendingDatasource is not set, i.e. removed from the code, everything works.
        Otherwise, the PickerIcon's promt is not transformed, and there is <prompt><fmt:message key='tabBar_NewTab'/></prompt> in the server response instead of the localized text.

        Code:
        <isomorphicXML xmlns:fmt="WEB-INF/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance">
            <fmt:bundle basename="com.aCompany.Messages" />
        	<TabSet ID="PortalTabSet" tabBarAlign="left" width="100%">
        		<tabBarControls>
        		    <IButton ID="ItWorksHere" autoDraw="false">
        				<title><fmt:message key='tabBar_NewTab'/></title>
        				<prompt><fmt:message key='tabBar_NewTab'/></prompt>
        				<icon>[SKIN]/DynamicForm/text_control.gif</icon>
        			</IButton>
        			
        			<DynamicForm ID="ViewsForm">
        			    <dataSource>offendingDatasource</dataSource>
        				<fields>
        					<SelectItem width="240">
        						<icons>
        							<PickerIcon width="16" height="16">
        								<src>[SKIN]/actions/add.png</src>
        								<name>New</name>
        								<prompt><fmt:message key='tabBar_NewTab'/></prompt>
        							</PickerIcon>
        						</icons>
        					</SelectItem>
        				</fields>
        			</DynamicForm>
        		</tabBarControls>
        	</TabSet>
        	<DataView ID="PortalDataView" width="100%" height="100%"
        		overflow="hidden" autoDraw="true">
        		<members>
        			<Canvas ref="PortalTabSet" />
        		</members>
        		<modulesDir>modules/</modulesDir>
        	</DataView>
        </isomorphicXML>
        SmartClient Version: v8.3p_2013-05-24/PowerEdition Deployment (built 2013-05-24)

        Thanks,
        fatzopilot

        Comment


          #5
          <icons> should contain tags that say <FormItemIcon> not <PickerIcon>. There is no <PickerIcon> class in the docs.

          Comment


            #6
            Ok,

            thanks for the hint.
            Replaced the <PickerIcon> tags with <FormItemIcon> ones but to no avail with respect to the fmt transformation.

            Comment


              #7
              We're not seeing an issue here. Make sure your sc/system/schema/FormItemIcon.ds.xml file is not somehow stale (it should have a field "prompt" of type "string") and that your tag does not have a typo (it's case sensitive - needs to be exactly <FormItemIcon>).

              Comment


                #8
                Everything seems OK from my side (i.e. FormItemIcon has a prompt field and I did a copy and paste with the FormItemIcon tag. As described, it works until a datasource is set for the DynamicForm to which the FormItemIcons belong.

                Comment


                  #9
                  That's a seemingly impossible result - two totally unrelated types of processing interfering with each other. Can you please very carefully double check that?

                  Also please indicate whether you see that the <fmt> tag has been translated if you look at the JS output of the ScreenLoader servlet.

                  Comment


                    #10
                    Well,

                    it is obvious to me that somehow, the datasource is involved.
                    I removed it and everything worked, added it again and all fmt tags below the datasource tag were not transformed, those above were.

                    Comment


                      #11
                      It seems like something is wrong inside of "offendingDataSource" that mucks up the whole system. Can you share that DataSource definition?

                      Comment


                        #12
                        The contents of the datasource don't matter. Iff something is present (could be a single letter) between the <dataSource></dataSource> tags, the error occurs, if not, it works with regard to the fmt transformation. So the transformation on the server must be somehow irritated by the dataSouce tags, iff they have a value.
                        Did you try the example given and did it work for your?
                        May it be an encoding Problem (mine is UTF-8)?

                        Comment


                          #13
                          Thanks much for isolating this for us - we had a bunch of automated tests around this feature, but you hit upon a specific tag order that had a bug (related to whether or not a bundle was explicitly or implicit declared in a referenced DataSource).

                          This is fixed for tomorrow's 3.1 and 4.0 builds (and of course there's a new automated test).

                          Comment


                            #14
                            Hi,

                            I don't see any improvements regarding this issue for
                            SmartClient Version: v8.3p_2013-06-03/PowerEdition Deployment (built 2013-06-03)

                            Did your changes made it into this release?

                            Thanks,
                            fatzopilot

                            Comment


                              #15
                              Sorry, the fix was not actually ported to 3.1. It is now - please try tomorrow's build.

                              Comment

                              Working...
                              X