16
Views
5
Comments
Solved
Popup Editor with Disable Link Widget
Application Type
Traditional Web

Hello Team,

I am dealing with an issue on my web application where Popup editor (which is linked to Link Widget) doesn't render under a special scenario provide bellow in Failure Scenario.

Information:

- The page has a Link Widget which is enabled/disabled based on a condition i.e. if any or all checkbox in the first column of the grid is checked

- By default the link widget is disabled and all checkboxes in the grid are unchecked.

- Link has Method Navigate

- The link is being enabled/disabled using client JS function that adds disable attribute to the link (a tag)

Failure Scenario:

- If the user clicks on the disabled link widget, and then checks the checkbox. The link widget afterwards doesn't work and doesn't open the popup editor.


I need help what could be the issue and help resolve the issue. 


Thanks in advance.





mvp_badge
MVP
Rank: #78
Solution

Hi Wasif,

Thank you for clarifying the raised quires. I have implemented a sample app, considering the mentioned use-case. See this sample app

Please refer to the attached .oml file

Points to notice:

  • In the footer section, I have added a JavaScript expression to disable the link pointer events as their default setting
  • Disabled property won't work for hyperlinks. Refer to this post: Stackoverflow | disabled-href-tag
  • In the CheckBox OnChagne handler flow, I have defined a simple logic to Enable/disable the popup link


Hope this helps you!


Kind regards,

Benjith Sam

TWALabPopupLinkDemo.oml

mvp_badge
MVP
Rank: #78

Hi Wasif,

As per the mentioned use-case, I do need a bit of clarification for the following queries..

  • Is it that the link should get enabled if any of the checkboxes in the first column of the grid is checked?
  • The link widget does have an Enabled boolean property still, why are you using JS to enabled/disabled the link based on some condition?
  •  If the user clicks on the disabled link widget - how come the use selects the disabled link??, and then checks the checkbox. The link widget afterward doesn't work and doesn't open the popup editor. 

See this sample app

  • Implemented Logic: Just toggled the Disabled (Fake) Link with Active link (which is mapped with the Popup Editor) using UI IF widget, based on certain condition i.e. If any checkbox is selected then the popup link will get enabled.


Hope this helps you!


Kind regards,

Benjith Sam

Rank: #1021

hi Wasif

when the link is clicked, what happens? 

if you are navigating to the destination screen, you may be able to correct this just doing an ajaxrefresh on the popUpEditor widget attached to the link, after this link has been enabled.