cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to align text added in paystub header extension fragment

sard
Participant
0 Kudos

Hello All:

I need to add some additional data to paystub (version2) header. I need to extend the view and not replace. I have tried for an entire day to add status text or at least be able to align simple text to the right. The text only gets added left aligned. I have tried multiple combinations of xml code and also code similar to samples in SAPUI5 Explored

like

https://sapui5.hana.ondemand.com/sdk/explored.html#/sample/sap.ui.layout.sample.Form354/code

https://sapui5.hana.ondemand.com/sdk/explored.html#/entity/sap.m.ObjectStatus/samples

Would you please help with what I am missing. Thank you.

I need this blue highlighted text aligned to the right below the amounts.

Accepted Solutions (0)

Answers (3)

Answers (3)

sard
Participant
0 Kudos

Sai Vellanki, Santhosh Gowda:

Thank you both for your time.

I need to add some data and use the layout in the extension that SAP provides. The layout options did not work in the extension fragment. Provided below screenshots of the code in the parent view and custom extension fragment, hope that makes more sense.

Appreciate all your help.

santhu_gowdaz
Active Contributor
0 Kudos

You seen this in explored. What ever you added in <attributes> that will come in left side and <statuses> will come in right side so add your text under <statuses>.

<ObjectHeader
  binding="{/ProductCollection/0}"
  title="{Name}"
  number="{Price}"
  numberUnit="{CurrencyCode}" >
  <statuses>

<ObjectStatus

  text="Mt Own Text"

  state="None" />


  <ObjectStatus
  text="Some Damaged"
  state="Error" />
  <ObjectStatus
  text="In Stock"
  state="Success" />
  </statuses>
  <attributes>
  <ObjectAttribute text="{WeightMeasure} {WeightUnit}" />
  <ObjectAttribute text="{Width} x {Depth} x {Height} {DimUnit}" />
  <ObjectAttribute text="{Description}" />
  <ObjectAttribute
  text="www.sap.com"
  active="true"
  press="handleLinkObjectAttributePress" />
  </attributes>
  </ObjectHeader>

saivellanki
Active Contributor
0 Kudos

Hi SK,

You mean like this?


Please check the sample here: Plunker - ObjectHeaderTextAlign


Regards,

Sai Vellanki.