[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Call table on the web via listener  XML
Forum Index -> Development
Author Message
kklasen

Power User

Joined: 19/11/2020 08:33:30
Messages: 66
Offline

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
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5521
Offline

Hi Klas,

could you please contact us directly by mail (info@CaptainCasa.com)? Sometimes it is easier to see something by Zoom then trying to get the meaning out of code snippets ;-)

Of course: results will be shared in this forum afterwards!

Kind regards, Björn

Björn Müller, CaptainCasa GmbH
kklasen

Power User

Joined: 19/11/2020 08:33:30
Messages: 66
Offline

Hi Björn,

thank you for the meeting. it was a great help!



Kind regards
Klas
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team