question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CommandLink: Invalid HTML when disabled

See original GitHub issue

Describe the bug

Since Primefaces 12 (Issue: #8218 / PR: #8219) disabled CommandLinks are rendered with invalid HTML, because an attribute disabled=true is renderend. But this in not allowed on anker-tag (<a>).

Attribute disabled not allowed on element a at this point. r Post<a id=“j_idt343:disabled” href=“#” class=“ui-commandlink ui-widget ui-state-disabled” tabindex=“-1” …meFaces.ab({s:"j_idt343:disabled",f:"j_idt343"});return false;" disabled=“true”>Disab

pf_commandlink

Reproducer

See showcase

Expected behavior

Valid HTML is rendered.

PrimeFaces edition

Community

PrimeFaces version

12.0.0

Theme

No response

JSF implementation

All

JSF version

2.2

Java version

1.8

Browser(s)

No response

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Reactions:1
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
mellowarecommented, Nov 8, 2022

Oh its saying disabled is not allowed at all on the element. My fix makes it render as disabled="disabled" like other components.

1reaction
Bukamacommented, Nov 10, 2022

@Bukama what’s your take on #9388 (review) ?

Sorry was very busy the last days. Just did my review.

Read more comments on GitHub >

github_iconTop Results From Across the Web

jsf 2 - h:commandLink rendered working disabled not working
I need to disable / enable the h:commandLink on another condition. The logic written for rendering the h:commandLink works correctly, but logic for...
Read more >
p:commandLink and the "disabled" attribute - PrimeFaces forum
I've just noted a stragen behavior of the html produced by p:commandLink in Firefox and IE. This is my source code: Code: Select...
Read more >
How to enable already disabled a4j:commandLink? - JBoss.org
Hi. Please help me in this issue. I want to enable a4j:commandLink already disabled from backing bean (toDisableSaveLink = true).
Read more >
disabling commandlink - RoseIndia.Net
The commandlink.disabled attribute only disables the l. ... "commandLink" tag is used like anchor tag in html. jsf h:commandLink example.
Read more >
apex - output Dynamic HTML with VisualForce component
The compile error is because outputLink does not have action attribute .You can use Command Link Instead .
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found