How can I Define Visible Columns in a PickList, in zappdev - zappdev

Inside my form, I have a picklist. But when I validate I get this type of error:
"No visible Columns defined". Does anyone know what to do?

After selecting the picklist, on the right side of the screen you can see its properties. There is a button called Column Options... you can select your visible columns from there.
https://www.screencast.com/t/QBar3gZk
Careful, if you have changed properties of the dataset model you might need to refresh your form before you can see the changes .

Related

Ag-grid dynamically span entire row

I have a grid that presents database entities one per row with some crud options (the crud options are icons in their own cells). When the delete button is clicked, the design calls for the entire row to be turned into a confirmation message with buttons to continue or cancel.
Apparently you can give a function for colSpan on each colDef. I tried giving the first colDef a span equal to the number of displayed columns in the case that the row data has a property isDeleting === true, while clicking the delete icon would set the row data's isDeleting property to true.
I was unable to get this to work, and even if I were to get it to work, I'd need to be able to dynamically change the cell so that it contains the confirmation message.
Any help is greatly appreciated.
After a very long day of searching, I found this article on "full-width" rows. You can provide your gridOptions with an isFullWidthCell function, plus fullWidthCellRenderer and fullWidthCellRendererParams properties, and the full width of the row will be populated using the renderer according to the params (as is the case with a cellRenderer in a ColDef)
So, my delete button component can set a piece of data that the isFullWidthCell function can check for, and if it finds it, it will use the cellRenderer provided.
AgGrid seems to have thought of everything.

Trying to display the export value of a dropdown menu selection in Adobe PDF

Let me start off by saying I have very limited knowledge of Javascript.
I've got a Dropdown menu called: CustomerType with 6 values in it.
Basically I just want whatever is selected in the dropdown to display again in another part of the PDF.
Can anyone help?
First set the properties on the dropdown to commit the value immediately. See image.
Then on the "calculate" script for the other field, enter the JavaScript below. You'll need to change the field names to your actual field names.
this.getField("myOtherField").value = this.getField("myDropdown").value;
You'll want to set the other field to read-only as well since the value is calculated.

How to match specific content of a drop down in TOSCA without selecting it?

Is there a way to verify that if a drop down contains a specific option without selecting that option in TOSCA?
Yes there that is possible. I tried it with a standard HTML combobox. For that you need to scan the page. Select the combobox in question and change the quickfilter to show the items from the drop down. Check the combobox itself and one of the items below (does not matter which one):
You can ignore the message that the item is not unique - just create the module.
Once you have the module in place, you can rename the item, so that it reflects that you want to use it as a generic item. Then (in the properties tab) add a 'Configuration Parameter' and call it 'ExplicitName' and set it's value to true. This will allow to edit the name of the item in the testcase. (more details in the help of Tosca 11.1)
You can then create a testcase and use the module on it. In the testcase you can change the name of the item to the text of the drop down item you want to check for (you can also use wildcards) and then verify that it exists.

How to figure out the index of a ToggleGroup's selected toggle?

I'm trying to select an item from a list that's sorted the same way as a ToggleGroup I have besides it. However, I found that toggleGroup.getToggles().indexOf(toggleGroup.getSelectedToggle()) always returns -1 (visible in the IndexOutOfBoundsException thrown as I pass it). Is there another way of figuring out the index, or am I at a loss with my approach and need to figure out something completely different?
UPDATE: Apparently, for the first time an item is selected (I have this code attached to changes of selectedToggleProperty()), it works fine (I just get no notice of it because the elements I make visible have no proper layout). However, when an item is selected while another item already is selected, getselectedToggle() becomes null, causing aforementioned behavior.
All of the JavaFX toggle controls have a property called UserData. You should use that to create the links between the toggles and data list. Relying on the index of the toggles in the toggle group is probably a bad idea.

Delaying the opening of a NSPopUpButton

I've encountered the same problem as this one:
This one.
It has never been answered so far. In two words:
When you place a NSPopUpButtonCell in a NSTableView, the popUp opens before the selection in the tableView has changed.
If the menu of the popUp relies on the selection of a row of the tableView, it will be updated too late.
Solution 1: differ the opening of the popUp with a block which calls [super] a few nanoseconds later. But I don't know which method I must override.
Solution 2: use other bindings that I'm currently using (the popUp contains the NSSet of the entity selected in the table, I'm using a different controller, not the table's one, and I bind its content set to myTable.selection.theSet.
Is there something else I could do? Thanks !
Yes, if you use a view-based tableView, you can bind the popUp through the cellView it’s inside (like the other table objects you bind in this mode), and so it’s completely unambiguous and doesn’t depend on the selection.
In view-based mode, each cell in each row have is assigned an ‘objectValue’ from your original data, so you can bind directly to it, like ‘objectValue.popUpContents’.

Resources