This content has been marked as final.
Show 11 replies
-
1. Re: RowKeyVar from rich:orderingList
nbelaevski Jun 26, 2009 6:00 PM (in response to solstice_pan)Hi,
You should attach a4j:support not to the whole component, but to each row element (i.e. to column components). -
2. Re: RowKeyVar from rich:orderingList
solstice_pan Jun 28, 2009 5:51 AM (in response to solstice_pan)thanx for your reply.
Can I get then the rowkeyvar via FacesContext, RequestContextMap ? -
3. Re: RowKeyVar from rich:orderingList
nbelaevski Jun 28, 2009 6:14 AM (in response to solstice_pan)There's no RequestContextMap: http://www.j2ee.me/javaee/5/docs/api/javax/faces/context/ExternalContext.html
-
4. Re: RowKeyVar from rich:orderingList
solstice_pan Jun 29, 2009 5:35 AM (in response to solstice_pan)you are right. What I mean is where can I get the value from
getRequestMap
getRequestParameterMap
getRequestParameterValuesMap -
5. Re: RowKeyVar from rich:orderingList
nbelaevski Jun 29, 2009 6:02 AM (in response to solstice_pan)Yes.
-
6. Re: RowKeyVar from rich:orderingList
solstice_pan Jun 29, 2009 3:52 PM (in response to solstice_pan)Dear Nick,
today I tried this.<rich:orderingList value="#{glasProduktBearbeitenAction.glasList}" var="_glas" id="orderIdTabelle" rowKeyVar="rkv" immediate="true" converter="#{orderListConverter}" listHeight="200" listWidth="650" rendered="#{_glasList.size > 0}" selection="#{glasProduktBearbeitenAction.selectedRow}" activeItem="#{glasProduktBearbeitenAction.activeItem}" bottomControlLabel="nach ganz Unten" downControlLabel="nach Unten schieben" topControlLabel="an die Erste Stelle" upControlLabel="nach Oben" > <rich:column width="100"> <f:facet name="header"> Bezeichnung </f:facet> #{_glas.produktBezeichnung.bezeichnung} </rich:column> <a4j:support id="clicksupport" event="onclick" reRender="auswahlpanel" action="#{glasProduktBearbeitenAction.ausgabe}" /> </rich:orderingList>
and in my BackingBeanMap<String, String> values =_externalContext.getRequestParameterMap(); for(Map.Entry<String, String> e : values.entrySet()){ log.info("Parameter - Key:[{0}], Value:[{1}]", e.getKey() , e.getValue() ); } Map<String,Object> requestMap = _externalContext.getRequestMap(); for(Map.Entry<String, Object> e : requestMap.entrySet()){ log.info("Request Parameter [{0}],[{1}]", e.getKey(), e.getValue()); } Map<String,String[]> requestValueMap = _externalContext.getRequestParameterValuesMap(); for(Map.Entry<String, String[]> e : requestValueMap.entrySet()){ for(int i = 0 ; i < e.getValue().length;i++){ log.info("Values Map [{0}],[{1}]", e.getKey(),e.getValue() [ i ] ); } }
and try to get the rowkeyVar, because i want to know which row was clicked. But i have not the rowkeyVar Parameter in the Request.
I also have for Test in the<rich:column> <f:facet name="header"> rowKeyVar Parameter </f:facet> <h:outputText value="#{rkv}" /> </rich:column>
in this column i get the actually row number.
Do you have any hint for me ??
thanx
Peter -
7. Re: RowKeyVar from rich:orderingList
nbelaevski Jun 29, 2009 4:22 PM (in response to solstice_pan)Hi Peter,
The only hint for now :)"nbelaevski" wrote:
Hi,
You should attach a4j:support not to the whole component, but to each row element (i.e. to column components). -
8. Re: RowKeyVar from rich:orderingList
solstice_pan Jun 29, 2009 4:52 PM (in response to solstice_pan)i get crazy...
do you mean<a4j:support event="onclick" reRender="auswahlpanel" action="bean.method"> <rich:column> <f:facet name="header"> Bezeichnung </f:facet> #{backingBean.method} </rich:column> </a4j:support>
but i also get no rkv -
9. Re: RowKeyVar from rich:orderingList
nbelaevski Jun 29, 2009 6:52 PM (in response to solstice_pan)Try this:
<rich:column> <f:facet name="header"> Bezeichnung </f:facet> <a4j:outputPanel> <a4j:support event="onclick" reRender="auswahlpanel" action="bean.method" /> #{backingBean.method} </a4j:outputPanel> </rich:column>
-
10. Re: RowKeyVar from rich:orderingList
solstice_pan Jun 30, 2009 12:17 AM (in response to solstice_pan)thanx a lot, it works
-
11. Re: RowKeyVar from rich:orderingList
solstice_pan Jun 30, 2009 12:43 AM (in response to solstice_pan)thanx a lot, it works.
But I get another problem.. :-(
when i have 2 or more entries in the list and i click the button upControllLabel to change the order, the rownumber is not updated.
So for example
product | description | rownumber
java | programming language | 0
something | something description | 1
now when i click the controll label to put the entry "something" on top of the list , the rownumber is still 1 :-(
do you have an idea ? :-)