I want to create a webpage that looks like this one:
This is done using a table. Each row describes an object and I want to be able to select multiple of those objects. When one of the submit-buttons is clicked, I want to get the list of selected objects. I know there is the class CheckBoxMultipleChoice, but the generated output is not what I need.
I think I should use a ListView, but since the number of objects is dynamic, I do not know how to access the states of the checkboxes. Could you please tell me how I can achieve this layout?
You should use a CheckGroup with one Check component in each row.
Related
I connected MySql database with Java app, I see data from two different columns (Items, Price) but I want to connect them somehow, for example, if choose in first combobox item "Desk" the other combobox should automatic find "Desk" price and display it in second combobox. Anyone have idea how to make that ?
You could write a changelistener for the first box, then have it go into another sql query which will populate the second box. Check out this guide, it'll explain to you how to do it
https://docs.oracle.com/javase/tutorial/uiswing/events/changelistener.html
First, I think that you don't want to ComboBoxes being correlated in such a way. There must be a better design for your gui.
Is your ComboBox from JFace? There are JFace Data Bindings. Normally, you use them to automatically update your model if someone changes values in the user interface. If your model contains an id from your database, both comboboxes can have a binding to this id.
I would like to know what I am doing wrong or if I am on the wrong track, trying something impossible.
In my jsp I have two s:select and some textfields. Considering the choice of the first one I have to go search some informations on my database. What I am trying to do is everytime I choose some option in my first combobox I call a method im my action, this method get the informations I need from my mysql and populate my list(this list is the options of the second combobox), but of course this is not working because I am not reloading my jsp, the problem is that I cannot reload because I don't want to lose the information I have in the textfields.
I appreciate any kind of help.
you'd better use Ajax to load the data for your first ComboBox or some other fields data (page without re-loading,thus)
I'm working on my first java program. I'm making a Project Manager program.
The base idea is that i have a JList which contains the names of the Co-workers. If you double click one of the names a JTabbedPane will pop up a new tab and will be populated a JTable what is containing the specific persons tasks.
And here comes the tricky part. I want to use this JTable to modify the datas so i need to give a specific name to the JTable so i can use that later on in my methods to call it.
The question is how can i create dynamic names to these tables so i can call it later (something like this: table+tabID).
OR
Is there a better solution to my problem?
Any help or advice is greatly appreciated.
I solved it. The solution was:
I made an ArrayList<JTables> to store the tables and I'm using the tab indexes to get the proper table.
I'm trying to convert a drop down box widget into a SuggestionBox because the current drop down menu has 100+ choices. It seems like you can only add String suggestions to a SuggestOracle though. I need to be able to add a custom object that contains both a description and an ID that matches the record to the database though. Would I have to extend the SuggestOracle class?
Yes as i know you can not use pair of values i.e Id and Value. You have to add your strings in suggestion box perhaps you can use different solution other then suggestion box i.e. Create a List of values popup. And add as many fields as you like. display your data in flex table with pagination. update your form with the selected row by using selecition handler. for reference how to use FlexTable and handle events please see able Single Row Click Event
SuggestOracle is the parent class of MultiWordSuggestOracle which you are already yousing.
public class MultiWordSuggestOracle extends SuggestOracle
see MultiWordSuggestOracle
I'm trying to convert a drop down box widget into a SuggestionBox because the current drop down menu has 100+ choices. It seems like you can only add String suggestions to a SuggestOracle though. I need to be able to add a custom object that contains both a description and an ID that matches the record to the database though. Would I have to extend the SuggestOracle class?
Yes as i know you can not use pair of values i.e Id and Value. You have to add your strings in suggestion box perhaps you can use different solution other then suggestion box i.e. Create a List of values popup. And add as many fields as you like. display your data in flex table with pagination. update your form with the selected row by using selecition handler. for reference how to use FlexTable and handle events please see able Single Row Click Event
SuggestOracle is the parent class of MultiWordSuggestOracle which you are already yousing.
public class MultiWordSuggestOracle extends SuggestOracle
see MultiWordSuggestOracle