jakartaee / jakartaee/faces

f:ajax - add onprogress attribute to let the dev pass a js callback

Open
#2,114 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
127
Forks
59
Avg merge
23h
Merged PRs (30d)
7

Description

This is a missing part of the javascript ajax engine of Faces

to be on par with the standard XMLHttpRequest

https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequestEventTarget/progress_event

```

```

```
public class AjaxBehavior extends ClientBehaviorBase {

enum PropertyKeys {
// ...
onprogress
}

public String getOnprogress() {
return (String) getStateHelper().eval(PropertyKeys.onprogress);
}

public void setOnprogress(String onprogress) {
getStateHelper().put(PropertyKeys.onprogress, onprogress);
}
}
```

Contributor guide

Open the contributing guide

Research direction

Start with the AjaxBehavior class shown in the issue and trace the JavaScript AJAX engine that handles f:ajax attributes. Compare its event handling with the referenced XMLHttpRequest progress event. Done means the onprogress attribute is accepted and the supplied callback receives progress data during the request.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, javascript
Domain
frontend, web-dev
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.