Is there any way to use the component pe:importEnum to access an inner enum?
<pe:importEnum type="enums.PaymentMethodEnums.EnumPaymentMethod" />
<h:outputText value="#{EnumPaymentMethod.ALL_VALUES}" />
ImportEnums with inner enum
-
- PrimeFaces Core Developer
- Posts: 3979
- Joined: 03 Dec 2010, 14:11
- Location: Bavaria, DE
- Contact:
check the classForName docu but AFAIR: enums.PaymentMethodEnums$EnumPaymentMethod
Thomas Andraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko
-
- PrimeFaces Core Developer
- Posts: 3979
- Joined: 03 Dec 2010, 14:11
- Location: Bavaria, DE
- Contact:
what do you mean with static methods? an example would be great
Thomas Andraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko
The class CommonMethods has an static method isEmpty ...... i would like to call that function, method, in my view.
Note that de CommonMethods is not a @ManagedBean.
public class CommonMethods {
/**
* Verifica se uma lista esta vazia ou nula.
* @param list Lista.
* @return True caso seja nula ou vazia, false caso contrario.
*/
public static boolean isEmpty(Collection<?> list) {
if (list == null || list.isEmpty()) {
return true;
}
return false;
}
}
Note that de CommonMethods is not a @ManagedBean.
public class CommonMethods {
/**
* Verifica se uma lista esta vazia ou nula.
* @param list Lista.
* @return True caso seja nula ou vazia, false caso contrario.
*/
public static boolean isEmpty(Collection<?> list) {
if (list == null || list.isEmpty()) {
return true;
}
return false;
}
}
-
- PrimeFaces Core Developer
- Posts: 3979
- Joined: 03 Dec 2010, 14:11
- Location: Bavaria, DE
- Contact:
it just imports an enum, it has nothing todo with methods. So NO.
Thomas Andraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko
-
- Information
-
Who is online
Users browsing this forum: No registered users and 18 guests