Skip to Content

Variant Managment List is not getting personalized settings?

Hello,

I am working on Variant Managment and TablePersoController. What i can do is i can add variants to ushell.container and i can delete them. However, when i refresh the page. I want to get those settings into my view. But they are not coming, i can see in debug mode that i have the variant settings there.

########## CONTROLLER ######################################################
this.oVariantModel = new sap.ui.model.json.JSONModel();
//This is a array of variants that i stored above this piece of code
this.oVariantModel.oData.Variants = Variants; 
//"Variants" is the ID of Variant Managment view.
this.getView().byId("Variants").setModel(this.oVariantModel);

################################### XML VIEW ###############################
#VariantSet name in ushell.container is DemoTableUISet#

<v:VariantManagement variantItems="{/DemoTableUISet}" select="onSelect" 
save="onSaveAs" enabled="true" manage="onManageVariant"
showExecuteOnSelection="false" showShare="false" id="Variants">
<v:variantItems>
<v:VariantItem text="{Name}" key="{Key}"/>
</v:variantItems>
</v:VariantManagement>


# Maybe i should change DemoTableUISet to something else but i dont think so
Because variant managment is working. Problem is in somewhere else. If you
need anything to understand i can share more code 
Thanks in advance #
Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Oct 18, 2018 at 02:18 PM

    what you are doing? why you are doing that?

    sap's smart control takes care of the variant management, you don't have to do anything.

    Add a comment
    10|10000 characters needed characters exceeded

    • Trying to add personalise settings to sap.ui.table. What i want to achieve is if client is wants to save settings of a table he make from TablePersoController. Later he can use these settings. So , i want to achieve it via Variant Management and ushell.container service.

      I am not using Smart controls. If you mean SmartTable by saying smart controls.

  • Posted on Oct 18, 2018 at 03:06 PM

    why not smart table?

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.