cancel
Showing results for 
Search instead for 
Did you mean: 
SOLVED

Creation of a package with ui-actions and local-scripts

Creation of a package with ui-actions and local-scripts

PlcCoder
Member

With the help of the docu I created a package with some ui-actions. 

  • I created the package structure and copied the ui-action js files into js/custom-libs/local-scripts
  • I can install the package successfully
  • The ui-actions are selectable in the ui actions of the button, but the parameters are not displayed correct.
  • I found the parameter definition under <workspace>\json\scripts\ui-actions.json and copied it into the package
  • But not I get the error in package manager: 
    PlcCoder_1-1660810198249.png
  • What is the correct way to implement the package correct?
4 REPLIES 4

webiq-eg
Long-established Member

Hello,

the error message indicates that your package contains three files that are already included in the original HMI project. Unfortunately, only the first of these is displayed (here json/scripts/localscripts.json).
Files that are already in use, may not appear in a package.
Instead, you can transfer the description of the UI action to webiq.json. I added an example of a package with an UI action.

In the description https://www.smart-hmi.de/user/download/deliver/docs/documentation-dev-designer-package-format-2.12-...
this is described using a localscript as an example, it works the same way for ui-actions.
Try my package example, hope this helps and have fun with WebIQ
webiq eg

Hello @webiq-eg  Unfortunately, the attached example does not work.

Although a parameter is displayed when inserting the element, it has no name. If multiple parameters are defined in the ui action, only one unnamed parameter is displayed.
HmiGuide_0-1663752741956.png
I have checked the file: <workspace>\json\scripts\ui-actions.json. The parameters to the UI action are not entered.

Can you please fix the example, to get it working.

webiq-eg
Long-established Member

Yes, you are right, sorry. Attached is a new package which should work now.
Many greetings
webiq eg

Thanks, now it is working. There is one question left:

The docu says that the

  • type control is for (customer widgets)
  • type extension if for (asserts, local-scripts, ui-actions)

The type in your example is control, but I would expect type extension, because of the documentation.
Could you explain that?

Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist