Hello,
I am writing a web application. Now I want that when the user login, he immediately lands on the right page and the table loads itself with the data important for him. The login works and the user lands on the right page, but the table remains empty. The information about the person is passed via a listener from the login and then the data is fetched from the databases, which also works. As already written, I get no output in the table.
My question is why does the listener not call the table. Is there a Demo for that? Ich write it already on another forum, but there was no answer.
Thanks for your answer
I am attaching part of the code and hope it is helpful.
Fetch the data from listener and handed over to DB
Code:
public void prepare(IListener listener, int onSign, String uName) {
m_onSign = onSign;
m_username = uName;
m_listener = listener;
if (StringUtils.containsOnly(m_username, "1234567890_-")) {
LoadBookIDTrainUser();
// Statusbar.outputMessage("Sign: "+m_onSign + " username: "+ username);
}
saveProgTrain(onSign,uName);
Catch data from DB und should write them in table
Code:
private void additemsTrainDesc(String trainDescInfo, String trainDescno, String trainID) {
Statusbar.outputMessageWithPopup("Call Load BOOKID Method:"+ trainDescInfo);
// GridTrainDescInfoItem row = new GridTrainDescInfoItem();
row.i_lblTrainDescInfo = trainDescInfo;
row.i_lblTrainDescNo = trainDescno;
int tmpPro = 0;
row.i_lblTrainDescPercent = Integer.toString(tmpPro) + "%";
m_gridTrainDescInfo.getItems().add(row);
}
Constructor to initialize the table at the beginning
Code:
public TrainStudentSideTUI()
{
// Load TrainID by TrainBookID
if (StringUtils.containsOnly(m_username, "1234567890_-")) {
row = new GridTrainDescInfoItem();
Statusbar.outputMessage("UserName: "+ m_username);
}
I konw it´s isn´t the forum for Java code, but i hope to get an answer anyway.
Kind regards
klas