Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Can't run the ui in Adding Custom Components to Visual Builder

    Hi,
    I do it by the 'SmartClient_Reference.html' where how i can create my custom components,and the custom components can be showed on the Visual Builder 'Index.jsp'.
    But when i click the "Run" Button ,the page displays the whiteboard。
    I use the Google Chrome and press F12,the console logs some debug-infos。


    I used "SmartClient_v110p_2017-04-21_Evaluation" comes with the example, just remove the note.

    the "customComponents.xml":

    Code:
    <!--
      See "Adding Custom Components to Visual Builder" in the "Concepts - Visual Builder" section of the
      SmartClient Reference for the custom component format.
    -->
    
    <PaletteNodes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    
    <!-- example: ListGrid pre-configured to allow editing -->
    <!--
    <PaletteNode>
        <title>&lt;b&gt;Editable Grid&lt;/b&gt;</title>
        <type>ListGrid</type>
        <defaults>
            <canEdit xsi:type="boolean">true</canEdit>
        </defaults>
        <icon>ListGrid.png</icon>
        <showDropIcon>true</showDropIcon>
    </PaletteNode>
    -->
    
    <!-- example: Label pre-configured and pre-skinned for use as a simple screen header -->
    <!---->
    <PaletteNode>
        <title>&lt;b&gt;Simple Label&lt;/b&gt;</title>
        <type>Label</type>
        <defaults>
            <wrap xsi:type="boolean">false</wrap>
            <height>20</height>
            <contents>Label Text</contents>
            <styleName>headerItem</styleName>
        </defaults>
    </PaletteNode>
    
    
    
    <!-- example: add one of the custom component examples including in the SDK -->
    <!-- See also the additions to globalDependencies.xml for this class -->
    <!---->
    <PaletteNode>
        <title>&lt;b&gt;SimpleHeader&lt;/b&gt;</title>
        <type>SimpleHeader</type>
        <icon>toolbar.gif</icon>
        <iconSize>16</iconSize>
        <showDropIcon>true</showDropIcon>
    </PaletteNode>
    
    
    </PaletteNodes>
    the "globalDependencies.xml"

    Code:
    <dependencies>
       <!-- loading a custom component: include the JavaScript class definition -->
    <!-- -->
       <dependency type="js" url="/examples/custom_components/SimpleHeader/SimpleHeader.js"/>
    
    
       <!-- loading a custom component: include the component schema.  Search for
            "component schema" in the SmartClient Reference for more information
            about component schema -->
    <!---->
       <dependency type="schema" id="SimpleHeader"/>
    
    </dependencies>
    the "SimpleHeader.js","SimpleHeader.ds.xml","server.properties" and the others all come with the smartclient SDK. Did not make any changes.

    E:\SmartClient_v110p_2017-04-21_Evaluation\SmartClient_v110p_2017-04-21_Evaluation\smartclientSDK\examples\custom_components\SimpleHeader\SimpleHeader.js
    E:\SmartClient_v110p_2017-04-21_Evaluation\SmartClient_v110p_2017-04-21_Evaluation\smartclientSDK\examples\shared\ds\SimpleHeader.ds.xml
    Attached Files
    Last edited by zwb; 8 Aug 2017, 16:54.

    #2
    Your screenshot is illegible, and you have provided nearly enough information: forgot to post product and full version, no information at all about the custom components you're adding, and the files you've changed to add them.

    Comment

    Working...
    X