I am trying to add a new checkbox into a UI screen for my installer.
So far I have declared the property as seen below:
<Property Id="RS232" Value="1" Secure="yes"/>
And in the UI, my checkbox has been added as:
<Control Id="myNewCheckbox" Type="CheckBox" X="200" Y="170" Text="Generic Driver" Width="130" Height="15" Property="RS232" CheckBoxValue="1"/>
From documentation I have read I am lead to believe that as long as CheckBoxValue and Value are equal i.e 1 in this case, then the checkbox should be checked by default.
There are already existing checkboxes on this same UI and this is true for them, so I do not understand why in my additional case, the checkbox is not active.
Another note to be made is that when I go through the installation process to test the new checkbox, the dialog disappears when I hover over it with a mouse and I am unable to check/uncheck the box.
I first thought that perhaps the Width field for the text was not big enough, but I have tested by expanding this with no results.
Any help is appreciated!
Related
I tried to bind a checkBox to an OData field, its type is Edm.Boolean. I can done the binding but it behaves like one-way binding, the chekbox shows the right statement when I ask for the value, but when I change the checkbox from checked to unchecked or vica verse, and save it, it will not update the value of the field.
xml view:
<CheckBox id="Seen"
selected="{= ${Seen} === 'true'}"
text="Seen"
enabled="true" />
However, if I change the value in an input box next to the checkbox it takes effect on the checkbox, but the checkbox can not take effect on the input field...
Input xml:
<Input value="{Seen}" valueLiveUpdate="true" />
Am I missing something?
Thank for any help in advance!
That happens because you are using an expression binding, which works quite similar a
formatter function. On these scenarios, even if your model is set to use 2 way data binding, this particular binding work only one way.
You should apply the binding on the checkbox on the same way you did for the Input.
<CheckBox selected=“{Seen}” />
I have a strange issue with ComboBox:
The control is located in xml fragment, inside sap.m.IconTabFilter.
I select a value in the combobox, then select another IconTabFilter.
Then I return to the previous tab, where the combobox is located.
The value of the combobox is cleared (I see a placeholder again), but when I open the dropdown menu of the combobox, I see that the item I have selected previously is highlighted and I can't select it again, like it's already been selected.
No function runs when switching tabs, no models are refreshed.
I tried to reproduce the issue, but my new code snippet works fine - the value is not cleared when I switch tabs.
What could it be?
Here is one of the ComboBoxes' definition:
<ComboBox id="comboid" items="{path: 'modelName>/'}" placeholder="{i18n>select}" selectionChange="onChange" customData:userProfileSetting="userId">
<core:Item text="{modelName>ID} {modelName>VALUE}" key="{modelName>ID}"/>
</ComboBox>
The root of problem was the low version of sapui5.
After upgrading from 1.28.4 to 1.28.44 (I'm limited to 1.28) it works fine.
I noticed that on certain websites, if you want to tick a checkbox on or off, you just need to click the corresponding text. When I put a checkbox with some descriptive text on my page, I have to actually hit the checkbox for it to get ticked. How is the former effect achieved?
Consider using a <label> as in this example:
<input type="checkbox" name="call" id="willcall">
<label for="willcall">click on this text to select the checkbox</label>
This example from: http://www.askdavetaylor.com/make_text_adjacent_to_checkbox_clickable.html
I'm sure that they use a JS script to achieve this. It's most likely a label that is being clicked, and they might add an onclick() event to the label which uses the javascript to find the checkbox and add the CHECKED attribute to it. Sorry for not supplying code, but I hope that gives you some understanding on what those websites do.
I need to handle three state checkbox in the following manner based on the first value:
If checkbox in a checked state then It can be only unchecked.
If checkbox in a uncheck state then it can be only checked.
if checkbox in a middle state then it can be only checked.
Can you please suggest on how this can be implemented?
The issue may be resolved via in-built checkbox implementation. That is, using Unchecked, checked and indeterminate events. More info on microsoft.com
to resolve your problème you chould handle tree event and set the attached property
IsThreeState to true,look at the example:
<checkbox IsThreeState="True"
Indeterminate="checkbox_Indeterminate"
Unchecked="checkbox_Unchecked" Checked="checkbox_Checked"
Content="Click me!"/>
I'm creating an web site MSI using WiX. I have a custom action (written in C#) that fills a combo box with the descriptions of the web sites in IIS so the user can select an existing web site to install to.
Works fine - apart from the fact that there's no item selected when the dialog page is first shown. I'd like the first site in the list to be selected by default.
Any idea how I might do this? None of the "obvious" (to me) things seem to work.
I'm using the latest version of WiX.
Each row has a value and the control has a property. The property will have the value of the selected row. There is no concept of control.value or control.selecteditem.value in this language.
There is actually a possibility to preselect exact value for a combobox - just set the property, which is connected to the combobox, in your Custom Action's code to the desired value and it will get preselected in the UI.
For example, if you have a combobox
<Control Id="WebSiteCombobox" Type="ComboBox" Property="IIS_WEBSITE_ID" Width="320" Height="16" X="20" Y="80" ComboList="yes" Sorted="yes"/>
then, in you custom action's c# code:
foreach (Site site in iisSites)
{
//code to fill the combobox
}
session["IIS_WEBSITE_ID"] = iisSites.First().Id.ToString(); //Or to any other value you want to be preselected