ich Daten versuche & Anzeige zu nehmen, dass die Daten durch die Komponente Label-
verwenden, aber, dass die Daten nicht auf Seite nicht gesehen
alle Etiketten sind in table-row & Reihe increses hier aber Reihe doesnt LabelDie Daten stammen aus der Liste aber nicht auf die Seite gesehen
package com.cerebrum.pages;
import java.util.ArrayList;
import java.util.List;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.list.ListItem;
import org.apache.wicket.markup.html.list.ListView;
import org.apache.wicket.model.CompoundPropertyModel;
import org.apache.wicket.model.PropertyModel;
import com.cerebrum.common.Home;
import com.cerebrum.hibernate.AddForumSubCategoryEntity;
import com.cerebrum.hibernate.ForumHome;
import com.cerebrum.pojo.ForumModel;
public class Forum extends Home
{
ForumHome forumHome=new ForumHome();
ForumModel forumModel=new ForumModel();
List<ForumModel> listForum=new ArrayList<ForumModel>();
public Forum()
{
super();
add(new ForumForm());
}
class ForumForm extends Form
{
public ForumForm()
{
super("ForumForm");
setModel(new CompoundPropertyModel(forumModel));
List<AddForumSubCategoryEntity> list=forumHome.getAll();
for(AddForumSubCategoryEntity addForumSubCategoryEntity:list)
{
listForum.add(new
ForumModel(addForumSubCategoryEntity.getMain_key(),
addForumSubCategoryEntity.getDescription()));
}
ListView listView=new ListView("listForum",listForum)
{
@Override
protected void populateItem(ListItem item)
{
ForumModel model=(ForumModel)item.getDefaultModelObject();
Label lblMainCategory=new Label("lblMainCategory",new
PropertyModel(model, "lblMainCategory"));
item.add(lblMainCategory);
Label lblLastSubCategory=new
Label("lblLastSubCategory",new PropertyModel(model, "lblLastSubCategory"));
item.add(lblLastSubCategory);
Label lblTotalNoofPost=new Label("lblTotalNoofPost",new
PropertyModel(model, "lblTotalNoofPost"));
item.add(lblTotalNoofPost);
}
};
listView.setOutputMarkupId(true);
add(listView);
}
}
}
Ich bin in allen Modellen verloren. Was versuchst du zu archivieren? – bert