0

view model have some error

asked 2014-04-05 16:40:32 +0800

sathishk gravatar image sathishk
17 5

updated 2014-04-06 09:34:03 +0800

chillworld gravatar image chillworld flag of Belgium
5357 4 9
https://github.com/chillw...

Dear sir i am using this code for update information, In this two

tags their, 1)
have view model and 2)normal grid its not working properly please check.i am new in zk please help me

<div apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('org.novelerp.controller.DashboardUIController')">
            <label class="bold">Mobile Number</label>
            <h:p>
                <listbox id="codetype" mold="select" model="@load(vm.mcode)" selectedItem="@bind(vm.code)" width="130px">
                    <template name="model">
                        <listitem value="@load(each.code)" label="@load(each.ccodename)" selected="true"></listitem>
                    </template>
                </listbox><h:br/>
                <label style="margin-left: 10px;">Country code</label>
            </h:p>
        </div>
        <div apply="org.novelerp.controller.DashboardUIController">
            <h:ul class="profile">
                <h:li>

                    <h:p>
                        <textbox id="mobileno" constraint="/^$|[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/:Please enter 10 digits only"></textbox><h:br/>
                        <label style="margin-left: 10px;">Mobile number</label>
                    </h:p>

                </h:li>

                <!--  constraint="/[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/:Please enter 10 digits only" -->

                <h:li>
                    <label class="bold">Telephone Number</label>
                    <h:p>
                        <textbox id="telcode" constraint="/^$|[0-9][0-9][0-9][0-9]/:Please Country code 4 digits only"></textbox><h:br/>
                        <label style="margin-left: 10px;">Country code</label>
                    </h:p>
                    <h:p>
                        <textbox id="telephone" constraint="/^$|[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/:Please Telephone number 8 digits only"></textbox><h:br/>
                        <label style="margin-left: 10px;">Telephone number</label>
                    </h:p>
                </h:li> 

                <h:li>
                     <label class="bold">Email</label>
                     <textbox id="emailid" constraint="/^$|\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/: Please enter an e-mail address"></textbox>
                 </h:li>
            <!-- constraint="/^$|\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/: Please enter an e-mail address" -->

                 <h:li>
                     <label class="bold">Prefered Address</label>
                     <radiogroup id="preferdaddress">
                        <radio value="present" name="present" checked="true" label="Present Address"></radio>
                        <radio value="perminent" name="present" label="Permanent Address"></radio>
                         <!-- <h:input type="radio" value="present" name="present" id="present" checked="true" label="Present Address"> </h:input>
                         <h:input type="radio" value="perminent" name="present" id="perminet" label="Permanent Address"></h:input> -->
                     </radiogroup>
                  </h:li> 

                  <h:li>
                        <label class="bold">Permanent Address</label><textbox multiline="true" id="permanent"></textbox>
                  </h:li>       
                <!-- <button id="fileupload" label="Upload" upload="true,maxsize=-1"/> -->
                <!-- <fileupload label="Attach" upload="true"></fileupload> -->
                    <div visible="false" id="upload">
                        <h:li>
                            <label class="bold">Proof of address change</label>
                            <listbox id="" mold="select">
                                <listitem id="driving" label="Driving Licence" value="Driving Licence"></listitem>
                                <listitem id="aadhar" label="Aadhar Card" value="Aadhar Card"></listitem>
                                <listitem id="passport" label="Passport" value="Passport"></listitem> 
                            </listbox>
                        </h:li>
                    </div>
                    <div id="upload1" visible="false">
                        <h:li>  
                            <button id="fileupload" upload="true" label="upload" />
                            <label id="lbl1"/>
                        </h:li> 
                    </div>
                    <h:li>
                        <div>
                            <button id="submit" sclass="button marg-0">Submit</button>
                            <button id="cancel" sclass="button marg-0">Cancel</button>
                        </div>  
                    </h:li>

            </h:ul>
        </div>
delete flag offensive retag edit

Comments

Can you explain exactly what your problem is? You speak of a grid and the only thing I see are 2 listbox.

Greetz chill.

chillworld ( 2014-04-06 06:46:44 +0800 )edit
Be the first one to answer this question!
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2014-04-05 16:40:32 +0800

Seen: 14 times

Last updated: Apr 06 '14

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More