Re: Wicket request processing

2015-01-11 Thread kumar ramanathan
Hi Martin,
Am not using maven.But using eclipse,placed necessary jar files and run it
via tomcat. Kindly tell what needs to do for this.

Thanks,
Kumar


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-request-processing-tp4668967p4668969.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Wicket request processing

2015-01-10 Thread kumar ramanathan
Hi friends ,Am trying to learn how a request is getting processed in wicket .
gone through cwiki and apache wicket guide . got some idea , still exactly
am not able to get the concepts like A. How our inputs are passed to server
... Like server where we have req.get parameters workingB. Where are our do
get and so post method getting the inputs C. Where our servlet request
generated D. Basic idea with simple hello world example like thatI need your
help  Please help me on this.ThanksKumar

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-request-processing-tp4668967.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: how to handle null pointer exception while submit button

2014-06-27 Thread kumar ramanathan

PropertyModel memberIdModel=new PropertyModel(this,memberNumber);
PropertyModel lossIdModel=new PropertyModel(this,lossNumber);
TextField memberIdField = new TextField(memberId,memberIdModel);
TextField lossIdField = new TextField(lossId,lossIdModel);

Form form=new Form(form1){
public void onSubmit(){


flag=0;
assignments.clear();
estimates.clear();
assignments.add(new
AssignmentDB(MemberId,LossId,AssignemntId,DOL));
assignments.add(new
AssignmentDB(1234,001,1357,10/12/1067));
assignments.add(new
AssignmentDB(1234,001,1358,10/12/1067));
assignments.add(new
AssignmentDB(1234,003,1357,10/12/1067));
   
for(int i=1;iassignments.size();){
   
if(memberNumber.equals(assignments.get(i).getMemberId())){
System.out.println(inside2);
   
if(lossNumber.equals(assignments.get(i).getLossId())){
System.out.println(inside3);
i=i+1;
}
else{
assignments.remove(i);
i=1;
}

}
else{
assignments.remove(i);
i=1;
}

}  
if(assignments.size()=1){

setAsssignmentLabel(Assignments Output);
assignments.clear();
setAsssignmentResult(No Assignments for the given
member number and loss number);
setEstimateResult();
setEstimateLabel();
}
else{
setAsssignmentLabel(Assignments Ouput);
  
setAsssignmentResult();
setEstimateResult();
}
  }//form submit


 };//form

form.add(memberIdField);
form.add(lossIdField);
add(form);
   

This is my code snippet . Kindly help me.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/how-to-handle-null-pointer-exception-while-submit-button-tp4666392p4666396.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: how to handle null pointer exception while submit button

2014-06-27 Thread kumar ramanathan
Thanks for reviewing the issue.I have actually fixed my problem.I have used
setconvertemptyinputstrngtonull method.

TextField memberIdField = new
TextField(memberId,memberIdModel);
*memberIdField.setConvertEmptyInputStringToNull(false);*
TextField lossIdField = new TextField(lossId,lossIdModel);
lossIdField.setConvertEmptyInputStringToNull(false);


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/how-to-handle-null-pointer-exception-while-submit-button-tp4666392p4666404.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



HTML headings

2014-06-27 Thread kumar ramanathan
Hi Friends ,

Am using the dataview to show my output in table format  dep upon by input
search.For the headings am using the below HTML codes. If we have output for
the inputs i like to display the headings else i want to hide the
headings.how can we achieve this. Kindly share your thoughts.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/HTML-headings-tp4666405.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



how to handle null pointer exception while submit button

2014-06-26 Thread kumar ramanathan
Hi Friends,
I have a text box and a submit button , If i pressed submit button without
entering anything in textbox , am getting null pointer exception . Can you
please help us on it ?


Thanks,
Kumar 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/how-to-handle-null-pointer-exception-while-submit-button-tp4666392.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: how to disable the table while it is empty in wicket

2014-06-23 Thread kumar ramanathan
Hi Martin,
My Issue got resolved. I have used the empty list .

