You are right.. textdata's value will be displayed initially.
I think you got this code from Query example..
Well, It depends upon your need to use the same code.
If you just want to design a simple query input dialog, then you may ommit several lines in it.
Simple code to display the input dialog is
CAknTextQueryDialog* dlg = CAknTextQueryDialog::NewL(
textData, CAknQueryDialog::ENoTone );
dlg->ExecuteLD(R_AKNEXQUERY_DATA_QUERY);// Your input dialog name
// from .rss file