Editable Web Listbox Cell Project Needs Input

Hello Everyone. Im using WebListboxCellRenderer to create a custom listbox cell that is editable. Currently I have it styled how I like in the app header. In the contstant kJavascriptClass Ive got everything set correct to it puts an editable input text field in the cell. Everything renders just fine. The problem is with the string being passed in. It will only display the first word of a string passed in. It should be displaying the whole string. If anyone can open the project and see what Im doing wrong, it would be greatly appreciated. Here’s the link to the downloadable project.

Editable Cell Renderer Project

Your link is not public.

Sorry about that. I changed it to public so you can try again.

Try this:

cell.innerHTML = '<input class="editableCell" type="text" value="' + data.cellValue + '" ;> ';

Brilliant! It works! Who knew an editable cell was so simple! Thanks for the help!

Hey Alberto, Would you mind looking at the project again for the ListboxCheckboxCell renderer that I added? When I pass in false, there should an empty checkbox. No matter what I do to the kJavascriptClass string, it will not show as unchecked. If your not to busy. Thank you.

The checked attribute is true when it exists, not when it has a boolean value of true. So if you have the attribute on the node at all, the value is true for the checkbox.

Use this:

cell.innerHTML = '<input class="listboxCheckbox" type="checkbox"' + (data.cellCheck ? ' checked' : '') + '> ';

Something not quite right with the string. As soon as I insert it, it fails to run. I replaced from where the cell.innerHTML. I appreciate your help Anthony. You’re always awesome about this stuff.

Here’s the full constant value:

class ListboxCheckboxCell extends XojoWeb.ListboxCellRenderer {
    render(controlID, row, data, rowIndex, columnIndex, cell) {
        cell.innerHTML = '<input class="listboxCheckbox" type="checkbox"' + (data.cellCheck ? ' checked' : '') + '> ';

Is it running for you? I replaced the whole value for the constant and it still does the same thing. Acts like its going to run and then just stops all together.


Weird. Some little hiccup with Xojo. I had several projects opened so I shut them all down and restarted the project and now it works. Thanks so much for you help!


I downloaded your test project, attempted to run and fails when I add Anthony’s code. Did you fix something else besides the constant?

It should be running fine now. I did add a few more things. Some events for listbox customCellAction.

1 Like

Yeah, thanks. It was me being dumb. Your example project works as expected. Thanks for sharing :slight_smile:

@Jeffery_Lemons @Anthony_G_Cyphers @AlbertoD @Hector_Marroquin … Any of you could share the link to the project that it is not available any more… THANKS !!!

I don’t have the project anymore. But it is built into my main project. What exactly are you looking for? Ill find the code and share it with you.

Thanks for answer @Jeffery_Lemons
What I am looking for is for any custom cell renderers that help me improve the visual and the functionality of my weblistboxes.
I got some from Ricardo Cruz examples but if you have some more to share I will appreciate because I do not have large experience with Java.

Mine are so deeply embedded into the program that it would be impossible to try and pull them out without a whole bunch of code that goes with them. In the coming days I will try to put together a project with it all in there that way you can see how they go together.