PDA

View Full Version : Custom Control in List Using xBasic


ABC123

Scott B
04-04-2017, 03:39 PM
I have a custom control in a list control that uses the following xbasic to generate the html for the displayed text. The problem is that it does not seem to like the e.dataSubmitted method. As always, thanks so much for the assistance!


dim txt as c
dim txtalt as c
dim control as c

txt= ds.data("CComment")
control = e.dataSubmitted.Filler
txtalt = strtran(txt,"*PLACEHOLDER*",control)

CommentTest_render = txtalt

Davidk
04-04-2017, 04:45 PM
Maybe this isn't all of your code... but I'm not sure I understand what you want to do.

The "e" object is not available in a Custom Control.

Where is "Filler" coming from? You're expecting it in e.dataSubmitted... but is it coming from the List control data... or from a control in your UX? Is it user supplied... or coming from a table when the UX is rendered?

If you've included all your XBasic... then I can see that you're passing in (or want to), from the Client, the value of your Filler control. You're then replacing the "CComment" List control "*PLACEHOLDER*" with the value of Filler.

So... you're getting all the data you need from the Client, sending it to the Server, replacing text, and sending it back.

I'm wondering if this could all be accomplished on the Client without an XBasic Custom Control.

Scott B
04-04-2017, 05:38 PM
Thanks David. Client-side was indeed the way to go in this case. Didn't want or need the callback at all. This video helped me out:

http://www.ajaxvideotutorials.com/V12Videos/ux_list_control_customcontrol_clientside.swf