Strange rules of primefaces selectonemenu
When you use p: column to create columns in selectOneMenu, you will find that the column of this control is not perfect. First, beanproperty cannot be a string array, for example
String [] str = {"1", "2 "}
After binding, you cannot create columns.
If you bind a List variable, then you specify the format as follows:
// The name attribute is a string
# {Y. name}
This Code does not take effect and does not create columns. It is the same as if column is not specified.
If you specify
// The name attribute is a string
If this parameter is specified, the drop-down list displays the return value of toString () for each variable.
// The name attribute is a string
However, if you add var = "y", you will find that the data cannot be displayed in the drop-down list, that is, the drop-down button is clicked, and the drop-down list does not appear correctly, A small white box is displayed.
// The name attribute is a string
# {Y. name}
However, if you specify this option, the expected results will be displayed, and the columns are correctly created. However, this is only in Firefox .....
If you are in IE, an error may occur. Why is it possible? It is because it is sometimes correct or incorrect. The drop-down list is very far away from the correct position and the drop-down list is very wide, it basically occupies the real surplus space.
I think this is a BUG in primefaces. Currently, this error is not fixed in primefaces5.1 community edition.
Therefore, if you need a drop-down list, do not use column to create a column.