[JBoss JIRA] Created: (RF-5385) rich:comboBox ignore label of SelectItem(s)
by Andreas Höhmann (JIRA)
rich:comboBox ignore label of SelectItem(s)
-------------------------------------------
Key: RF-5385
URL: https://jira.jboss.org/jira/browse/RF-5385
Project: RichFaces
Issue Type: Bug
Affects Versions: 3.2.2
Environment: java 1.5
myfaces 1.2
Reporter: Andreas Höhmann
Priority: Critical
<rich:comboBox id="scaleOfActions"
defaultLabel="Enter some value"
directInputSuggestions="false"
enableManualInput="false"
selectFirstOnUpdate="false"
value="#{Bean.value}">
<f:selectItems value="#{utils:selectItemsLocalizedEnumString('PER_HOUR,PER_DAY,PER_WEEK,PER_MONTH,PER_YEAR')}" />
</rich:comboBox>
I expected this (this is the correct output of h:selectOneMenu with a4j:support ...)
<select id="form_subsystem_safety:scaleOfActions" class="smallField" name="form_subsystem_safety:scaleOfActions" size="1" onkeyup="if(event.keyCode!=13) return false; ;A4J.AJAX.Submit('_viewRoot','form_subsystem_safety',event,{'eventsQueue':'sid','parameters':{'form_subsystem_safety:scaleOfActions_livevalidation_enterpressed':'form_subsystem_safety:scaleOfActions_livevalidation_enterpressed'} ,'actionUrl':'../../sid-base-web-app/main/sid.jsf;jsessionid=1xss4deh2fa52','ignoreDupResponses':true,'requestDelay':250} )" style="" onchange=";A4J.AJAX.Submit('_viewRoot','form_subsystem_safety',event,{'eventsQueue':'sid','parameters':{'form_subsystem_safety:scaleOfActions_livevalidation_onchange':'form_subsystem_safety:scaleOfActions_livevalidation_onchange'} ,'actionUrl':'../../sid-base-web-app/main/sid.jsf;jsessionid=1xss4deh2fa52','ignoreDupResponses':true,'requestDelay':250} )">
<option value="PER_HOUR" selected="selected" title="PER_HOUR">Pro Stunde</option>
<option value="PER_DAY" title="PER_DAY">Pro Tag</option>
<option value="PER_WEEK" title="PER_WEEK">Pro Woche</option>
<option value="PER_MONTH" title="PER_MONTH">Pro Monat</option>
<option value="PER_YEAR" title="PER_YEAR">Pro Jahr</option>
</select>
You see the items are correct localized ...
but rich:combobox render this:
<div id="form_subsystem_safety:scaleOfActions_r"><div class="rich-combobox-font rich-combobox smallField" id="form_subsystem_safety:scaleOfActions_rcombobox" style="width: 148px; position: static; z-index: 0;" onkeyup="if(event.keyCode!=13) return false; ;A4J.AJAX.Submit('_viewRoot','form_subsystem_safety',event,{'eventsQueue':'sid','parameters':{'form_subsystem_safety:scaleOfActions_r_livevalidation_enterpressed':'form_subsystem_safety:scaleOfActions_r_livevalidation_enterpressed'} ,'actionUrl':'../../sid-base-web-app/main/sid.jsf;jsessionid=1xss4deh2fa52','ignoreDupResponses':true,'requestDelay':250} )"><div class="rich-combobox-list-cord"/><div class="rich-combobox-font rich-combobox-shell" style="width: 150px;"><input type="text" autocomplete="off" class="rich-combobox-font-inactive rich-combobox-input-inactive" id="form_subsystem_safety:scaleOfActions_rcomboboxField" name="form_subsystem_safety:scaleOfActions_rcomboboxField" readonly="true" style="width: 135px;" value="PER_HOUR"/><input type="text" class="rich-combobox-font-inactive rich-combobox-button-background-inactive rich-combobox-button-inactive" id="form_subsystem_safety:scaleOfActions_rcomboBoxButtonBG" readonly="true"/><input type="text" class="rich-combobox-font-inactive rich-combobox-button-icon-inactive rich-combobox-button-inactive" id="form_subsystem_safety:scaleOfActions_rcomboboxButton" readonly="true" style=""/><div class="rich-combobox-strut rich-combobox-font" style="width: 140px;">Strut</div></div><input type="hidden" id="form_subsystem_safety:scaleOfActions_rcomboboxValue" name="form_subsystem_safety:scaleOfActions_r" value="PER_HOUR" class=""/><div class="rich-combobox-list-cord" id="form_subsystem_safety:scaleOfActions_rlistParent" style="position: absolute; z-index: 1000; visibility: visible; left: 458px; top: 173px; display: none;"><div class="rich-combobox-shadow"><table cellspacing="0" cellpadding="0" border="0" id="form_subsystem_safety:scaleOfActions_rshadow" style="width: 157px; height: 129px;"><tbody><tr><td class="rich-combobox-shadow-tl"><img height="1" width="10" border="0" src="../../sid-base-web-app/a4j/g/3_2_2.SR1images/spacer.gif.jsf"/><br/></td><td class="rich-combobox-shadow-tr"><img height="10" width="1" border="0" src="../../sid-base-web-app/a4j/g/3_2_2.SR1images/spacer.gif.jsf"/><br/></td></tr><tr><td class="rich-combobox-shadow-bl"><img height="10" width="1" border="0" src="../../sid-base-web-app/a4j/g/3_2_2.SR1images/spacer.gif.jsf"/><br/></td><td class="rich-combobox-shadow-br"><img height="10" width="10" border="0" src="../../sid-base-web-app/a4j/g/3_2_2.SR1images/spacer.gif.jsf"/><br/></td></tr></tbody></table></div><div class="rich-combobox-list-position" id="form_subsystem_safety:scaleOfActions_rlistPosition"><div class="rich-combobox-list-decoration" id="form_subsystem_safety:scaleOfActions_rlistDecoration"><div class="rich-combobox-list-scroll" id="form_subsystem_safety:scaleOfActions_rlist" style="height: 120px; width: 148px;"/></div></div></div></div><script type="text/javascript">//<![CDATA[
var clientId = 'form_subsystem_safety:scaleOfActions_r';
RichComboUtils.execOnLoad( function(){
Richfaces.ComboBox.CLASSES = {
BUTTON : {CLASSES :
{NORMAL : "rich-combobox-font-inactive rich-combobox-button-icon-inactive rich-combobox-button-inactive ",
ACTIVE : "rich-combobox-font rich-combobox-button-icon rich-combobox-button ",
DISABLED : "rich-combobox-font-disabled rich-combobox-button-icon-disabled rich-combobox-button-disabled ",
HOVERED : "rich-combobox-button-hovered"},
STYLE :
{NORMAL: "",
ACTIVE: "",
DISABLED: ""}
},
BUTTONBG : {CLASSES :
{NORMAL:"rich-combobox-font-inactive rich-combobox-button-background-inactive rich-combobox-button-inactive",
ACTIVE: "rich-combobox-font rich-combobox-button-background rich-combobox-button",
DISABLED : "rich-combobox-font-disabled rich-combobox-button-background-disabled rich-combobox-button-disabled"}
},
BUTTONICON : {STYLE :
{NORMAL: "",
ACTIVE: "",
DISABLED: ""}
},
FIELD : {CLASSES:
{NORMAL : "rich-combobox-font-inactive rich-combobox-input-inactive ",
ACTIVE : "rich-combobox-font rich-combobox-input ",
DISABLED : "rich-combobox-font-disabled rich-combobox-input-disabled "},
STYLE :
{NORMAL : "",
ACTIVE : "",
DISABLED : ""}
},
COMBO_LIST : {
LIST : {CLASSES :{ACTIVE : "rich-combobox-list-cord rich-combobox-list-scroll rich-combobox-list-decoration rich-combobox-list-position "},
STYLE : {ACTIVE: ""}
},
ITEM : {NORMAL : "rich-combobox-item ",
SELECTED : "rich-combobox-item rich-combobox-item-selected "
}
}
}
var combobox = new Richfaces.ComboBox( "form_subsystem_safety:scaleOfActions_r",
"form_subsystem_safety:scaleOfActions_rlist",
"form_subsystem_safety:scaleOfActions_rlistParent",
"form_subsystem_safety:scaleOfActions_rcomboboxValue",
"form_subsystem_safety:scaleOfActions_rcomboboxField",
"form_subsystem_safety:scaleOfActions_rcomboboxButton",
"form_subsystem_safety:scaleOfActions_rcomboBoxButtonBG",
"form_subsystem_safety:scaleOfActions_rshadow",
Richfaces.ComboBox.CLASSES,
"150px", "200px",
['PER_HOUR','PER_DAY','PER_WEEK','PER_MONTH','PER_YEAR'] ,
false,
true,
false,
null,
null,
"Enter some value",
false, 'PER_HOUR',
0, 0);
}, RichComboUtils.Condition.ElementPresent("form_subsystem_safety:scaleOfActions_r"), 100);
//
//]]>
</script></div>
The result is a unlocalized ui.
I guess the problem is in org.richfaces.renderkit.ComboBoxBaseRenderer:
public List<Object> encodeItems(FacesContext context, UIComponent component) throws IOException, IllegalArgumentException {
if (!isAcceptableComponent(component)) {
return null;
}
UIComboBox comboBox = (UIComboBox) component;
Object suggestionValues = comboBox.getSuggestionValues();
ResponseWriter writer = context.getResponseWriter();
List <Object>values = encodeSuggestionValues(context, component, writer, suggestionValues);
List<SelectItem> selectItems = SelectUtils.getSelectItems(context, component);
for (SelectItem selectItem : selectItems) {
String value = getConvertedStringValue(context, comboBox, selectItem.getValue());
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// selectItem.getLabel() will never called - why?
values.add(value);
encodeSuggestion(writer, comboBox, value, RICH_COMBOBOX_ITEM_CLASSES);
}
return values;
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 2 months
[JBoss JIRA] Created: (RF-9218) Input number slider: Unable to attach <a4j:ajax> to non-ClientBehaviorHolder parent
by Pavol Pitonak (JIRA)
Input number slider: Unable to attach <a4j:ajax> to non-ClientBehaviorHolder parent
------------------------------------------------------------------------------------
Key: RF-9218
URL: https://jira.jboss.org/browse/RF-9218
Project: RichFaces
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: component-input
Affects Versions: 4.0.0.Milestone2
Environment: JBoss 6 M4, Glassfish 3, Chrome 5.0.375.127
Reporter: Pavol Pitonak
<rich:inputNumberSlider id="slider" value="#{bean.value}">
<a4j:ajax id="sliderAjax" render="output"/>
</rich:inputNumberSlider>
The page above causes the following error:
/components/richInputNumberSlider/simpler.xhtml @25,64 <a4j:ajax> Unable to attach <a4j:ajax> to non-ClientBehaviorHolder parent
javax.faces.view.facelets.TagException: /components/richInputNumberSlider/simpler.xhtml @25,64 <a4j:ajax> Unable to attach <a4j:ajax> to non-ClientBehaviorHolder parent
at org.richfaces.view.facelets.html.AjaxHandler.applyNested(AjaxHandler.java:193)
at org.richfaces.view.facelets.html.AjaxHandler.apply(AjaxHandler.java:131)
at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:120)
at org.richfaces.view.facelets.html.BehaviorsAddingComponentHandlerWrapper.applyNextHandler(BehaviorsAddingComponentHandlerWrapper.java:55)
at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:204)
at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:114)
at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:91)
at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:120)
at org.richfaces.view.facelets.html.BehaviorsAddingComponentHandlerWrapper.applyNextHandler(BehaviorsAddingComponentHandlerWrapper.java:55)
at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:204)
at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:114)
at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:120)
at org.richfaces.view.facelets.html.BehaviorsAddingComponentHandlerWrapper.applyNextHandler(BehaviorsAddingComponentHandlerWrapper.java:55)
at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:204)
at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:114)
at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:91)
at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:86)
at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:91)
at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:75)
at com.sun.faces.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:145)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.buildView(FaceletViewHandlingStrategy.java:716)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:313)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
at org.richfaces.tests.metamer.TestIdentityFilter.doFilter(TestIdentityFilter.java:93)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:277)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:226)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
at java.lang.Thread.run(Thread.java:619)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 2 months