4 Replies Latest reply on Nov 3, 2015 4:34 AM by michpetrov

    RF-13854 still present in 4.5.10.Final

    arnieaustin

      I have two rich:select's with the second dependent on the first, which is shown below. Notice the presence of the listWidth parameter as discussed here: RichFaces 4.5.10.Final VDL Documentation.

       

      <ui:decorate id="decorTrainingType" template="/layout/edit.xhtml">
          <ui:define name="label"><h:outputLabel value="#{messages.getString('infoPersonTrainingList.search.label.trainingType')}" for="searchTrainingType"/></ui:define>
                      <ui:define name="field">
              <rich:select id="searchTrainingType" value="#{infoPersonTrainingList.searchTrainingType}" 
                  listWidth="250px" valueChangeListener="#{infoPersonTrainingList.refreshClassList}"
              >
                  <f:converter converterId="codeTrainingTypeConverter" 
                      binding="#{infoPersonTrainingList.codeTrainingTypeConverter}" />
                  <f:selectItems value="#{infoPersonTrainingList.codeTrainingTypeList}"
                      var="entity" itemValue="#{entity}" 
                      itemDisabled="#{entity.inactive}" 
                      itemLabel="#{entity.descriptionForList}" />
                  <a4j:ajax event="change" execute="@this" render="decorTrainingClass,searchTrainingClass"
                  />
              </rich:select>
                      </ui:define>
          <ui:param name="required" value="false" />
          <ui:param name="fieldName" value="searchTrainingType" />
          <ui:param name="msgFieldName" value="msgSearchTrainingType" />
      </ui:decorate>                
      
      
      

       

      and yet, when the page renders, the width of the control is not effected. I replaced the listWidth with style="width:250px;" - and it worked.

       

      But I shouldn't have had to do that.

        • 1. Re: RF-13854 still present in 4.5.10.Final
          arnieaustin

          And there is more problems:

           

          1) though skinned now, the text color isn't readable against the background of the theme (emeraldTown in this case);

           

          2) the width of the control is set, but the width of the LIST isn't - so I guess I will have to set up a CSS style to fix this? If so, which two styles do I override?

           

          screenshot.jpg

          • 2. Re: RF-13854 still present in 4.5.10.Final
            michpetrov

            @listWidth sets the width of the popup list, if you want to change the width of the input use @style or @styleClass, there's no attribute for styling both. I'll take a look on the skin colors.

            • 3. Re: RF-13854 still present in 4.5.10.Final
              arnieaustin

              Thanks, I put a style= and listWidth= on the DDLs and they look ok now, but for the text color.

               

              I don't get the disconnect: why create a property that controls the pop-up list and not the control - or not have two properties? Yes, style works, but it seems like an oversight... ?

              • 4. Re: RF-13854 still present in 4.5.10.Final
                michpetrov

                I can only guess; if someone wanted to have different dimensions for control and list they can't get by with a single attribute. So you need two and then there's no reason to have a third one that controls both. Likewise we could have @controlWidth but all components come with @style already.