I'm trying to make the dialog framework works with accesibility, but there are a few problems, that don't make this component accessible. First, I lost the navigation, when I use the tab button, it doesn't respect the modal option. This is an example:
this is the CommandButton
Code: Select all
<p:commandButton id="dialogFrameworkDataCommandButton"
title="#{i18n.crud_list_dialog_show_button_title}"
value="#{i18n.crud_list_dialog_show_button_title}"
disabled="#{cc.attrs.disabled}"
icon="ui-icon-extlink"
styleClass="actions"
actionListener="#{cc.attrs.lOVBean.choseEntity}"
process="@this">
<p:ajax event="dialogReturn" listener="#{cc.attrs.lOVBean.onEntityChosen}"
oncomplete="#{cc.attrs.id}();#{cc.attrs.oncomplete}" />
</p:commandButton>
this is the method that calls the commandButton
Code: Select all
public void choseEntity(ActionEvent event) {
String contentWidth = (String) event.getComponent().getAttributes().get("contentWidth");
String contentHeight = (String) event.getComponent().getAttributes().get("contentHeight");
List<E> targetMultiple = null;
E target = null;
String multipleValue = (String) event.getComponent().getAttributes().get("multiple");
Boolean multipleMode = Boolean.parseBoolean(multipleValue);
setMultiple(multipleMode);
if (isMultiple()) {
targetMultiple = (List<E>) event.getComponent().getAttributes().get("target");
} else {
target = (E) event.getComponent().getAttributes().get("target");
}
Map<String, List<String>> params = new HashMap();
List<String> values = new ArrayList();
values.add(this.getClass().getName());
params.put("bean", values);
Map<String, Object> options = new HashMap<String, Object>();
options.put("modal", true);
options.put("draggable", false);
options.put("dynamic", true);
options.put("resizable", true);
if (contentWidth != null) {
options.put("contentWidth", contentWidth);
}
if (contentWidth != null) {
options.put("contentHeight", contentHeight);
}
if (isMultiple()) {
this.entities = targetMultiple;
this.selectedEntities = entities;
} else {
this.entity = target;
this.selectedEntity = entity;
}
RequestContext.getCurrentInstance().openDialog("/pages/selectEntity.jsf", options, params);
}
Thanks in advance,