on 07-24-2018 1:34 PM
Hello experts,
Is it possible to use a smartField as MultiInput?
I have added annotations to add valueHelp to it. But it allows me to select only one input at a time.
When I inspected, I see it gets rendered as "sap.m.Input"
Is there a way to convert this to "sap.m.MultiInput"
My view.xml looks like
<mvc:View controllerName="Sf.smartField.controller.View1" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:mvc="sap.ui.core.mvc"
xmlns:form="sap.ui.layout.form" xmlns:smartField="sap.ui.comp.smartfield">
<form:SimpleForm minWidth="1024" maxContainerCols="2" editable="true" layout="ResponsiveGridLayout" labelSpanL="3" labelSpanM="3"
emptySpanL="4" emptySpanM="4" columnsL="1" columnsM="1">
<form:content>
<smartField:SmartLabel labelFor="id"/>
<smartField:SmartField value="{id}" id="id"/>
<smartField:SmartLabel labelFor="desc"/>
<smartField:SmartField value="{desc}" id="desc">
<smartField:configuration>
<smartField:Configuration controlType="auto"/>
</smartField:configuration>
</smartField:SmartField>
</form:content>
</form:SimpleForm>
</mvc:View>
Hello @shinyj,
You can use SmartMultiInput instead of SmartField.
The following URL tells you how to use it.
https://sapui5.hana.ondemand.com/#/topic/5644169deb76438f800f269b0cb715fc
NOTE: This control is available since 1.56.0.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, i want to use SmartMultiInput in my fiori extension.
here's my code
<core:FragmentDefinition
xmlns:core="sap.ui.core"
xmlns="sap.m"
xmlns:s="sap.ui.comp.smartmultiinput">
<Dialog id="dialog" class="dialog" afterClose="destroy" contentWidth="400px">
<content>
<Label required="true" text="{@i18n>CompanyName}"/>
<s:SmartMultiInput entitySet="Company" value="{name}" />
</content>
<buttons>
<Button id="okButton" text="{@i18n>OK}" press="modify"></Button>
<Button text="{@i18n>Cancel}" press="cancel"></Button>
</buttons>
</Dialog>
</core:FragmentDefinition>
i hope to see an Input and an icon which can open a value help dialog after clicked are rendered, but nothing rendered.
I feel stuck for two days, please help me, thank you so much!
Hi @amylee,
Sorry for not responding sooner.
Your problem is due to your SmartMultiInput Control not having the connection with a value help.
There may be three way to solve this.
If you create an OData service without importing existing search helps, you have to implement filter functions correctly to filter contents from your SmartMultiInput.
This URL explains defining ValueList annotation.
You can use this for my way 2 and way 3.
Best Regards,
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.