You need to link to the webpage.
Add the following line to your HTML page after your
<script language="javascript" src="org.yournamehere.Main/
org.yournamehere.Main.nocache.js"></script>
<div id="maindisplay"></div>
Add the following line in your public void onModuleLoad() { after
> submit.addClickListener(new ClickListener() {
> public void onClick(Widget sender) {
> formPanel.submit();
> }
> });}
RootPanel.get("maindisplay").add(formPanel);
This sets formPanel to be displayed at the <div>.
Also you must be using GWT 1.5 not GWT 1.6 the function
addClickListener(
is deprecation
You should use the following
submit.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
formPanel.submit();
}
});
On Jul 9, 10:29 am, Leonardo Carreira <[email protected]>
wrote:
> Hi All.. sorry i found new Problem.. :(
>
> i have created an application by used FormPanel..
> but i couldn't any Widget which displayed.. :(
>
> here is my code :
> [code]
> public class MainEntryPoint implements EntryPoint {
>
> public void onModuleLoad() {
> final FormPanel formPanel=new FormPanel();
> formPanel.setAction("/hello.html");
> formPanel.setMethod(FormPanel.METHOD_POST);
>
> VerticalPanel layout = new VerticalPanel();
> formPanel.setWidget(layout);
> final TextBox fullName = new TextBox();
> layout.add(fullName);
> Button submit = new Button("Submit");
> layout.add(submit);
>
> submit.addClickListener(new ClickListener() {
> public void onClick(Widget sender) {
> formPanel.submit();
> }
> });}
> }
>
> [/code]
>
> here is my html :
> [code]
> <html>
> <head>
> <meta name='gwt:module'
> content='org.yournamehere.Main=org.yournamehere.Main'>
> <title>Main</title>
> </head>
> <body>
> <script language="javascript" src="org.yournamehere.Main/
> org.yournamehere.Main.nocache.js"></script>
> </body>
> </html>
> [/code]
>
> please help me.. :(
>
> Thanks in advance... :)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---