Thanks,
Kumar

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/how-to-disable-the-table-while-it-is-empty-in-wicket-tp4666308p4666355.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: how to disable the table while it is empty in wicket

2014-06-19 Thread kumar ramanathan
Martin,

I understand we use the empty list.Kindly give me some example code to
achieve this. Am trying this for a long time , still struggling. Please
share some simple example on this. 

Thanks,
Kumar

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/how-to-disable-the-table-while-it-is-empty-in-wicket-tp4666308p4666318.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



how to disable the table while it is empty in wicket

2014-06-18 Thread kumar ramanathan


Hi Friends,
Finally i have created a program to display table with links with guidance
of you all.I have the below program which displays the data in a table
format.While the page loads initially an empty table will be shown , once
the submit button is pressed the data is populated in the table.I would like
to disable the empty table while the page loads initially. I am not aware of
ajax, also i have tried dataview.setenabled(false), it did not work.Please
help me.

 
Code:
Homepage.java:

public class HomePage extends WebPage {
  ArrayListAssignmentDB assignments = new ArrayListAssignmentDB();
  DataViewListlt;AssignmentDB dataView ;
  private String memberNumber,lossNumber;
  public HomePage(){
PropertyModel memberIdModel=new PropertyModel(this,memberNumber);
PropertyModel lossIdModel=new PropertyModel(this,lossNumber);
TextField memberIdField = new TextField(memberId,memberIdModel);
TextField lossIdField = new TextField(lossId,lossIdModel);
assignments.add(new AssignmentDB());
  dataView = new DataViewListlt;AssignmentDB(AssignmentList, new
ListDataProvider(assignments)) {
public void populateItem(ItemListlt;AssignmentDB item) {
 final AssignmentDB  assign = (AssignmentDB) item.getModelObject();
 item.add(new Label(AOmemberId, assign.getMemberId()));
 item.add(new Label(AOlossId, assign.getLossId()));
   Link link1 = new Link(AssignmentIdLink){
 public void onClick()
   {
 System.out.println(Linkclicked+ assign.getMemberId() +   +
assign.getLossId() );
//this.setResponsePage(new Output() );
//System.out.println(Linkclicked );
}//populateitem
 };//dataview
   item.add(link1);
   link1.add(new Label(AOassignmentId, assign.getAssignmentId()));
   item.add(new Label(AOdol, assign.getDOL()));
  }
};

dataView.setEnabled(true);

Form form=new Form(form1){
public void onSubmit(){
assignments.clear();
  assignments.add(new AssignmentDB(1234,001,1357,10/12/1067));
  assignments.add(new AssignmentDB(1234,003,1357,10/12/1067));
dataView.setEnabled(true);
dataView = new DataViewListlt;AssignmentDB(AssignmentList, new
ListDataProvider(assignments)) {
public void populateItem(ItemListlt;AssignmentDB item) {
final AssignmentDB assign = (AssignmentDB) 
item.getModelObject();
  item.add(new Label(AOmemberId, assign.getMemberId()));
   item.add(new Label(AOlossId, assign.getLossId()));
   Link link1 = new Link(AssignmentIdLink){
   public void onClick(){
 System.out.println(Linkclicked+ assign.getMemberId() +   +
assign.getLossId() );
   }
   };
item.add(link1);
  link1.add(new Label(AOassignmentId, assign.getAssignmentId());
  item.add(new Label(AOdol, assign.getDOL()));
   }
};

}//form submit
};//form

form.add(dataView);
dataView.setEnabled(false);
   
   
   form.add(memberIdField);
   form.add(lossIdField);
   add(form);
   }//constructor



 public void setMemberNumber(String x){
this.memberNumber=x;
 }
 public void setLossNumber(String x){
this.lossNumber=x;
 }
 public String getMemberNumber(){
return this.memberNumber;
 }
 public String getLossNumber(){
return this.lossNumber;
 }

}//class



HTML FILE:

!DOCTYPE html PUBLIC quot;-//W3C//DTD HTML 4.01 Transitional//ENquot;
quot;http://www.w3.org/TR/html4/loose.dtdquot;
html
head
meta http-equiv=Content-Type content=text/html; charset=UTF-8
titleEstimateSearcher/title
/head
body

form wicket:id=form1
Member Number input type=text wicket:id=memberIdbr/
Loss Number   input type=text wicket:id=lossIdbr/
input type=submit value=search 



MemberNo
LossNo
AssignmentNo
dol

