Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4050782
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T14:06:45+00:00 2026-05-20T14:06:45+00:00

this is actually my first ZK project seems pretty cool but not working and

  • 0

this is actually my first ZK project seems pretty cool but not working and not throwing error either.

If i understand well the concept,server side can respond to interface action without me doing all the ajax plumbing work.I’ve wrote a small login app which does not perform any login per se but on click on submit should display a Messagebox.

here is my index.zul file

<window xmlns:n="native" id="win" apply="com.personal.project.admintest.event.LoginController">
<n:style type="text/css">
    button {
        color: #999999;
    }
    #center {
    width:500px;
    height:100px;
    position:absolute;
    top:50%; left:50%;
    margin:-50px auto auto -100px;
    text-align:center;
    }
</n:style>
<n:div id="center">
    <groupbox id="gbLogin" mold="3d" width="300px">
        <caption label="login section" />
        <n:table>
            <n:tr>
                <n:td>
                    <label value="Username"/>
                </n:td>
                <n:td>
                    <textbox value="" id="txtUsername"/>
                </n:td>
            </n:tr>
            <n:tr>
                <n:td>
                    <label value="Password"/>
                </n:td>
                <n:td>
                    <textbox value="" id="txtPassword" type="password"/>
                </n:td>
            </n:tr>
            <n:tr  style="text-align: center">
                <n:td colspan="2">
                    <button id="btnSubmit" label="Login" width="70px" />
                </n:td>
            </n:tr>
        </n:table>
    </groupbox>

   </n:div>
</window>

and here is my LoginController file

import org.zkoss.zhtml.Messagebox;
import org.zkoss.zk.ui.util.GenericForwardComposer;
import org.zkoss.zul.Textbox;
import org.zkoss.zul.Window;

public class LoginController extends GenericForwardComposer {
  Textbox txtUsername;
  Textbox txtPassword;
  Window win;


public void onClick$btnSubmit(){
   try {

    Messagebox.show(txtUsername.getText() + " and pass is " + txtPassword.getText());
    } catch(InterruptedException e){
        e.printStackTrace();
    }
  }
}

Unfortunately when i click on the button Nothing Happens at all and there is no error either 🙁 . I’m sure i’m doing something wrong, i just can’t find what it is.

I’would be grateful if somebody can point it out to me.

thanks for reading this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T14:06:46+00:00Added an answer on May 20, 2026 at 2:06 pm

    Apparently the code works.Can’t say what went wrong the first times i’ve run it.
    I would like to keep the question here because it might jut help someone get started.
    Thanks for all who read it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I understand that 2 options are available: Non-persistent Persistent But what does this actually
I'm pretty certain I'm missing something really obvious here but this seems quite bizarre.
I'm very new to trigger function. Actually this is the first time I'm using
The first part of this question is actually a request for confirmation based on
I am actually stuck in merging the result of this two queries: first query:
this is my first time using jquery, and i dont think it seems to
I have searched this web looking for an answer, but it seems that this
I'm working on a web site project that is currently tracked in svn but
So, I'm building this brand-new project in MS Access (2007, but I don't think
First a general explanation, and then what I am actually working on: Let say

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.