Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In CheckedListBox of SelectCheckboxMenu the square of empty item is overloaded by next item #967

Closed
schlebe opened this issue Dec 18, 2015 · 4 comments
Labels
5.2.18 5.3.5 🐞 defect Bug...Something isn't working
Milestone

Comments

@schlebe
Copy link

schlebe commented Dec 18, 2015

The EMPTY item in the listbox of SelectCheckBoxMenu is not displayed correctly

image of squareoverloaded

Like you can see, square of empty item is overloaded by next item !

I have written a correction for this little UI mistake.

In file org\primefaces\component\selectcheckboxmenu\SelectCheckboxMenuRenderer.java

In method encodeOption()

I have replace

        if(escaped)
            writer.writeText(option.getLabel());
        else
            writer.write(option.getLabel());

by

        //2015-12-10:BS: height of item SPACES in Menu ListBox is not correct !
        //<UPDATE> 
        String sLabel = option.getLabel();
        if(escaped)
            {
            if (sLabel.isEmpty())
                {
                if (sLabel.isEmpty()) sLabel = "&nbsp;";
                writer.write(sLabel);
                }
            else
                {
                writer.writeText(sLabel,null);
                }
            }
        else
            {
            if (sLabel.isEmpty()) sLabel = "&nbsp;";
            writer.write(sLabel);
            }
        //</UPDATE> 

With this correction, PrimeFaces display ...

image of rightsquare

I have used the same tip used by PrimeFaces team (using  ) for the first CheckBox that allows to select all items.

Can somebody by Primefaces implement this solution or can I do it myself ?

It's the first time that I do that and I need a little help to follow your procedure.

@sudheerj
Copy link
Contributor

sudheerj commented Jan 6, 2016

You can create a pull request instead with little changes

@schlebe
Copy link
Author

schlebe commented Jan 7, 2016

I have do that. Now I wait a response.

@schlebe schlebe closed this as completed Jan 7, 2016
@schlebe
Copy link
Author

schlebe commented Jan 7, 2016

but this issue is still OPEN

@schlebe schlebe reopened this Jan 7, 2016
@mertsincan
Copy link
Member

Thanks a lot for your pull request. Fixed for 5.3.5, 5.2.18 and 6.0.

@mertsincan mertsincan added 🐞 defect Bug...Something isn't working 5.2.18 5.3.5 labels Jan 11, 2016
@mertsincan mertsincan added this to the 6.0 milestone Jan 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5.2.18 5.3.5 🐞 defect Bug...Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants