Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Aggregation binding does not work with named models in xml view

Hello All,

I have been facing issue with binding aggregations in XML views with named models especially when a binding context is set to the view

One strange thing is that local the i18n resource model is working fine when used for strings

Example :

A View is set binding context in controller with model "Amodel" and within the XML view I have a List using different model "BModel" as below

<mvc:View>

<Text  text="{/AModelText}"></Text>

<Table

     items="{BModel>/items}">

     <columns>

       <Column width="12em">

         <Text text="{18nModel>Col1Title}" />

       </Column>

       <Column >

         <Text text="{i18nModel>Col2Title}" />

       </Column>

     </columns>

     <items>

       <ColumnListItem>

         <cells>

           <Text text="{Cell1Text}"/>

           <Text text="{Cell2Text}" />

         </cells>

       </ColumnListItem>

     </items>

</Table>

<mvc:View>

In the above scenario all Col1Title and Col2Title are resolved correctly but since the whole view is set bindingcontext with "Amodel" AModelText is shown but the cells in ColumnListItem does not show any text.

When debugged the reference to binding for Cell1Text and Cell2Text were shown binded to "Amodel"

Any pointers to solve this issue would be of great help because now I have to do all the binding in Controller and use bindAggregations to get the results thus deviating from  the main use of named model.

Regards,

Vijay Sai

Not what you were looking for? View more on this topic or Ask a question