• typeahead in bootstrap modal

    By Sachin Kulkarni 4 years ago

    When using typeahead field connected to NAB in bootstrap modal, the selected value is not getting assigned back to the field. While the same works when selected from nab popup.
    Any help would be appreciated.

    Thank you.

    • By B Gleeson 4 years ago

      Hi. Can you provide a simple code example to reproduce the problem?

      • By B Gleeson 3 years ago

        I tried this and had no issues. Can you provide more detail on how you encountered a problem? This was my code sample:

        <xe:namePicker id="namePicker2" for="inputText2" rendered="false">
            <xe:this.dataProvider>
                <xe:dominoNABNamePicker></xe:dominoNABNamePicker>
            </xe:this.dataProvider>
        </xe:namePicker>
        <xp:inputText id="inputText2" styleClass="form-control">
            <xp:typeAhead mode="full" minChars="1">
                <xp:this.valueList><![CDATA[#{javascript:
                    var result = getComponent("namePicker2").getTypeAheadValue(this);
                    return result;
                    }]]>
                </xp:this.valueList>
            </xp:typeAhead>
        </xp:inputText>
        <xp:button id="button10" value="dialog">
            <xp:eventHandler event="onclick" submit="true" refreshMode="complete">
                <xp:this.action>
                    <xp:executeScript>
                        <xp:this.script><![CDATA[#{javascript:
                            var dialog = getComponent("dialog2");
                            dialog.show();}]]>
                        </xp:this.script>
                    </xp:executeScript>
                </xp:this.action>
            </xp:eventHandler>
        </xp:button>
        <xe:dialog id="dialog2">
            <xe:dialogContent id="dialogContent2">
                This is a dialog
                <xp:inputText id="inputText3">
                    <xp:typeAhead mode="full" minChars="1">
                        <xp:this.valueList><![CDATA[#{javascript:
                            var result = getComponent("namePicker1").getTypeAheadValue(this);
                            return result;}]]>
                        </xp:this.valueList>
                    </xp:typeAhead>
                </xp:inputText>
            </xe:dialogContent>
        </xe:dialog>