it's just a sketchy databinder related project i was still implementing.
Okay I have this code in the HomePage,
 
  add(postNew = new Link("postNew"){
            public void onClick(){
                setResponsePage(new RecordInputPage());
               
               
            }
        });
        add(viewList = new Link("viewList"){
            public void onClick(){
                setResponsePage(new RecordListPage());
               
            }
        });
 
RecordInputPage contains an InnerClass Form and then RecordListPage needs to refer back to RecordInputPage so as to edit a Record. Both Classes extends  the HomePage. I need to reference the Inner Class Form in RecordInputPage from RecordListPage and yet be in sync with the Hibernate Session that was automatically created by DataForm in RecordInputPage. What do i do?
 
Snippet from RecordInputPage

  public class DevForm extends DataForm {
       
       
private RequiredTextField nick;
        public DevForm(String id){
            super(id, Developer.class);
           
            add(nick = new RequiredTextField("nickname"));
            add(new RequiredTextField("name"));
            add(new TextField("mobile"));
            add(new TextArea("skillSummary"));
            
            FeedbackPanel f = new FeedbackPanel("feedback");
          
            add(f);
        }
       
    }

Snippet from RecordListPage

       IModel devList = new HibernateListModel(getString("query"));
        cp.add(new PropertyListView("devView", devList) {
            protected void populateItem(final ListItem item) {
                Developer dev = (Developer) item.getModelObject();
                item.add(new Link("editLink"){
                    public void onClick(){
                     ///WHAT DO I DO HERE TO RETURN TO THE RecordInputPage Class so as to edit this item   


                    }
                });
                item.add(new Label("nickname1",dev.getNickname()));
                item.add(new Label("name1", dev.getName()));
                item.add(new Label("mobile1",dev.getMobile()));
                item.add(new Label("skillSummary1",dev.getSkillSummary()));

            }
        });

 
I have a One-Class-Inner-Classes implementation that works fine but it gets clumsy as the fields to populate grows which is why i am trying to seperate everything to classes. I have messed around with these and Wicket keeps injecting these errors to my face:).
 
Caused by: org.hibernate.TransientObjectException: The instance was not associated with this session
    at org.hibernate.impl.SessionImpl.getIdentifier(SessionImpl.java:1358)
    at net.databinder.models.HibernateObjectModel.setPersistentObject (HibernateObjectModel.java:72)
    at net.databinder.models.HibernateObjectModel.<init>(HibernateObjectModel.java:64)
    at net.community.health.pages.PractitionerDetail$1.onClick(PractitionerDetail.java:49)
    at wicket.markup.html.link.Link.onLinkClicked(Link.java:183)
    ... 29 more
 
Please how do i go about these. or maybe i should ignore the Databinder framework and try to implement it directly with Hibernate.
 
Thank You
 
 
On 2/22/06, Joe Toth <[EMAIL PROTECTED]> wrote:
god bless america

On 2/22/06, Eelco Hillenius <[EMAIL PROTECTED] > wrote:
> No we don't. So in general you can say it is better to just pass in
> what you need. But Ayodeji is free to choose and so are we :)
>
> Eelco
>
>
> On 2/22/06, Igor Vaynberg < [EMAIL PROTECTED]> wrote:
> > do we really need to have this argument? we dont know anything about the
> > usecase.
> >
> > -Igor
> >
> >
> >
> > On 2/22/06, Eelco Hillenius < [EMAIL PROTECTED]> wrote:
> > >
> > > Though I think you have a better defined contract when you just pass
> > > in the property you need instead of the page. Will also work better
> > > when you decide to call that page from other places.
> > >
> > > Eelco
> > >
> > >
> > > On 2/22/06, Igor Vaynberg < [EMAIL PROTECTED]> wrote:
> > > > its just java. pass in the previous page object into constructor of the
> > new
> > > > page.
> > > >
> > > > setResponsePage(new NextPage(this));
> > > >
> > > > -Igor
> > > >
> > > >
> > > > On 2/22/06, Ayodeji Aladejebi <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > >
> > > > > Please i little question:
> > > > >
> > > > > When You setResponsePage() to another WebPage instance and then from
> > the
> > > > next WebPage instance, you want to reference a property or method of the
> > > > Previous Web Page instance, what is the safest thing to do?
> > > > >
> > > > > Thank you
> > > >
> > > >
> > >
> > >
> > > -------------------------------------------------------
> > > This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> > files
> > > for problems?  Stop!  Download the new AJAX search engine that makes
> > > searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> > >
> > http://sel.as-us.falkag.net/sel?cmdlnk&kid3432&bid#0486&dat1642
> > > _______________________________________________
> > > Wicket-user mailing list
> > > Wicket-user@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > >
> >
> >
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://sel.as-us.falkag.net/sel?cmdlnk&kid3432&bid#0486&dat1642
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmdlnk&kid3432&bid#0486&dat1642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user





Visit my blog: Ayodeji Aladejebi's Blog | http://dabar.cowblock.net/
Community: Visit Cowblock.net

Reply via email to