Hello Parvinder,

It's not ->value(), it's ->text(). It is no blame to have to look up
the correct method names in the reference (I have to do that too):
http://www.webtoolkit.eu/wt/doc/reference/html/classWt_1_1WLineEdit.html

Best regards,
Wim.

2011/11/1 PARVINDER RAJPUT <m...@parvinder.co.in>:
>> typedef Wt::Dbo::collection< Wt::Dbo::ptr<form> > Forms;
>> Forms collect = session_.find<form>("store like
>> '%?%'").bind(nameEdit_->value());
> it give me error
> class Wt::WLineEdit’ has no member named ‘value
> I have also write the text here. But problem is not solved.
>
>
> void WtApplication::hello()
> {
>  root()->addWidget(new  WText("Search"));  // show some text
>  nameEdit_ = new WLineEdit(root());
>  root()->addWidget(new WBreak());
>
>  WPushButton *b = new WPushButton("Find", root());
>  b->setMargin(10, Left);
>  greeting_ = new  WText( root());
>  b->clicked().connect(this, &WtApplication::search);
>
> }
>
> // search the value from datatbase
>
> void WtApplication::search() { //fetching
>
> msg("<center><H1></H1></center>","<center><H1></H1></center>","<center><H1></H1></center>","<center><H1></H1></center>","<center><H1></H1></center>");
>
> try {
>                        greeting_->setText( nameEdit_->text());
>
>                       Transaction tt(session_);
>                       typedef Wt::Dbo::collection< Wt::Dbo::ptr<form> > Forms;
>                       Forms collect = session_.find<form>("store like
> '%?%'").bind(nameEdit_->value());
>                       for (colform::const_iterator i =
> collect.begin(); i != collect.end(); ++i)
>
>
> msg((*i)->store,(*i)->name,(*i)->contact,(*i)->intercom,(*i)->stream);
>                        tt.commit();
>                      } catch (...) {}
>
> }
> --
> Parvinder Rajput
> website:- www.parvinder.co.in
>
> ------------------------------------------------------------------------------
> RSA&reg; Conference 2012
> Save &#36;700 by Nov 18
> Register now
> http://p.sf.net/sfu/rsa-sfdev2dev1
> _______________________________________________
> witty-interest mailing list
> witty-interest@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>

------------------------------------------------------------------------------
RSA&reg; Conference 2012
Save &#36;700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to