cancel
Showing results for 
Search instead for 
Did you mean: 

Binding two entities to Icon tab bar header and content

Former Member
0 Kudos

Hi Experts,

I have a requirement that I have an Icontab bar whose headings are coming from one entity and then inside the icon tab bar i have made a text area, whose value should come from another entity.

I have binded items of icontab bar to one entity so now headings are coming.

But how to bind the content based on the key.

Thanks Mansi

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Any idea anyone how to do this in xml view, binding one control conditionally for different icon tab bars.???

santhu_gowdaz
Active Contributor
0 Kudos

may be IconTabBar will be single and you need to bind different entities to IconTabFilter.

like this,

<IconTabBar applyContentPadding="false"

  select="select" expandable="true" expanded="true" id="idIconTabBarNoIcons" >

  <items>

  <IconTabFilter >

  <content>

  <Text  text="{EntityText1}"/>

  </content>

  </IconTabFilter>

  <IconTabFilter >

  <content>

  <Text  text="{EntityText2}"/>

  </content>

  </IconTabFilter>

  </items>

  </IconTabBar>

Former Member
0 Kudos

But these Icon tab bar filter is actually items which is coming dynamically.

It can be 3, 4 or anything. I can not make it static.

santhu_gowdaz
Active Contributor
0 Kudos

If i understood you properly, The Items will be variable but how the entity will be change dynamically.

so Entity is always static.And depending upon your values Dynamically you need to create IconTabBar? It's looking wrong for me.

Former Member
0 Kudos

Hi Santhosh,

I dont want to give <IconTabFilter> twice it should come from binding itself.

Thanks,

Mansi

Former Member
0 Kudos

Thanks for reply.

Maksim my requirement is I am showing Document Id in header and based on those Id's I have to show text in Text Area.

In Select event I am looping on my array of documents, then i match document key's with the selected key and then if match is found i am setting the value in text area.

It is giving me no error infact after set if i try to getvalue() it is showing there but in the screen that value is not reflecting. what could be the reason.

select:function(oEvent)

  {

    var sKey = oEvent.getParameter("selectedKey"),

  oFilter;

   for (var i=0;i<this._notes.length;i++)

     {

         if (sKey === this._notes[i].DocumentKey)

         {

         

             this.getView().byId("textArea").setValue(this._notes[i].LongText);

          

         }

}

}

@Dennis : ya entity means property here.... the entityset that we refer to

Thanks

Mansi

former_member182862
Active Contributor
0 Kudos

Will this shed some lights?

JS Bin - Collaborative JavaScript Debugging

Thanks

-D

Former Member
0 Kudos

Thanks Dennis...

Its a great help. But my views are XML.

Could you please help me out with the way to do this binding there.

<IconTabBar applyContentPadding="false"

  select="select" expandable="true" expanded="true" id="idIconTabBarNoIcons" items="{/Entity1}">

  <items>

  <IconTabFilter text="{DocumentText_Text}" key="{DocumentText}">

  <content>

  <TextArea  rows="10" id="textArea"/>

  </content>

  </IconTabFilter>

  </items>

  </IconTabBar>

This is the code for my Icon tab bar. How to go about with this??

Private_Member_15166
Active Contributor
0 Kudos

Mansi Dixit wrote:

Thanks Dennis...

Its a great help. But my views are XML.

Could you please help me out with the way to do this binding there.

<IconTabBar applyContentPadding="false"

  select="select" expandable="true" expanded="true" id="idIconTabBarNoIcons" items="{/Entity1}">

  <items>

  <IconTabFilter text="{DocumentText_Text}" key="{DocumentText}">

  <content>

  <TextArea  rows="10" id="textArea" value="{value}" />

  </content>

  </IconTabFilter>

  </items>

  </IconTabBar>

This is the code for my Icon tab bar. How to go about with this??

See value in bold.

Former Member
0 Kudos

but this value is from different entity .

We have to match the key and then bind it..

Private_Member_15166
Active Contributor
0 Kudos

I don't know this will work or not. Did you tried by writing like this.

<TextArea  rows="10" id="textArea" value="{/EntitySet/value}" />

Former Member
0 Kudos

Hi Dhananjay,

My requirement is that I need to bind it based  on the selected header.

How to give this condition while binding. Any idea??

Thanks,

Mansi

former_member182862
Active Contributor
0 Kudos

can you elaborate on "entity"? are you referring to property in a model?

Thanks

-D

former_member182372
Active Contributor
0 Kudos

you can do filter on the binding in icon tab bar select event handler