orbeon forms - Dynamic Dropdown remove value - orbeon

I’m using Oberon forms version 2019.2 CE.
In my form I have Dynamic Dropdown (with search) with country select (required field) and Text field with display code of selected country:
When I select country, in text field appears selected country code:
Now I can click ‘x’ sign to remove value form drop down:
Value in field 'code' has not been deleted. When I click Validate button no error is detected. It seems that when I use 'x' sign to remove value from dropdown, I remove only label, not value.
My question is whether it is possible to remove both label and value, when I click 'x' sign?

I am unable to reproduce this with Orbeon Forms CE 2019.2. This is what I am seeing when running this form. If this doesn't help, I'd recommend you update your question to include a link to a minimal form that you are using to reproduce this, with steps to reproduce (and then post a comment, for notification).

It looks like the problem occurs when I use ‘Service performs search’ option set to ‘Yes’. Below you can see how it looks like in my form:
Source code of the form: here

Related

Enable a Disabled Submit Button when both a Select field is selected, and Input field has a number input? Javascript

I am working on a project that has a form with a Select dropdown and an Input field with a disabled Submit button. I need the submit button to be disabled until both of these fields are filled and the the second input is a number. I am thinking of using event listener for both filed but do not know how to handle two changes in one function.
let select = document.querySelector("select#slect_items");
select.addEventListener('change', checkSelection);
let input = document.querySelector("input#number");
input.addEventListener("input", checkInput)
Next I am going to define both checkInput and Check selection.
I can get individual function working to dsiable the submit button but do not know how can I combine both eventlisteners together and enable submit button in a single function.
I saw one similar question asked using Jquery. However, I am a beginner and this project has to be coded in JavaScript.
Thanks for your time

AppiumLibrary for Robot Framework - Getting A Button's Text

I am experimenting with AppiumLibrary in RobotFramework and have a simple test for a requirement that states: "the Set button should exist on this page.". I am testing this by retrieving the button that has a specified ID and then checking if that button has the right text.
I am able to retrieve the button I want via ID however am having trouble getting the actual text on the button.
Here is how the button is defined on the web page:
<button id="button-set" class="button ng-binding" style="width: 20%">Set</button>
Very simple! Using Appium Desktop in web/hybrid app mode and clicking on the Set button it says the "text" attribute shows "Set". However I've learned that using the attributes in Appium Desktop arent valid when searching for elements on a webpage, for example searching by the Class attribute in Appium Desktop (android.widget.Button) is not correct because on the web page the class for the button is instead: "button ng-binding".
I have tried the following:
# this retrieves the button fine, by ID
PAGE SHOULD CONTAIN ELEMENT xpath=//button[#id="button-set"]
# these all return 'None'
${name}= GET ELEMENT ATTRIBUTE xpath=//button[#id="button-set"] name
${text}= GET ELEMENT ATTRIBUTE xpath=//button[#id="button-Set"] text
So, I am unsure which Attribute to use to retrieve the text when retrieving element by ID. Instead, I have tried to retrieve the element this way:
# this also passes fine - I feel like I should also make sure this button has the correct ID, to make the mapping
# between test procedures and cases easier, but if this is as good as it gets then
# this can be argued for
PAGE SHOULD CONTAIN ELEMENT xpath=//button[contains(text(),'set')]
# however, the following does not make sense, this returns "button" instead of "button-set", which makes me think the xpath query is not correct
${id2}= GET ELEMENT ATTRIBUTE xpath=//button[contains(text(),'set')] id
# again, both of these return 'None'
${name2}= GET ELEMENT ATTRIBUTE xpath=//button[contains(text(),'set')] name
${text2}= GET ELEMENT ATTRIBUTE xpath=//button[contains(text(),'set')] text
I have also tried the following:
${element}= GET WEBELEMENT xpath=//button[#id="button-set"]
# this returns "button-set" as you'd expect:
${id3}= GET ELEMENT ATTRIBUTE ${element} id
# these again return 'None'
${name3}= GET ELEMENT ATTRIBUTE ${element} name
${text3}= GET ELEMENT ATTRIBUTE ${element} text
I feel like this should be a very simple thing to do, and can see in other questions that you would use the Name attribute when using pure Appium. However, using the Robot Framework library instead, that these doesn't appear to be the right approach. I must be doing something pretty simple wrong here, can anyone point it out?
Thank you!
Stumbling across the same issue when trying to fetch element's attributes via Get Element Attribute keyword. It seems that when fetching for the element's text, your best bet is to use Get Text keyword. Switching to Get Text keyword solved the problem on my case. Please see the links below for further details. Spoiler: there aren't any real explanations as to why the Get Element Attribute is flaky.
https://serhatbolsu.github.io/robotframework-appiumlibrary/AppiumLibrary.html#Get%20Text
https://github.com/serhatbolsu/robotframework-appiumlibrary/issues/98

