Skip to content

Commit

Permalink
Merge branch '2024.1' into '2024.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
bonita-ci committed Dec 20, 2024
2 parents 18ae106 + 62cda2a commit b443325
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 3 deletions.
2 changes: 2 additions & 0 deletions modules/pages-and-forms/pages/widgets-inputs.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ image::widgets/autocomplete.png[autocomplete]

Use an autocomplete widget to offer the user a list of possible values based on data entered in the field. For example, in a firstName field, if the user types _chri_, the values _chris_, _christine_, _christian_, _christiane_ are proposed. The user selects the correct value. To define the *available values*, bind a data source to initialize the suggestions. For suggestions that are an array of objects, you can specify a *displayed key* to identify the attribute to show as a suggestion in the widget. The value must be bound to a variable that will hold the selected suggestion.

See xref:ROOT:widgets.adoc#troubleshooting-ui-designer-widgets[Troubleshooting UI Designer widgets] to solve common issues with this widget.

=== Select widget

image::widgets/select.png[select]
Expand Down
38 changes: 35 additions & 3 deletions modules/pages-and-forms/pages/widgets.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ Limitations:
* The URL should have the file type as extension (e.g. \https://myhost/doc/sample.pdf)
====

See <<troubleshooting-ui-designer-widgets>> to solve common issues with this widget.

[#rich-text-area]

== Rich Text Area widget
Expand Down Expand Up @@ -102,6 +104,7 @@ When the switch is completed, you still may have to set properties from the prop
Switch feature not available for Internet Explorer 11 and Microsoft Edge.
====

[#troubleshooting-ui-designer-widgets]

[.troubleshooting-title]
== Troubleshooting UI Designer widgets
Expand All @@ -121,19 +124,48 @@ The URL points on a file without extension (e.g. \https://myhost/doc/sample)
Make a custom widget from the File Viewer widget, and adapt the `controller.isPDF` or `controller.isImage`.
--

[.troubleshooting-section]
--
[.symptom]
Autocomplete widget does not update its displayed value

[.symptom-description]
Autocomplete widget does not update its displayed value when the value is changed by a variable.

[.solution]#Possible solution#
Make a custom widget from the Autocomplete widget, and update the controller by replacing the function that set the `formatLabel` as follows:

[source,javascript]
----
this.formatLabel = function ($model) {
if (this.selectedItem) {
let sel = this.selectedItem;
this.selectedItem = undefined;
return this.getLabel(sel);
} else {
if (typeof $model === 'object') {
return this.getLabel($model);
} else {
return $model;
}
}
};
----
--

[#widgets-templating-troubleshooting]

[.troubleshooting-section]
--
[.symptom]
My custom styling on pbChecklist or pbRadiobuttons isn't working as it was in previous Bonita UI Designer versions.
My custom styling on pbChecklist or pbRadiobuttons isn't working as it was in previous Bonita UI Designer versions.

[.symptom-description]
My custom css rule, from a theme or a css file is not applied after the migration on {bonitaVersion}.

[.cause]#Potential cause#
The internal HTML templating has been changed so that accessibility rules could be applied for the two widgets.
The internal HTML templating has been changed so that accessibility rules could be applied for the two widgets.

[.solution]#Possible solution#
Check you custom css selector. For example, <label> html tag has been replaced by <legend>. More details are available in UI-Designer, Editor > Help (in the top right corner) > Migrations.
--

0 comments on commit b443325

Please sign in to comment.