How to Add Jtable Into JCombobox - jcombobox

experts I want to add Jtable into Jcombobox gettnig results in Mysql table with tow column
and if user selected a combotable item,the selectet item will show in Jtextfield

#Thamindu,
Please make sure you ask the question clearly. Seems you don't care about what you write. (for eg. tow, combotable)
Why do you need to add a jtable in to a jcombo box. It's a quite rare thing to hear someone trying to do.

Related

Posting new field to CustTrans

I created a new field in LedgerJournalTrans(General Ledger > General Journals menu), but click on Post but was unable to get my new field value in the CustTrans, is there any method i need to update to post my new field value to the CustTrans?.
Your question is not clear, but I think I can guess what you're trying to do? You've added a field to the table LedgerJournalTrans and when you post, you're expecting that data to carry over to the CustTrans table? You should work on asking clearer questions, but if my interpretation is correct, then you need to add code so that the posting process does something with that field.
Likely you'll need to modify \Classes\LedgerJournalTransUpdateCust, specifically you'll want to look at methods postNewCustomerVoucher and updateNow.
Find where \Data Dictionary\Tables\LedgerJournalTrans\Fields\CustTransId gets set, as that's the relation between the two tables, and try to write code that follows that Microsoft is doing.

How not to delete a row if it has children

I have a One to Many relation : One row in modelParent with Many row in modelChild
In a PanelList with the all modelParent rows, I want to hide the delete Icone on the row if the row has children link to this row.
What test should I do ?
Right way
Don't hide the delete button, but show confirmation dialog that would tell user how many related records would be deleted with the selected record. You can find code samples in Project Tracker, People Skills and lots of other templates.
Easy to implement way (worse performance)
Configure prefetch for your ParentModel's datasource to include records from ChildModel
Bind delete button's visibe property to this:
#datasource.item.<NameOfYourRelationField>.length === 0
Harder to implement way (better performance)
You can create calculated model with special flag that you can use on UI to show/hide the delete button. This approach will also require lots of extra scripting for CRUD operations.

Where to find data in database of sxc

I created an app with the sxc module.
Now I have like 500 empty rows which I want to delete.
I searched for them in the database to delete them all but I cannot seem to find them and I think it is a waste of time to delete them all 1 by 1.
It's data in "Manage content / data" table.
Let me know please.
I have another question:
If I edit an item. The title of the module gets changed with the first items 'name' field. How to avoid that? Is it an bug?
Thanks in advance.
Basically JKings answer is correct - this kind of bulk-operation can easily be done using export/import, because on re-import you can tell 2sxc to delete all items not found in the import. This ensures that 2sxc can take care of data integrity etc. Instructions https://2sxc.org/en/Learn/Content-Export-and-Import
So the correct steps are:
export the list
open in notepad, xml editor (or use excel, as shown in the link)
Remove all those you don't want
Re-import, but choose the option to "Remove all entities not found in import"
You're set :)

PLSQL Procedure to change data across a full database

I've been asked to write a PLSQL procedure to 'clean up' codes in a database. The codes are varchar2 and are something like 00000001. They are used everywhere in the application. My new employer wants me to make the codes more readable as in turn the 00000001 into just 1 for everywhere they are used.
My question is how would one even go about that? I asked for clarification and it's still not clear and for fear of looking foolish I won't ask again. Any guidance would be welcome
let me start by saying that that sounds like a VERY BAD IDEA!!!!
if you persist it sound like you will need to use dynamic sql with the basic process of...
query all_tab_cols to get a list of columns( im hoping all your columns that use these codes have a naming standard.. ie xxx_CD )
loop over tab/cols to see if your value is there
update values in that table
...
profit ?
however then you get stuck by realities.. if the code is in a foreign key you cant just update it. you'd have to create a new parent record.. update all children to new parent then delete old parent.
you'd need to be very clear on what you are trying to achieve.. and more importantly, is there any value in it?
i suggest you start with a single codevalue to scope out the size of project.
manually start writing the updates you'd need for that 1 codevalue and then try to start automating it.

Table input for view

I would like to have the user enter order items on my order form as a table where they input the Qty and Prod #. I've not programmed with that type of field so a blank line would initially display for a new order. They would type a Qty and an item number in the fields and hit enter. When they hit enter from either field, what do I program to check the validity of the two fields. Plus I need the item number to be a drop down/type ahead field. Does anyone have an example of this type of thing they could send me? It would be looking at a view in the product catalog db. Also, after they enter an item to order, that "doc" should get stored/saved and a new blank line should open up.
What type of control do I need to use and should these items be stored in their own form or on the main order document? Could use some guidance here. Thanks.
The question you have is a little broad but I will make a couple suggestions if I can.
You have the main order doc. Then a repeat control with each item. Filter each item by a uniqueID that allows you to join the main doc to the child docs. Each item should be a separate document. You then need to make the items in the repeat control editable.
There is a lot of things going on here and I think you need to get started somewhere. I think the first step is to do a repeat control with response documents.Xpages, Inherited documents in view panel by using #Unique

Resources