Field not showing in TFS 2017 WebLayout

I have enabled the new work item form in TFS 2017 after upgrading from TFS 2015, but have found that there are some fields that aren't showing in the new work item form, even though I can see the field declared in the WebLayout section when editing the work item type XML. Is there a condition which hides fields in WebLayout?
The field I am trying to get appear is the Microsoft.VSTS.Scheduling.RemainingWork field. I have the following inside the WebLayout:
<WebLayout>
<!- Snipped some other groups which show -->
<Group Label="Timescales">
<!-- Snipped Some other fields which show -->
<Control FieldName="Microsoft.VSTS.Scheduling.RemainingWork" Type="FieldControl" Label="Remaining Work" />
</Group>
</WebLayout>
I also had the same issue with a custom String field, but I no longer needed the field so I removed it anyway.
The field is not shown and declared in Web Layout, you need to double check if the field is hidden or have an invalid value of the field.
In your case, you can edit the work item type to add the REQUIRED role from Remaining Work field when change particular States (such as from Done to In Progress). Please follow the below steps:
Open your work item type using TFS Power Tools in (Process Editor).
Under Workflow tab, find the Transition which from Done to
In Progress, then double click on this Transition.
In Workflow Transition dialog, under Fields tab, add the Remaining
Work field, then click OK button and save your work item type.
As a workaround, when you change the statuses, even though the transition was clearing the Reamining Work filed, still need to enter the value for the field.
So, what I found was that when I changed between 2 particular statuses, the transition was clearing the Remaining Work field value. I'm guessing that the WebLayout doesn't display invalid fields, as a blank string is not a valid Double field, which Remaining Work is defined as

Autocompleter tag of struts2-dojo is not working with struts2-jquery tags

This link helped me to perform autocompleter in struts2. Through this tag i could
A> Show list form database
B> Insert value in database which were not in list
All worked fined..
But, now i have to use struts2-jquery plugin to show that page containing *dojo tag* in a pop-up window. On doing so, the pop up window just appears, and the page is redirected to the form's action. This problem was solved when i removed the dojo tag-sx from the head of that page.
Now the pop up is shown, but i can't insert value which are not in my list. i.e i can't perform the second option mentioned(B)
I've checked this showcase, but struts2-jquery autocompleter tag also couldn't fulfill my second option(B) as it adds an _widget in it's name field
How can i fulfill both option in my case? Thanks in advance
If you mean submit any value that was not originally in the autocompleter list then <sj:autocompleter> tag has forceValidOption attribute for that. See this issue for more information http://code.google.com/p/struts2-jquery/issues/detail?id=587.

Trigger validation based on drop down value

I'm working in Struts 2. I want to make two text fields "required" based on the value selected in a drop down. I got so far as making them "required" using js so that the form does not submit anymore when the two fields are empty. Now i want a field error above the text box saying the fields are mandatory. What is the best way to achieve this?

Resources