                     "change username: "
                     input {
                         ref: "usernameInput"
-                        type: "text"
-                        placeholder: "#{@state.username}"}
-
-
+                        type: "String"
+                        defaultValue: "#{@state.username}"}
 
                     br null, null
                     br null, null
                     "view finder is:"
-                    br null, null
-                    "Lat, Lng: "
-
-                    input {
-                        id: "vflatlng"
+
+                    br null, null
+                    "Lat: "
+                    input {
+                        ref: "latInput"
                         type: 'text',
-                        value: "#{@state.lat}, #{@state.lng}"}
-
-                    br null, null
-                    "zomm: "
-
-                    input {
-                        id: "vfzoom",
+                        defaultValue: "#{@state.lat}"}
+
+                    br null, null
+                    "Lng: "
+                    input {
+                        ref: "lngInput"
                         type: 'text',
-                        value: "#{@state.zoom}"}
+                        defaultValue: "#{@state.lng}"}
+
+                    br null, null
+                    "zoom: "
+                    input {
+                        ref: "zoomInput",
+                        type: 'number',
+                        defaultValue: "#{@state.zoom}"}
 
                     br null, null
                     br null, null
                     "Show 'view finder' marker: "
 
                     input {
-                        id: "showmarker",
+                        id: "show_pin_point",
                         type: 'checkbox',
-                        name: "true", value: "true"}
+                        defaultChecked: "#{@state.show_pin_point}",
+                        initialChecked: "#{@state.show_pin_point}"}
 
                     br null, null
                     br null, null

# Le composant qui va définir une ligne de homedata
Homedata = React.createFactory React.createClass

    #test
    getInitialState: ->
        console.log @props.userConfig
        return {
            helloworld: @props.homedata.helloworld
            username: @props.homedata.username
            title: @props.homedata.title
            lat: 39.4568257456
            lng: 0.500042567
            zoom: 3
        }

    onOkClicked: ->
        username = @refs.usernameInput.getDOMNode().value
        homedata =
            id: @props.homedata.id
            username: username

        backend.putConfigid homedata, ->
            alert 'data saved'


    render: ->

SidebarHeading = React.createFactory React.createClass

    render: ->
        console.log @props

        div id: "sidebar-heading", className: 'sidebar-heading',
