Issues with having a custom Usercontrol as a form editor in the data perspective

Topics: Visual editor
Jul 13, 2011 at 5:02 AM

Hi , created a user control for editing data in the data perspective which displays correctly, I have a custom form markup xml for formating data in the tree structure. My user control has text boxes that won't delete or backspace the text in the text box, and editing data in the other controls does not trigger the save button to become active.

my form markup is 

<cms:formdefinition xmlns:cms="http://www.composite.net/ns/management/bindingforms/1.0" xmlns="http://www.composite.net/ns/management/bindingforms/std.ui.controls.lib/1.0" xmlns:f="http://www.composite.net/ns/management/bindingforms/std.function.lib/1.0">

  <cms:bindings>

    <cms:binding name="HospitalKey" type="System.Int32" optional="false" />

    <cms:binding name="HospitalName" type="System.String" optional="false" />

    <cms:binding name="AboutHospital" type="System.String" optional="true" />

  </cms:bindings>

  <cms:layout>

    <cms:layout.label>

      <cms:read source="HospitalName" />

    </cms:layout.label>

    <HospitalFormControl xmlns="http://www.removedforprivacy.com/">

      <HospitalFormControl.HospitalName>

        <bind source="HospitalName" xmlns="http://www.composite.net/ns/management/bindingforms/1.0" />

      </HospitalFormControl.HospitalName>

      <HospitalFormControl.AboutHospital>

        <bind source="AboutHospital" xmlns="http://www.composite.net/ns/management/bindingforms/1.0" />

      </HospitalFormControl.AboutHospital>

    </HospitalFormControl>

  </cms:layout>

</cms:formdefinition>


Coordinator
Jul 13, 2011 at 11:14 AM

Hi @drmor9471 

>> My user control has text boxes that won't delete or backspace the text in the text box, and editing data in the other controls does not trigger the save button to become active.

In order to make text boxes work correctly in C1 console environment, you should either do some javascript, or reuse custom XHTML tags that are used in our own form controls.

Check out /Composite/controls/FormsControls/FormUiControlTemplates/TextInput/TextBox.ascx  (and TextArea.ascx) for inspiration

I expect, if you use "<ui:datainput ... />" tags for displaying text boxes, that should solve the problem