Results 1 to 4 of 4
  1.    #1  
    I'm trying to set up a list with two buttons and a text field in each row and be able to add new rows with the two buttons and a blank text field.

    I can't seem to render the two buttons separately. The first row has two buttons formatted as "start" and the second row has two buttons formatted as "end". When I click "Add" at the bottom of the list, the new row has two buttons but with no formatting.

    I think my list model items are messed up. Please help!

    I have a list widget in the scene:
    Code:
    <div x-mojo-element="List" id="myList"></div>
    the button and text field widgets in the row template:
    Code:
    <div name="startButton" x-mojo-element="Button"></div>
    <div name="endButton" x-mojo-element="Button"></div>
    <input name="myText" x-mojo-element="TextField" value="#{data}"></input>
    and the models in my scene assistant:
    Code:
    this.startButtonModel ={
    
    label:"start", disabled: false
    }; this.endButtonModel ={
    label:"end", disabled: false
    }; this.listsModel={
    items:[ {data:$L("New Name")}, this.startButtonModel, this.endButtonModel
    ] }; this.myListAttrs={
    itemTemplate:'listItem', addItemLabel:$L(Add..."), };
    this.controller.setupWidget('myList',this.myListAttrs,this.listsModel);
    Any suggestions/insight or even sample code would be appreciated. Thanks!!
  2. chimeric's Avatar
    Posts
    69 Posts
    Global Posts
    71 Global Posts
    #2  
    Try placing the HTML in a table. That should help keep the formatting in place.
  3.    #3  
    Thanks for the input, chimeric.

    I actually have the buttons in a table in html. I didn't include it in the code because it is formatting/displaying the table correctly.

    I think I'm having trouble applying two different button models in the same setupWidget for my list.

    I get two buttons in the first row that both say "start" and two buttons in the second row that both say "end". I want each row to have one button that says "start" and one that says "end".

    I should have been more clear. Did that make sense?
  4. chimeric's Avatar
    Posts
    69 Posts
    Global Posts
    71 Global Posts
    #4  
    Yes, your description makes sense. That is puzzling behavior, especially since your list row html is defined start-end-text. Any other code related to those buttons?

Posting Permissions