java - Primefaces Picklist Converter -
I am using PrimFace 4.0 and JSF 2.2. I used a picklist with the converter The problem is that I do not get the right Inspired by my My picklist declaration is as follows: arg2 in my converter, it always says
0 I hope this element's ID And I can parse it from the source / target list. any idea?
converter .
& lt; P: PickList value = "# {loadingPlaceGroups.pickList}" style = "margin: 0" var = "loading place" converter = "primetime pixelist converter" item value = "# {loadingPlace}" item label = "# {loadingPlace. Name} # {loadingPlace Location.address.street} # {loadingPlace.location.address.houseNr} # {loadingPlace.location.address.zipCode} # {loadingPlace.location.address.city} "showSourceFilter =" true "showTargetFilter =" True "filterMatchMode =" "style class =" picklist 500x350 eser picklelist 500x350 target "& gt; & Lt; F: Aspect Name = "Source Caption" & gt; Elle LaDeltelean & lt; / F: Aspect & gt; & Lt; f: Aspect name = "Target Caption" & gt; Guevara Laddatellan & lt; / F: Aspect & gt; & Lt; P: column style = "border-bottom: 1px solid light" & gt; & Lt; P: panelGrid & gt; & Lt; P: line & gt; & Lt; P: column style = "padding-left: 0; font-size: 12pt" & gt; & Lt; H: Output Label Value = "# {loadingPlace.name}" style = "font-weight: bold" /> & Lt; / P: column & gt; & Lt; / P: Line & gt; & Lt; P: line & gt; & Lt; p: column style = "padding: 0" & gt; & Lt; H: Output Label Value = "# {loadingPlace.location.address.street} # {loadingPlace.location.address.houseNr}" /> & Lt; / P: column & gt; & Lt; / P: Line & gt; & Lt; P: line & gt; & Lt; p: column style = "padding: 0" & gt; & Lt; H: Output Label Value = "# {loadingPlace.location.address.zipCode} # {loadingPlace.location.address.city}" /> & Lt; / P: column & gt; & Lt; / P: Line & gt; & Lt; / P: panelGrid & gt; & Lt; / P: column & gt; & Lt; / P: Picklist & gt;
General converter
Import java.util.Map; Import java.util.Map.Entry; Import java.util.UUID; Import java.util.WeakHashMap; Import javax.faces.component.UIComponent; Import javax.faces.context.FacesContext; Import javax.faces.convert.converter; Import javax.faces.convert.FacesConverter; @FaceContactor (value = "entitycountor") public class EntityConverter converter {Private static map & lt; Object, string & gt; Organizations = New SmashMaps & lt; Object, string & gt; (); @ Override Public String Mill Estressing (Phases Contact Reference, UICMNent Component, Object Entity) {Synchronize (Entities) {If (EntitlementsCente (Entity)) {String UUID = UUID RndUUID () Toasting (); Institutions (Unit, UUID); Return UUID; } And {return entities}. Exhaust (unit); }} @OverWide public object getAsObject (FacesContext reference, UIComponent component, string uuid) {for} (entry:
Comments
Post a Comment