original idea/google thread: https://groups.google.com/forum/#!topic/idempiere/m_2u9aGA370
Overview - We suggest to follow the next strategy:
extend t_selection by universal columns e.g. col1, col2, colN (e.g. 10) where we will be stored other columns of selected rows from info window. Maybe columns with isIdentifier='Y' could be stored in t_selection (what is a goal of field Identifier in info window field?). Then we can create database view where will be one column with Table ID and use this column in info window and process.
Next extensions could be storing Info Window table ID in variable m_Table_ID and new variable m_InfoWindow_ID in ProcessInfo class.
Also it will be good if you can provide (via 2pack) a test case definition of the info window using this approach.
I will update patch soon.
your new info window is good testcase. you can help me?
for backward compatibility. i just restore old function createT_Selection
for testcase, please wait me review
IDEMPIERE-1970-add-old-func.patch is full patch. not need other file
i attachment a case use 1970.
zip file include:
IDEMPIERE-1970-just-for-test.patch contain a process display row select by user
2Pack1970.zip 2Pack for create view, info window
after pack-in, we have a view v_test_1970
this view has data from c_order and m_rma
view_id is column as key of this view. data of column is "table name" + "key value"
example, record from c_order have view_id = 'c_order' || c_order_ID
we have a info window, info window have a process button.
call process from IDEMPIERE-1970-just-for-test.patch
in process info have new column call viewID column.
set value is "view_id" (key of view v_test_1970)
to test. open info window from menu (name menu is "test 1970")
select some item, one from m_rma other from order
click process button. value from view_id is save to t_selection
process in IDEMPIERE-1970-just-for-test query selected item and display it to user.
in real case develop will do more thing with selected record.
Reopen for improve.
[19:57] <CarlosRuiz> hieplq: the new viewID column is related to AD_Column of the table defined on the header
[19:58] <CarlosRuiz> and in the workshop we found it would be more useful if we relate it directly to an AD_InfoColumn from the same info window
[19:58] <CarlosRuiz> so, you don't need a view for your use case, you can use a non-displayed info column