jsf-ajax

Enforce component-based JSF AJAX updates with resolved client IDs.

224|136|Updated Jul 12, 2014
One-click install
npx skills add https://github.com/hmislk/hmis --skill jsf-ajax
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: jsf-ajax
Source: https://github.com/hmislk/hmis/tree/main/.claude/skills/jsf-ajax
Command: npx skills add https://github.com/hmislk/hmis --skill jsf-ajax

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

HMIS projects often encounter silent AJAX update failures when using plain HTML elements or incorrect ID references within JSF. This Skill provides a concise set of rules to enforce component-based updates, proper ID resolution, and safe update patterns to ensure deterministic AJAX behavior.

Core Features & Use Cases

  • Use h:panelGroup and p:outputPanel for all AJAX targets to guarantee proper JSF lifecycle and correct DOM IDs.
  • Always resolve component IDs with :#{p:resolveFirstComponentWithId(...)} and avoid CSS/JQuery selectors in update or process attributes.
  • Debug and fix common AJAX update failures during development by validating target components and ensuring the correct component hierarchy.

Quick Start

Follow these guidelines to fix AJAX updates by using JSF components for updates and resolving element IDs before references.

Frequently Asked Questions about jsf-ajax

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why do my JSF AJAX updates silently fail to render?

JSF AJAX updates silently fail when targeting plain HTML elements or using incorrect ID references instead of valid JSF components. You must use JSF components like h:panelGroup and resolve client IDs correctly to ensure proper lifecycle execution and DOM updates.

How do I fix AJAX update failures in JSF dynamic panels?

To fix AJAX update failures in JSF dynamic panels, wrap target content in h:panelGroup or p:outputPanel. Always resolve component IDs using the p:resolveFirstComponentWithId function and avoid CSS or jQuery selectors in your update attributes.

Can I use jQuery selectors for JSF AJAX update attributes?

No, you should not use jQuery or CSS selectors in JSF AJAX update attributes. You must use resolved JSF component client IDs to ensure the framework correctly locates the target components and executes the JSF lifecycle for deterministic rendering.

What is the best way to resolve component IDs for JSF AJAX updates?

The best way to resolve component IDs for JSF AJAX updates is using the p:resolveFirstComponentWithId function. This ensures the update attribute references the correct client ID within the component hierarchy, preventing silent update failures during dynamic rendering.

Does this JSF AJAX component update guidance apply to repeat regions?

Yes, this component-based JSF AJAX update guidance applies to forms, dynamic panels, and repeat regions. It enforces strict use of JSF components and resolved client IDs across the application to prevent silent update failures in all these contexts.

When should I not use plain HTML elements for JSF AJAX updates?

You should never use plain HTML elements for JSF AJAX updates when targeting dynamic content. Plain HTML elements bypass the JSF lifecycle and break proper DOM ID generation, leading to silent update failures in forms and repeat regions.