   div wicket:id=AssignmentList
 



  span wicket:id=AOassignmentId # [Address]  

 
   /div
  

 /form

/body
/html

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/how-to-disable-the-table-while-it-is-empty-in-wicket-tp4666308.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: how to disable the table while it is empty in wicket

2014-06-18 Thread kumar ramanathan
Hi Martin,

I have added that code in the dataview as below.

dataView = new DataViewListlt;AssignmentDB(AssignmentList, new
ListDataProvider(assignments)) {
   public void onConfigure() {
 *super.onConfigure();* *//am getting error here*
  setVisible(getDataProvider().size()  1);
} 
   public void populateItem(ItemListlt;AssignmentDB 
item) {
   .
   }
  };

Also in the above code in the thread above , i have add a assignmentdb
object with empty values before form submit code, so it is loaded a table
with empty row. while onsubmit i have removed the list values and populate
the table with new values. I believe I should not add the empty values
first.How to correct this ,i have done this because wicket says
labels,dataview Ids are not defined,dataview should not be null am not aware
of how to handle the null values.  please advice and help me. 

code snap:

assignments.add(new AssignmentDB());
 dataView = new DataViewListlt;AssignmentDB(AssignmentList, 
new
ListDataProvider(assignments)) {
 public void populateItem(ItemListlt;AssignmentDB item) {
  final AssignmentDB  assign = (AssignmentDB) 
item.getModelObject();

item.add(new Label(AOmemberId, assign.getMemberId()));
item.add(new Label(AOlossId, assign.getLossId()));

  }};




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/how-to-disable-the-table-while-it-is-empty-in-wicket-tp4666308p4666316.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Dataview help

2014-06-13 Thread kumar ramanathan
Hi Martin,I have used the link code as you have suggested as below and
getting the error at setBody(Model.of(person.getId()))* The method
setBody(Model) is undefined for the type new Link(){} *.Code
used:repeatingView.add(new Link(repeatingView.newChildId()) { 
public void onClick() {  setResponsePage(new Output()); 

}  }.setBody(Model.of(person.getId(;item.add(repeatingView);So i
have altered the code as below ,removed the .setbody part. But inoutput am
unable to get the link in Id column ofoutput.code
altered:repeatingView.add(new Link(repeatingView.newChildId()) { 
public void onClick() {  setResponsePage(new Output()); 

}  });item.add(repeatingView);O/p Got:Name IdSamRamNo values displayed
in id column as above. Please help me.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Dataview-help-tp4666151p4666255.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Link in repeaters

2014-06-10 Thread kumar ramanathan
Hi Friends ,
I have successfully generated the view using repeaters using the following
code.

HTML:
body


NameId 





/body

HelloWorld.java
public HelloWorld(){
ListPersons list = new  ArrayListPersons();
list.add(new Persons(sam,one));
list.add(new Persons(ram,two));
ListDataProviderPersons listDataProvider = new
ListDataProviderPersons(list);
DataViewPersons dataView = new DataViewPersons(rows,
listDataProvider) {
@Override protected void populateItem(ItemPersons item) 
{ 
  Persons person = item.getModelObject();
  RepeatingView repeatingView = new RepeatingView(dataRow);
  repeatingView.add(new Label(repeatingView.newChildId(),
person.getName()));
  repeatingView.add(new Label(
repeatingView.newChildId(),person.getId()));
  item.add(repeatingView); 
 }
}; 
add(dataView);
 }
Ouput I got :

Name Id
sam one(not link)
ram  two(not link)

Now I have tried to display the above ouput as below with link

Name Id
sam one(link)
ram  two(link)


For this ouput i have altered the code in helloword.java as below 


DataViewPersons dataView = new DataViewPersons(rows,
listDataProvider){
 protected void populateItem(ItemPersons item){
  Persons person = item.getModelObject();
  RepeatingView repeatingView = new RepeatingView(dataRow);
  repeatingView.add(new Label(repeatingView.newChildId(),
person.getName()));
  repeatingView.add(new Link(person.getId()){
 public void onClick(){
 setResponsePage(Output.class);
 }
  });
  item.add(repeatingView);
  }
}; add(dataView);}}
 
Output I got for the above code change is

Name Id
sam
ram  

No Id value is displayed.

I need your help on making code changes to display the id as link. Kindly
help me what are the things i need to update.
Thanks,
Kumar


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Link-in-repeaters-tp4666176.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Dataview help

2014-06-09 Thread kumar ramanathan
Hi Paul,
Thanks So much i have succesfully displayed the data in table using
repeating view.The code is shown below.

HelloWorldApplication.java

package com.lnn.app;

import org.apache.wicket.Page;
import org.apache.wicket.protocol.http.WebApplication;

import com.lnn.page.HelloWorld;

public class HelloWorldApplication extends WebApplication {

@Override
public Class? extends Page getHomePage() {
// TODO Auto-generated method stub
return HelloWorld.class;
}

}

HelloWorld.java

package com.lnn.page;

import java.util.ArrayList;
import java.util.List;

import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.repeater.data.DataView;
import java.io.Serializable;
import java.util.ArrayList;

import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.link.Link;
import org.apache.wicket.markup.html.navigation.paging.PagingNavigator;
import org.apache.wicket.markup.repeater.Item;
import org.apache.wicket.markup.repeater.RepeatingView;
import org.apache.wicket.markup.repeater.data.DataView;
import org.apache.wicket.markup.repeater.data.ListDataProvider;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;

public class HelloWorld extends WebPage {
public HelloWorld(){
ListPersons list = new  ArrayListPersons();
list.add(new Persons(sam,one));
list.add(new Persons(ram,two));
ListDataProviderPersons listDataProvider = new
ListDataProviderPersons(list);
DataViewPersons dataView = new DataViewPersons(rows, listDataProvider){
 protected void populateItem(ItemPersons item){
  Persons person = item.getModelObject();
  RepeatingView repeatingView = new RepeatingView(dataRow);
  repeatingView.add(new Label(repeatingView.newChildId(), person.getName()));
  repeatingView.add(new Label( repeatingView.newChildId(),person.getId()));
  item.add(repeatingView);
  }
}; add(dataView);}}


HelloWorld.html

 ?xml version=1.0 encoding=UTF-8?
html xmlns=http://www.w3.org/1999/xhtml;
   xmlns:wicket=http://wicket.apache.org;
body
table
trthName/ththId/th /tr
tr wicket:id=rows
td wicket:id=dataRow/td
/tr
/table
/body
/html

Persons.java


package com.lnn.page;
import java.io.Serializable;

public class Persons implements Serializable{
String name;
String id;
public Persons(String name,String id){
this.name=name;this.id=id;
}
public void setId(String id){
this.id=id;
}
public String getId(){
return this.id;
}
public void setName(String name){
this.name=name;
}
public String getName(){
return this.name;
}

}

O/P:
Name Id
sam one
ram two


In the above i have displayed the id a s lable. I want ot show it as
link using the following change in the code of helloworld.java
public class HelloWorld extends WebPage {
public HelloWorld(){
ListPersons list = new  ArrayListPersons();
list.add(new Persons(sam,one));
list.add(new Persons(ram,two));
ListDataProviderPersons listDataProvider = new
ListDataProviderPersons(list);
DataViewPersons dataView = new DataViewPersons(rows, listDataProvider){
 protected void populateItem(ItemPersons item){
  Persons person = item.getModelObject();
  RepeatingView repeatingView = new RepeatingView(dataRow);
  repeatingView.add(new Label(repeatingView.newChildId(), person.getName()));
  repeatingView.add(new Label( repeatingView.newChildId(),person.getId()){
  public void onClick(){
  setResponsePage(Output.class);
  }
  });
  item.add(repeatingView);
  }
}; add(dataView);}}

no link/data in the Id column displayed. Please help.How toget the
link over there.

O/P:
Name Id
Sam
Ram

Thanks,
Kumar

On 6/9/14, Paul Bors [via Apache Wicket]
ml-node+s1842946n4666157...@n4.nabble.com wrote:


 Have you tried one of the Repeaters from:
 http://www.wicket-library.com/wicket-examples/index.html

 Direct link:
 http://www.wicket-library.com/wicket-examples/repeater/

 They are also explained in the Wicket Free Guide at:
 http://wicket.apache.org/guide/guide/single.html#repeaters

 Let us know if you have a more specific question.


 On Fri, Jun 6, 2014 at 9:29 AM, kumar ramanathan kumarramana...@gmail.com
 wrote:

 Hi Friends,
 I am new beginner of wicket and trying to implement the table as below
 using
 data view.

 name id
 sam  21(link)
 ram   16(link)

 once i click the id it show the sam/ram details in next page. I have
 tried
 many ways to implement it using  simple data view , but not able to do.
 Hoping you for help on this.
 I have tried cwiki examples, wicket library examples but those are very
 long
 to understand.Can you please share a simple project similar to my
 requirement above. Please help me, am struggling for nearly three months
 on
 this.

 Thanks,
 Kumar

Dataview help

2014-06-06 Thread kumar ramanathan
Hi Friends,
I am new beginner of wicket and trying to implement the table as below using
data view.

name id
sam  21(link)
ram   16(link)

once i click the id it show the sam/ram details in next page. I have tried
many ways to implement it using  simple data view , but not able to do.
Hoping you for help on this. 
I have tried cwiki examples, wicket library examples but those are very long
to understand.Can you please share a simple project similar to my
requirement above. Please help me, am struggling for nearly three months on
this.

Thanks,
Kumar 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Dataview-help-tp4666151.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Errors in data view , req for help to fix the error in code

2014-05-29 Thread kumar ramanathan
Hi Friends,
Please any help on how we can separate the data view code and populate the
Provider value on submit the form .

public class DemoHomePage extends WebPage { 

public ListDataProviderDemoBean listDataProvider; 
ListDemoBean list = new ArrayList(); 


public DemoHomePage () 
{ 

  Form form=new Form(homePageForm){ 
   public void submit(){ 
   list.add(new DemoBean(1,ram)); 
   list.add(new DemoBean(2,sam)); 
   listDataProvider = new ListDataProviderDemoBean(list); 
   DataViewDemoBean dataView = new
DataViewDemoBean(row,listDataProvider){
   private static final long
serialVersionUID = 1L;
   protected void
populateItem(ItemDemoBean item){
 DemoBean
bean=item.getModelObject();

RepeatingView repeatingView = new RepeatingView(dataRow);

repeatingView.add(new Label(repeatingView.newChildId(), bean.getId()));

repeatingView.add(new Label(repeatingView.newChildId(), bean.getName()));

item.add(repeatingView);
} 
  }; 
  add(dataView); 
 } 
  }; 
  // 
  

add(form); 
} 

* the error am getting is unable to find wicket Id : row  *

Thanks,
Kumar Ramanathan

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Errors-in-data-view-req-for-help-to-fix-the-error-in-code-tp4666025p4666056.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Errors in data view , req for help to fix the error in code

2014-05-28 Thread kumar ramanathan
Martin,
I tried in the same way as before , again wicket id not referred error
comes.Please help me to correct my code below.

public class DemoHomePage extends WebPage {

public ListDataProviderDemoBean listDataProvider;
ListDemoBean list = new ArrayList();


public DemoHomePage ()
{

  Form form=new Form(homePageForm){
   public void submit(){
   list.add(new DemoBean(1,ram));
   list.add(new DemoBean(2,sam));
   listDataProvider = new ListDataProviderDemoBean(list);
   DataViewDemoBean dataView = new
DataViewDemoBean(row,listDataProvider){
  private static final long serialVersionUID = 
1L;
  protected void populateItem(ItemDemoBean 
item){
DemoBean 
bean=item.getModelObject();
RepeatingView 
repeatingView = new RepeatingView(dataRow);

repeatingView.add(new Label(repeatingView.newChildId(),
bean.getId()));

repeatingView.add(new Label(repeatingView.newChildId(),
bean.getName()));

item.add(repeatingView);
   }
  };
  add(dataView);
 }
  };
  //
  

add(form);
}

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Errors-in-data-view-req-for-help-to-fix-the-error-in-code-tp4666025p4666047.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Errors in data view , req for help to fix the error in code

2014-05-27 Thread kumar ramanathan
Thanks,
The serializable error resolved once it has been implemented. I have the
error in the below add component still(which is in bold font).Please help me
on this.

repeatingView*.add(n*ew Label(repeatingView.newChildId(), bean.getId()));
repeatingView.add(new 
Label(repeatingView.newChildId(),*
bean.getName()));*

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Errors-in-data-view-req-for-help-to-fix-the-error-in-code-tp4666025p4666027.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Errors in data view , req for help to fix the error in code

2014-05-27 Thread kumar ramanathan
a. The method add(Component...) in the type MarkupContainer is not applicable
for the arguments (Label)
b. The constructor Label(String, String) is undefined

these are the two errors.please help.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Errors-in-data-view-req-for-help-to-fix-the-error-in-code-tp4666025p4666030.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Errors in data view , req for help to fix the error in code

2014-05-27 Thread kumar ramanathan
Thanks Martin.I did not import the label . Now that issue resolved.

Now am facing issue in the run time.

DemoHomePage.java

package com.demo.pages;

import java.util.ArrayList;
import java.util.List;

import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.form.*;
import org.apache.wicket.markup.html.list.*;
import org.apache.wicket.markup.repeater.Item;
import org.apache.wicket.markup.repeater.RepeatingView;
import org.apache.wicket.markup.repeater.data.DataView;
import org.apache.wicket.markup.repeater.data.ListDataProvider;
import org.apache.wicket.markup.html.basic.Label;





public class DemoHomePage extends WebPage {
public DemoHomePage ()
{
  Form form=new Form(homePageForm){
  public void submit(){
ListDemoBean list = new ArrayList();
list.add(new DemoBean(1,ram));
list.add(new DemoBean(2,sam));

ListDataProviderDemoBean listDataProvider = new
ListDataProviderDemoBean(list);

final DataViewDemoBean dataView = new
DataViewDemoBean(row,listDataProvider){
/**
 * 
 */
private static final long serialVersionUID = 1L;

protected void populateItem(ItemDemoBean item){
DemoBean bean=item.getModelObject();
RepeatingView repeatingView = new 
RepeatingView(dataRow);
repeatingView.add(new 
Label(repeatingView.newChildId(), bean.getId()));
repeatingView.add(new 
Label(repeatingView.newChildId(),
bean.getName()));
item.add(repeatingView);
}
};
add(dataView);

  }
  };
  add(form);
}

}


*Html:*

html
body
form wicket:id=homePageForm
input type=submit value=ok
/form


 Id 
 Name 


 


/body
/html

Run time error is below:
WicketMessage: Unable to find component with id 'row' in [Page class =
com.demo.pages.DemoHomePage, id = 4, version = 0]. This means that you
declared wicket:id=row in your markup, but that you either did not add the
component to your page at all, or that the hierarchy does not match.
[markup =
file:/home/kumar/Documents/javaapplications/Eclipse_Workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/demo/WEB-INF/classes/com/demo/pages/DemoHomePage.html
html
head/headbody
form wicket:id=homePageForm
input type=submit value=ok
/form


 Id 
 Name 


 


/body
/html, index = 8, current = '
' (line 11, column 1)]

Root cause:

org.apache.wicket.markup.MarkupException: Unable to find component with id
'row' in [Page class = com.demo.pages.DemoHomePage, id = 4, version = 0].
This means that you declared wicket:id=row in your markup, but that you
either did not add the component to your page at all, or that the hierarchy
does not match.
[markup =
file:/home/kumar/Documents/javaapplications/Eclipse_Workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/demo/WEB-INF/classes/com/demo/pages/DemoHomePage.html
html

I have used row in the submit method , but the wicket is not able to find
since Dataview scope is not exist outside submit method. How could we
resolve this problem, please help me.


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Errors-in-data-view-req-for-help-to-fix-the-error-in-code-tp4666025p4666033.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Errors in data view , req for help to fix the error in code

2014-05-27 Thread kumar ramanathan
Yes Martin,I Understand the problem is the row (wicket:id) is not properly
referred in the java.

but I have referred inside the submit method in dataview component . The
data view scope is not accessible. It throwed the error.

While using inside submit method , how we could make the scope accessible
and resolve this problem.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Errors-in-data-view-req-for-help-to-fix-the-error-in-code-tp4666025p4666037.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Errors in data view , req for help to fix the error in code

2014-05-27 Thread kumar ramanathan
Apologize Martin.Please tell how to fix my problem. Code snap is below for
your reference,kindly help  on what needs to modified in that.

public DemoHomePage ()
{
  Form form=new Form(homePageForm){
  public void submit(){
ListDemoBean list = new ArrayList();
list.add(new DemoBean(1,ram));
list.add(new DemoBean(2,sam));

ListDataProviderDemoBean listDataProvider = new
ListDataProviderDemoBean(list);

 DataViewDemoBean dataView = new
DataViewDemoBean(row,listDataProvider){
/**
 * 
 */
private static final long serialVersionUID = 1L;

protected void populateItem(ItemDemoBean item){
DemoBean bean=item.getModelObject();
RepeatingView repeatingView = new 
RepeatingView(dataRow);
repeatingView.add(new 
Label(repeatingView.newChildId(), bean.getId()));
repeatingView.add(new 
Label(repeatingView.newChildId(),
bean.getName()));
item.add(repeatingView);
}
};

add(dataView);
  }
  };
 
  add(form);
}

Html page:

html
body
form wicket:id=homePageForm
input type=submit value=ok
/form


 Id 
 Name 


 


/body
/html

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Errors-in-data-view-req-for-help-to-fix-the-error-in-code-tp4666025p4666039.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Errors in data view , req for help to fix the error in code

2014-05-27 Thread kumar ramanathan
Martin,I have tried to put the data view code out side the submit method ,it
throwed the below error.java.lang.IllegalArgumentException: argument
[dataProvider] cannot be null at
org.apache.wicket.markup.repeater.data.DataViewBase.(DataViewBase.java:59)
at org.apache.wicket.markup.repeater.data.DataView.(DataView.java:81)Can you
please tell how to put the data view code in the form while constructing
itself . If possible please give some example.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Errors-in-data-view-req-for-help-to-fix-the-error-in-code-tp4666025p4666041.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Errors in data view , req for help to fix the error in code

2014-05-26 Thread kumar ramanathan
Hi Friends ,

Am trying to execute a wicket program to accomplish the below task,

a. a submit button is in place in a form
b. when I click that i have to show the ouput in data view of the same page

My codes are below and need your help to fix the erros and get the ouput


*Demoapplication.java*

package com.demo.application;

import org.apache.wicket.Page;
import org.apache.wicket.protocol.http.WebApplication;
import com.demo.pages.*;

public class DemoApplication extends WebApplication {

@Override
public Class? extends Page getHomePage() {
// TODO Auto-generated method stub
return DemoHomePage.class;
}

}

DemoHomePage.html:
html
body
form wicket:id=homePageForm
input type=submit value=ok
/form


 Id 
 Name 


 


/body
/html

DemoHomePage.java
package com.demo.pages;

import java.util.ArrayList;
import java.util.List;

import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.form.*;
import org.apache.wicket.markup.html.list.*;
import org.apache.wicket.markup.repeater.Item;
import org.apache.wicket.markup.repeater.RepeatingView;
import org.apache.wicket.markup.repeater.data.DataView;
import org.apache.wicket.markup.repeater.data.ListDataProvider;

import com.sun.xml.internal.ws.org.objectweb.asm.Label;



public class DemoHomePage extends WebPage {
public DemoHomePage ()
{
  Form form=new Form(homePageForm){
  public void submit(){
ListDemoBean list = new ArrayList();
list.add(new DemoBean(1,ram));
list.add(new DemoBean(2,sam));

ListDataProviderDemoBean listDataProvider = new
ListDataProviderDemoBean(list);

DataViewDemoBean dataView = new
DataViewDemoBean(row,listDataProvider){
protected void populateItem(ItemDemoBean item){
DemoBean bean=item.getModelObject();
RepeatingView repeatingView = new 
RepeatingView(dataRow);
repeatingView.add(new 
Label(repeatingView.newChildId().bean.getId()));
repeatingView.add(new 
Label(repeatingView.newChildId().bean.getName()));
item.add(repeatingView);
}
};

add(dataView);
  }
  };
  
}

}

Am getting the below error in the highlighted red area ListDataProvider
DemoBean and repeatingView.add.(.)

Error: 
Bound mismatch: The type DemoBean is not a valid substitute for the bounded
parameter T extends Serializable of the type ListDataProviderT
The method add(Component...) in the type MarkupContainer is not applicable
for the arguments (Label)

DemoBean.java

package com.demo.pages;

public class DemoBean {
public String id;
public String name;

public DemoBean(String id,String name)
{
this.id=id;this.name=name;
}

public String getId(){
return this.id;
}

public void setId(String id){
this.id=id;
}

public String getName(){
return this.name;
}

public void setName(String name){
this.name=name;
}


}

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Errors-in-data-view-req-for-help-to-fix-the-error-in-code-tp4666025.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Hard time with repeaters

2014-05-25 Thread kumar ramanathan
Thanks Lucio.

I have tried the example repeaters in wicket library site. In that if we try
to open a source code for simple data view , many classes and files are
coming , i am not able to try it in my desktop. Can you please tell how we
can do it.

Also am in need of examples which explains the wicket concept very basically
, in books wicket in action and all am not able to get the codes to try it
in my machine.

please help me.

Regards, Kumar

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Hard-time-with-repeaters-tp4666005p4666016.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Hard time with repeaters

2014-05-24 Thread kumar ramanathan
Hi Friends,
Am a very basic beginner of programming and wicket frame work.I have the
below requirement to study a simple flow of wicket.

a. A home page will have the two text boxes and a submit button
b.Once i Submit the values , the output has to shown in table format.like
below
Name  Age Country Id
Sam   21India  12
Ram   22USA  15

I have tried many different ways like list view , data view on submit method
, but no +ve output. Also am trying to study the wicket in action book ,
cook book, online wicket guide , but not able to find a simple example for a
beginner to learn how the flow works. Also I would like to know where to get
the complete codes of examples discussed in the above books to practically
try it in home.

Please any one help me on the above requirement and also advice the how we
can understand the wicket concepts easily.

Thanks,
Kumar Ramanathan

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Hard-time-with-repeaters-tp4666005.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Issue while running wicket from tomcat

2014-04-20 Thread kumar ramanathan
Hi Friends,
Am facing issues in running wicket from Tomcat.Please find the information
below.

a. I have created three files HelloWorld.java , HelloWorldApplication.java
,HelloWorld.html with in the package HelloWorld.
b. I am using Tomcat server to run my first wicket.
c.As usual I have placed class files inside the classes folder
(/WEB-INF/Classes/HelloWorld/) (HelloWorld.class
,HelloWorldApplication.class)
d.Then copied the html file in ROOT directory.
e.Started the tomcat server
f.If i launch https://localhost:8080/HelloWorld.html nothing comes up. Then
tried https://localhost:8080/HelloWorld/ the system says 404 error.

I need your help how to run our application from tomcat . Please help to run
my first wicket application.

Thanks,
Kumar Ramanathan


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Issue-while-running-wicket-from-tomcat-tp4665469.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org