Code examples
Categories:
How to add ui code?
There is a tutorial video just down below.
- You need a QuickStart project: - Select File > New > IIZI Module Project (Quickstart)
- Enter project nameand unselectCreate text tables with automatic translation
- Press Finish
 
 
- Select 
- Add - Text Field- Name it: text (on component and VSField)
 
 
- Name it: 
- Add - Button- On Button properties, go to Events > OnUIAction > Create new method…
- Choose Create > Then OK
- Enter the texts in the entry fields:
- Package: com.iizi.ui
- Name: Code
- Then click on Finish
- Method name: onClick- Paste this code in the method
 
 
- On Button properties, go to 
UIText text = event.getSource().getUIPanel().getFirstUIComponentNull(“text”, UIText.class);
text.requestFocus();
- Place your - mouse cursoron- UIText, underlined with red- Select Import "UIText" (com.iizi.prop.ui)
- Then do File > Save All or CTRL + SHIFT + S
- Right click on the project name > Run As > Run on IIZI Development Server
- If it says “No configured IIZI Development Server configuration is found”: Choose Yes.
- Right click on IIZI Development Server > New Configuration > Put a Name > Run it
 
 
- Select 
- To test it: - You need to open your browserand go to: http://localhost:8080
- Click on the link: here
- Then click on Startto launch the app in the browser
- Press the Clickbutton and it sets theUI focusto the Text Field
 
- You need to 
How to add 10 rows?
There is a tutorial video just down below.
- You need a QuickStart project: - Select File > New > IIZI Module Project (Quickstart)
- Enter project nameand unselectCreate text tables with automatic translation
- Press Finish
 
 
- Select 
- Select - tablein containers and- drag/drop itto your panel.- Name it: myTable
- Go to the Propertiesfor the UI Table and adda VS Table to your panel VS Group
- Add a (UI) table columnandlink it in the VS Table
 
 
- Name it: 
- Drag and drop Buttonto the panel- Create VS Actionfor this button
- Name it: addContent
 
 
- Create 
- Go to - VirtualSpaceand in properties in- Connectors > Java Class > Create new class…- Enter the textsin the input fields:
- Package: com.iizi.vs
- Name: VirtualSpace
- Then click on Finish
 
 
- Select - addContent’s properties, Connectors > OnVSAction > Create new method…- Method name: addContent
- Paste this code in the method:
 
- Method name: 
VSTable table = event.getTable("group/myTable");
Value[] rowValues = new Value[1];
for ( int item = 1; item <= 10; ++item ) {
rowValues[0] = new Value("Test - "+item);
table.addRow(rowValues);
}
- Place your - mouse cursoron errors you will see:- VSTable and do: - Import "VSTable" (com.iizix.prop.vs)
- Value[] and do: - Import "Value" (com.iizix)
 
- Then do - File > Save Allor- CTRL + SHIFT + S- Right click on project name > Run As > Run on IIZI Development Server
- If it says “No configured IIZI Development Server configuration is found”: Choose Yes.
- Right click on IIZI Development Server > New Configuration > Add a Configuration Name > Run it
 
 
- Right click on 
- To test it: - You need to open your browser and go to: http://localhost:8080/
- Click on the link: here
- Then click on Startto launch the app in the browser.
- You just click on the Add contentsbutton and it will add a new row.
 
How to set a value in an entry field?
There is a tutorial video just down below.
- You need a QuickStart project: - Select File > New > IIZI Module Project (Quickstart)
- Enter project nameand unselectCreate text tables with automatic translation
- Press Finish
 
 
- Select 
- Select - Text fieldin components and- drag/dropit to your panel.- Name it: text
- Add it to your VS Group
 
 
- Name it: 
- Add - Buttonand- add this in properties:- Text: Edit text
- Click on VS Action > Create VS Action… > Add it to your VS Group
- Set the action name: editText
- Then click on Finish
 
 
- Text: 
- Go to - VirtualSpaceand in properties in- Connectors > Java Class > Create new class…- Type in:
- Package: com.iizi.vs
- Name: VirtualSpace
- Then click on Finish
 
 
- Select - editText’s properties, Connectors > OnVSAction > Create new method…- Method name: editText
- Replace your methodwith this code in your class:
 
- Method name: 
@OnVSAction(name = "group/editText")
public void editText(VSActionEvent event) throws ValueConversionException {
event.getField((@VSRef String) "group/text").set_String("My Message");
}
- Place your - mouse cursoron errors you will see:- ValueConversionException and do an: Import "ValueConversionException" (com.iizix.prop)
- @VSRef and do an: Import "VSRef" (com.iizix.api.vs)
 
 
- ValueConversionException and do an: 
- Then do - File > Save Allor- CTRL + SHIFT + S- Right click on project name > Run As > Run on IIZI Development Server
- If it says “No configured IIZI Development Server configuration is found”: Choose Yes.
- Right click on IIZI Development Server > New Configuration > Set a Name > Run it
 
 
- Right click on 
- To test it: - You need to open your browserand go here: http://localhost:8080/
- Click on the link: here
- Then click on Startto launch the app in the browser.
- You just click on the buttonand it will edittext field.
 
- You need to 
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.