Forums de discussion

Community Feedback Requested: Removing NamingContainer from aui: components

thumbnail
Neil Griffin, modifié il y a 10 années.

Community Feedback Requested: Removing NamingContainer from aui: components

Liferay Legend Publications: 2655 Date d'inscription: 27/07/05 Publications récentes
Hi everyone,

We are considering making a small design change in several Liferay Faces Alloy components and would like to get feedback from community members.

In the Liferay Faces forum thread titled Using Partial Processing with Primefaces + Liferay, the developer mentioned that he was having problems updating regions of a Facelet view with p:ajax when his components were children of aui:fieldset.

The developer tried different renderIds, including relative paths like:

<p:ajax event="change" update="envTypes" />


And paths relative to the UIViewRoot, like:

<p:ajax event="change" update=":l1:f1:fs1:c1b:envTypeField:envTypes" />


But nothing worked. We think that the cause of this problem is because the AUIFieldSet class implements NamingContainer.

In fact, we have many components that implement NamingContainer:
  • aui:button-row
  • aui:column
  • aui:dialog
  • aui:fieldset
  • aui:layout
  • aui:list
  • aui:list-item
  • aui:text-box-list
  • aui:text-box-list-item


The Liferay Faces team is considering removing "implements NamingContainer" from many (or all) of these components in the 3.x versions of Liferay Faces Alloy because it is unnecessary and causes problems like the one mentioned above.

If you would, please comment on this thread and let us know if this will negatively impact your portlet applications. Our best guess is that this will make most developers happy, because UIComponent.findComponent(String) will work much easier.

Thanks,

Neil
thumbnail
Juan Gonzalez, modifié il y a 10 années.

RE: Community Feedback Requested: Removing NamingContainer from aui: compon

Liferay Legend Publications: 3089 Date d'inscription: 28/10/08 Publications récentes
IMHO, although this problem as a known fix, NamingContainer are supposed to solved the problem of "duplicated" id within same component. This make sense in other components (h:form. h:datatable, etc), but perhaps having all of those components as NamingContainer would be too much.

I would let these components as NamingContainers:

  • aui:fieldset
  • aui:layout
  • aui:list


and remove from the others. This makes sense because the components in previous list are most suitable to have nested iterable components (hence more possibilities of having the same id although being in different iterations).

Thanks.
thumbnail
Neil Griffin, modifié il y a 10 années.

RE: Community Feedback Requested: Removing NamingContainer from aui: compon

Liferay Legend Publications: 2655 Date d'inscription: 27/07/05 Publications récentes
Hi Juan,

Thanks so much for the feedback. I asked Cagatay for his advice on this, and he mentioned that he doesn't have naming container on p:layout, p:column and p:fieldset but p:dataTable has it. Also I noticed p:tree has it. I also looked at the ICEfaces components, and only ace:autoCompleteEntry, ace:dataTable, and ace:tree have it.

So I think simply dropping NamingContainer from all of our existing aui: components might be best.

Neil
thumbnail
Neil Griffin, modifié il y a 10 années.

RE: Community Feedback Requested: Removing NamingContainer from aui: compon

Liferay Legend Publications: 2655 Date d'inscription: 27/07/05 Publications récentes
Update: We have decided to make this change in Liferay Faces 4.1.x and Liferay Faces 4.2.x. For more info, see FACES-1688.