WebListboxCellRenderer - Sending data back to Xojo?

My ultimate goal here is to create a WebPopupMenu Listbox cell type.

I’ve poked around documentation.xojo.com, which pointed me to examples and I have explored “Button Cell” and “Color Cell”. I have read through the WebSDK.pdf. I have read through XojoWebSDK.d.ts.

I am not understanding how a WebListboxCellRenderer can send a change in selection / value back to the server.

Does anyone know how this can be done?
Does anyone have a cell renderer for a WebPopupMenu already?
Did I miss some part of the documentation for this?

Perhaps I miss something, but did you mean something like:

XojoWeb.controls.lookup(controlID).triggerServerEvent(‘CustomCellAction’, obj);

1 Like

Oh, I see the demo Button Cell project wasn’t linked up correctly and didn’t function.

I can now see a way to pass myself data using the CustomCellAction event, but that feels hacky. Is there a better way?

Using CustomCellAction is the way it’s been designed, so it’s the best way available at the moment.

Do you have any improvement suggestion?

Not so far :slight_smile:

Could you tell me about Serialize and Deserialize? My understanding so far is that the WebListbox doesn’t store the object reference, but re-constructs the CellRenderer with the Deserialize event? Am I able to store tags that don’t go to the browser?

You will need to do something else, WebListBox won’t be able to store all those references as it could contain millions of rows. Can’t you use CellTagAt maybe?

I will be able to for the purposes of this project, but the idea was to create a transportable cell renderer that I could use easily in other projects. Currently, needing to implement the CustomCellEvent action is a little less self-contained than I was hoping for.

I think I will be able to keep moving though.

Static Array-Variable in the Event perhaps?