Multiple Row Data Selection in Popup Table
In my Popup window there is a table control with ten rows.
All the rows are editable. After i enter velue in all the rows and click submit button , all the values needs
to be selected in main window.
But the problem is in main window only one input field is there. I can't increse the number to ten also.
So i need to show all the selected values in this one input field separated by comma.
Please suggest me how to do it.
I have done it for single row selection but stuck with multiple rows.
Thanks a lot.
Hi,
try this code:
I<Table>Node tableNode = wdContext.node<Table>();
I<Table>Element tableEl;
String input = "";
for (int i = 0; i < tableNode.size(); i++) {
tableEl = tableNode.get<Table>ElementAt(i);
if (tableEl.get<InputFieldAttribute>() != null)
input += tableEl.get<InputFieldAttribute>() + ",";
wdContext.current<MainWinInputFieldElement>().set<InputFieldAttribute>(input);
Regards,
Matteo
Edited by: Matteo Fusi on Apr 2, 2009 10:04 AM
Similar Messages
-
How to send multiple row data into an internal table??
I have a view with table control.i want to select multiple row and send all the row data into an internal table.i am able to select multiple row but all the selected row data is not going to the internal table.....only a particular row data which is lead selected is going.
Do anyone can help me regarding this issue?
Thanks in advance,
Subhasis.Hey,
Some code example:
declaring an internal table and work area to get all the elements from the node.
data : lt_Elements type WDR_CONTEXT_ELEMENT_SET,
ls_Element type WDR_CONTEXT_ELEMENT_SET,
considering flights is my node.
lt_data type sflight.
Node_Flights is the ref of the node to which ur table is binded.
Use Code Inspector to read the node.
lt_Element = Node_Flights->GET_ELEMENTS
loop at lt_elements into ls_Element.
l_bollean = ls_elements->is_selected ( returns abap true/false ).
if l_bollean IS INITIAL.
append ls_Element to lt_data.
endif.
Hope this would help.
Cheers,
Ashish -
How to get selected row data of an ADF table in HashMap?
Hi,
Can anyone please tell me how to selected row data of an ADF table in HashMap like :
Object obj = pageTable.getSelectedRowData();
JUCtrlHierNodeBinding rowData = (JUCtrlHierNodeBinding)obj;
Now in above code I want the convert rowData in HashMap.
Can anyone please tell me how to do that? Its urgent.
Thanks,
VikVik,
No need to ask the same question 3 times...
In [url http://forums.oracle.com/forums/message.jspa?messageID=4590586]this post, Nick showed you how to get the Row.
If it were so urgent, you could have done a little reading of the javadocs to come up with code like this (not tested, up to you to do that)
HashMap m = new HashMap();
Row r = get it like Nick showed you to;
Object values[]=r.getAttributeValues();
String names[]=r.getAttributeNames();
for (int i=0; i<r.getAttributeCount(); i++)
m.put(names, values[i]); -
How to retrieve the multiple rows data on PDF form in a web service method using WSDL DataConnection
How to retrieve the multiple rows data on PDF form in a web service method using WSDL DataConnection.
I have a multiple rows on PDF form. All rows have 4 textfields. I want to submit the multiple rows data to a method defiened in webservice.
Unable to retrieve the data in multiple rows within webservice method.Hi Paul,
I'm now able to save the retrieved xml in a hidden text field and create dynamic table, and I'm able to fill this table from the XML, but the problem is that I could not find the correct way to loop on the xml, what I'm trying to say, the table will have number of rows with the data of the first row only, so can you tell me the right way to loop on the xml!
this is my code
TextField1.rawValue=xmlData.document.rawValue;
xfa.datasets.data.loadXML(TextField1.rawValue, true, false);
for(var i=0; i<count; i++)
xfa.form.resolveNode("form1.P1.Table1.Row1["+i+"].Num").rawValue = xfa.datasets.data.record.num.value;
xfa.form.resolveNode("form1.P1.Table1.Row1["+i+"].Name").rawValue = xfa.datasets.data.record.name.value;
Table1.Row1.instanceManager.addInstance(true);
Thanks
Hussam -
Dear Friends,
Please provide the solution for the following scenario:
In the first view(xml) I have a table with the fields QuotationNo,plant name, material no...etc, where I am displaying the data fetched using Odata model. The table is enable with Single line selection mode. My requirement is to Carry the selected row data to another view(xml) and display there.
Please give your valuable inputs.Hi Rinku,
depending on how you do the navigation, you might find the information here: OpenUI5 SDK - Demo Kit helpful.
Regards Frank -
How to make first row as selected in af:table
Hi,
I am using JDeveloper 11.1.1.4 and ADF-BC in my application.
In all the pages across my application we have multi select enabled for the table[af:table].
But when the pages are displayed,the first row is not selected by default.
My requirement is to display first row as selected across all the tables in my app.
I have the selectionListenerset as for example selectionListener="#{bindings.RSCMapVO2.collectionModel.makeCurrent}" in all the pages.
Please suggest on how to make first row as selected.
Regards,
PraveenHi
Put these codes in your selection listner method(You have to define a selectionListner method in your backing bean and put this code segment
(Special thanks go to Franks how posted this code segment. threadID=1089583)
RichTable yourTable = (RichTable) selectionEvent.getSource();
//the Collection Model is the object that provides the structured data
//for the table to render
CollectionModel yourTableModel = (CollectionModel) yourTable.getValue();
//the ADF object that implements the CollectionModel is JUCtrlHierBinding. It
//is wrapped by the CollectionModel API
JUCtrlHierBinding yourTableBinding = (JUCtrlHierBinding) yourTableModel.getWrappedData();
//Acess the ADF iterator binding that is used with ADF table binding
DCIteratorBinding yourTableIteratorBinding = yourTableeBinding.getDCIteratorBinding();
//the role of this method is to synchronize the table component selection
//with the selection in the ADF model
Object _selectedRowData = yourTable.getSelectedRowData();
//cast to JUCtrlHierNodeBinding, which is the ADF object that represents
//a row
JUCtrlHierNodeBinding nodeBinding = (JUCtrlHierNodeBinding) selectedRowData;
//get the row key from the node binding and set it as the current row in the
//iterator
Key rwKey = nodeBinding.getRowKey();
tableIteratorBinding.setCurrentRowWithKey(rwKey.toStringFormat(true));
Thanks
Padma -
Depicting multiple rows' data in one row
Hi All,
Pls. check the below query:
select manager_id mg_id, employee_id emp_id, last_name name from employees
where manager_id = '100'
and DEPARTMENT_ID = '80'if i run the following query, then o/p comes row wise; like below:
mg_id emp_id name
100 145 Russell
100 146 Partners
100 147 Errazuriz
100 148 Cambrault
100 149 Zlotkeybut if i want the o/p like below; i.e; under manager # 100, all employees' emp_id and name should come in only ONE row NOT in multiple rows:
mg_id emp_id name emp_id name emp_id name emp_id name emp_id name
100 145 Russell 146 Partners 147 Errazuriz 148 Cambrault 149 Zlotkeypls. help me to sort out the above sought o/p.
kindly tell me if there is any posting guidelines (except "Plain Text Help" on the right side) in this forum. i tried a lot to post above two o/p in easily readable format, but couldn't do that.
Edited by: Shariful on Sep 20, 2009 4:28 AM
Edited by: Shariful on Sep 20, 2009 4:29 AMHi,
Shariful wrote:
Hi All,
Pls. check the below query:
select manager_id mg_id, employee_id emp_id, last_name name from employees
where manager_id = '100'
and DEPARTMENT_ID = '80'
if i run the following query, then o/p comes row wise; like below:
mg_id emp_id name
100 145 Russell
100 146 Partners
100 147 Errazuriz
100 148 Cambrault
100 149 Zlotkey
but if i want the o/p like below; i.e; under manager # 100, all employees' emp_id and name should come in only ONE row NOT in multiple rows:
mg_id emp_id name emp_id name emp_id name emp_id name emp_id name
100 145 Russell 146 Partners 147 Errazuriz 148 Cambrault 149 ZlotkeyIf you want all the emp_ids and names concatenated into one big VARCHAR2 column, that's called String Aggregation
[AskTom.oracle.com|http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:2196162600402] shows several different ways to do it.
You can format that one big column so that it looks like separate columns.
If you want each emp_id and name in its own column, that's called Pivoting .
Look up "pivot" for various techniques. If you do not know exactly how many rows were in the original query (and therefore how many columns you'll need in the output), then it will require Dynamic SQL , which can be complicated.
Unfortunately, when you do search for "pivot", mlost of the hits will be things like "Search for pivot and you'll get lots of examples".
Re: Help for a query to add columns is one that actually has some information. It was a question very much like yours.
kindly tell me if there is any posting guidelines (except "Plain Text Help" on the right side) in this forum. i tried a lot to post above two o/p and query in easily readable format, but couldn't do that.Type these 6 characters:
(small letters only, inside curly brackets) before and after formatted text, to preserve spacing. -
Individual Checkboxes save in multiple rows in an oracle Database table
I'm using C# .NET and an oracle db table tab1
create table tab1(col1 number primary key);
insert into tab1 values (1);
commit;
In Web forms tab use CheckBox to create three individual CheckBoxes (don't use CheckBoxList):
<asp:CheckBox id="CheckBox1" style="Z-INDEX: 101; LEFT: 40px; POSITION: absolute; TOP: 24px" runat="server"
Text="aaa"></asp:CheckBox>
<asp:CheckBox id="CheckBox2" style="Z-INDEX: 102; LEFT: 40px; POSITION: absolute; TOP: 56px" runat="server"
Text="bbb"></asp:CheckBox>
<asp:CheckBox id="CheckBox3" style="Z-INDEX: 104; LEFT: 40px; POSITION: absolute; TOP: 88px" runat="server"
Text="ccc"></asp:CheckBox>
And one Button and a Label:
<asp:Button id="Button1" style="Z-INDEX: 103; LEFT: 40px; POSITION: absolute; TOP: 128px" runat="server"
Text="Button"></asp:Button>
<asp:Label id="Label1" style="Z-INDEX: 105; LEFT: 328px; POSITION: absolute; TOP: 56px" runat="server"></asp:Label><INPUT style="Z-INDEX: 106; LEFT: 24px; POSITION: absolute; TOP: 184px" type="text" id="Text1" name="Text1" runat="server">
Using
oracleDataAdapter1.Fill(dataSet11);
oracleDataAdapter1.Update(dataSet11);
When a user selects a checkbox and presses Button1
a new row is created in the table TAB1 under COL1
and when the user reopens the web app the selected checkbox is still displayed because of the number value stored under COL1.
Can anyone help me on how to save the selected checkbox into COL1 so that when user closes and opens the web app the same selected checkbox is displayed.
I also am wondering if the user unchecks a checkbox and selects a different checkbox, submits the new change
to the COL1
Is there a way to delete the old rows of TAB1 prior to inserting the new row of the new selected checkbox?
any suggestions would be appreciated.
Thanks.
bebopI tried looking for a forum to post this Individual Checkboxes question.
Which forum should I go to for this?
Any suggestions?
bebop -
Multiple language data in the same table and indexes
We have 8.1.5 database with
NLS_LANGUAGE=ENGLISH and NLS_TERRITORY=UNITED KINGDOM set at the database level. We also set the NLS_LANG appropriately when we index the data. We also use the preference setting BASE_LETTER=YES when indexing.
Our tables contain book titles which is what we index using interMedia. Being an online book store, this table may contain titles in English (most of the titles are in English being UK) and some titles in French. Please note the French language has accents and diacritics. Normally in a French database with NLS parameters set correctly and BASE_LETTER=YES, if we search for a title with accent / diacritic it will return the record correctly and match the rows with or without the accents (e.g. searching for video will return both vidio (not the accent on e) and video). However, with the UK settings the accents are not ignored during indexing and it only returns the records that exactly match the search word (e.g. searching for video returns only video and searching for vidio returns only vidio (note the accents on e in the last two videos)).
Question: Is there any way to appropriately index multiple language specific titles in the same database? If yes, how? Is it possible at all? Suggestions, ideas are welcome.
nullSimilar request; if there are several different languages used in a database, but a search word can be typed in by anyone and not necessarily in the default language, I still want to be able to pick up all the records (including text in blobs) in any language where my search word = the equivelant word in the other languages; eg. searching on "tree", the search would bring back a document that contained "l'arbre". I then want to set the default language, and allow the user to select a "search in these languages" option to expand the search from the default "tree" to all languages in the database.
I know about the multi_Lexer but does it extend functionality to this level? -
How to get multiple row data in single row for one value of foreign key
i want to get data from a table in a way that all the emp_id corresponding to one manager_id
in employee table come in one row. (emp_id is the primary key and manager_id is the foreign key) Since there are different emp_id whose manager_id is same
so how can i get all the emp_id in one row .One way with 10g:
select mgr,
rtrim(xmlagg(xmlelement(empno,empno||',').extract('//text()')),',') emps
from emp
where mgr is not null
group by mgr;10g:
-- define this function:
create or replace
function concatenate(c Sys_refcursor, sep varchar2 default null) return varchar2
as
val varchar2(100);
return_value varchar2(4000);
begin
-- open c;
loop
fetch c into val;
exit when c%notfound;
if return_value is null then
return_value:=val;
else
return_value:=return_value||sep||val;
end if;
end loop;
return return_value;
end;
select mgr,
concatenate(cursor(select empno from emp e where e.mgr=emp.mgr order by empno),',')
from emp
where mgr is not null
group by mgr;With 11g:
select mgr,
listagg(empno,',') within group (order by empno) emps
from emp
where mgr is not null
group by mgr; -
Multiple row data converted to columns
I've seen various solutions to this, but I have one caveat: how to do it in oracle 8i and make it dynamic for a variable number of rows to columns?
Here is an example:
TABLE layout (unit_id and hour-ending are the PKs)
hour_ending DATE
unit_id NUMBER
net_gen NUMBER
total_unit_id NUMBERHere's a sample of data if you selected it:
UNIT_ID HOUR_ENDING NET_GEN
5297 11/1/2005 1:00:00 AM 581
5298 11/1/2005 1:00:00 AM 318
5299 11/1/2005 1:00:00 AM 91
5300 11/1/2005 1:00:00 AM 59
5301 11/1/2005 1:00:00 AM 68
5302 11/1/2005 1:00:00 AM 45
5297 11/1/2005 2:00:00 AM 625
5298 11/1/2005 2:00:00 AM 341
5299 11/1/2005 2:00:00 AM 97
5300 11/1/2005 2:00:00 AM 64
5301 11/1/2005 2:00:00 AM 74
5302 11/1/2005 2:00:00 AM 49 Without having to "hard code" the ids and such, what I want to do is create an SQL query that will be dynamic to create a result set as follows:
HOUR_ENDING UNIT_ID1 NET_GEN1 UNIT_ID2 NET_GEN2 UNIT_ID3 NET_GEN3 UNIT_ID4 NET_GEN4 UNIT_ID5 NET_GEN5 UNIT_ID6 NET_GEN6
11/1/2005 1:00:00 AM 5297 581 5298 318 5299 91 5300 59 5301 68 5302 45
11/1/2005 2:00:00 AM 5297 625 5298 341 5299 97 5300 64 5301 74 5302 49etc
We have a way of getting a "list" of the units related to each other. I just need a starting point of how to format the result set based on a variable number of units that might be grouped into a row.
Thanks!Thanks for the info. I guess I now have a question on how do I make this work with passing the results back to .NET? The solution in that article creates an incompatible column type for ODP.NET v9.2.0.7
The only solution I've been able to come up with is to create a collection type in the database. The problem with that is, it is a finite number of columns. I suppose I could make it big enough to hold some huge number of columns and only use what I want to, but that makes me cringe.
I guess I'm trying to do something that is probably not possible without a lot of effor and headaches. The reason it's this way is because we have a client that wants us to display the data that way on a form, even though that is NOT how the data is layed out in the database.
If anyone else has any suggestions, I would appreciate it. I'm about ready to go back to the cleitn and state that what they really have here is a parent/child relationship and that it would better to display it that way, even though it means they won't see 24 hours worth of data on the screen all at once without filling up the browser window.
Thanks! -
Generating multiple rows through select result
Hi,
I have the requirement to generate rows based on the return of my select.
This is the source of my table mytab
COL1 CO2
ROWS 5
f01 ^[a-zA-Z0-9ÖÄÜüöäß%_ .,:;!?&[:space:]\(\)-]+$
f02 ^[0-9]{1,}$Now I need this output.
ITEM REGEXPR
f01_0001 ^[a-zA-Z0-9ÖÄÜüöäß%_ .,:;!?&[:space:]\(\)-]+$
f01_0002 ^[a-zA-Z0-9ÖÄÜüöäß%_ .,:;!?&[:space:]\(\)-]+$
f01_0003 ^[a-zA-Z0-9ÖÄÜüöäß%_ .,:;!?&[:space:]\(\)-]+$
f01_0004 ^[a-zA-Z0-9ÖÄÜüöäß%_ .,:;!?&[:space:]\(\)-]+$
f01_0005 ^[a-zA-Z0-9ÖÄÜüöäß%_ .,:;!?&[:space:]\(\)-]+$
f02_0001 ^[0-9]{1,}$
f02_0002 ^[0-9]{1,}$
f02_0003 ^[0-9]{1,}$
f02_0004 ^[0-9]{1,}$
f02_0005 ^[0-9]{1,}$The value of Rows in my example "5" can be dynamically (could be 50 as well).
The rows for f01 and f02 could also be 10
So the source of my table could also look like this:
COL1 CO2
ROWS 50
f01 ^[a-zA-Z0-9ÖÄÜüöäß%_ .,:;!?&[:space:]\(\)-]+$
f02 ^[0-9]{1,}$
f03 ^[0-9]{1,}$
f04 ^[0-9]{1,}$
f05 ^[0-9]{1,}$
f06 ^[0-9]{1,}$
f07 ^[0-9]{1,}$
f08 ^[a-z]{1,}$
f09 ^[a-z]{1,}$
f10 ^[a-z]{1,}$Hope for help.
Best regards,
TobiasHi,
The usual way to do that is to join your table to a Counter Table , a table (or, as in the example below, a sub-query result set) that counts 1, 2, 3, ... as high as you need to go.
WITH cntr AS
SELECT LEVEL AS n
FROM dual
CONNECT BY LEVEL <= 50 -- max value needed (or higher)
SELECT m.col1 || '_'
|| TO_CHAR (c.n, 'FM0000') AS item
, m.col2 AS regexpr
FROM mytab m
JOIN cntr c ON c.n <= 5 -- or some expression from m
ORDER BY item
I hope this answers your question.
If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all the tables involved, and the results you want from that data.
Explain, using specific examples, how you get those results from that data.
Always say what version of Oracle you're using.
See the forum FAQ {message:id=9360002}
Edited by: Frank Kulash on Jul 5, 2012 7:32 AM -
Multiple row data in a single row
I have a table like the following:
AGREEMENT_ID SERVICE_CODE SERIAL_NO
22 CV CE095F0011007884F
22 HS 2509b000121373869
22 NG 2509B000121265554
22 SG 2509B00012120278D
22 SM PAFABM0716140704
22 SN G32X2MI808300348
22 SP CE095F00110045416
22 SV 2509B000121363230
22 SW CE095F00110037377
I would like to have it in the following format
Agreement_id CV HS NG SG SM SN SP SV SW --(These are the columns)
22 CE095F0011007884F 2509b000121373869 2509B000121265554 ....
(This is data)
Need to do it in a single Query....
Want an advice
Regards
Chaitanya.S.S.KHi,
SQL> l
1 with tbl as
2 (select 22 id, 'CV' service, 'CE095F0011007884F' serial from dual
3 union all
4 select 22, 'HS','2509b000121373869' serial from dual
5 union all
6 select 22, 'NG','2509B000121265554' serial from dual
7 union all
8 select 22, 'SG','2509B00012120278D' serial from dual
9 union all
10 select 22, 'SM','PAFABM0716140704' serial from dual
11 union all
12 select 22, 'SN','G32X2MI808300348' serial from dual
13 union all
14 select 22, 'SP','CE095F00110045416' serial from dual
15 union all
16 select 22, 'SV','2509B000121363230' serial from dual
17 union all
18 select 22, 'SW','CE095F00110037377' serial from dual
19 union all
20 select 23, 'SW','CE095F00110037377' serial from dual)
21 select id,
22 max(decode(service,'CV',serial)) "CV",
23 max(decode(service,'HS',serial)) "HS",
24 max(decode(service,'NG',serial)) "NG",
25 max(decode(service,'SG',serial)) "SG",
26 max(decode(service,'SM',serial)) "SM",
27 max(decode(service,'SN',serial)) "SN",
28 max(decode(service,'SP',serial)) "SP",
29 max(decode(service,'SV',serial)) "SV",
30 max(decode(service,'SW',serial)) "SW"
31 from tbl
32* group by id
SQL> /
ID CV HS NG SG SM SN SP SV SW
22 CE095F0011007884F 2509b000121373869 2509B000121265554 2509B00012120278D PAFABM0716140704 G32X2MI808300348 CE095F00110045416 2509B000121363230 CE095F00110037377
23 CE095F00110037377
SQL> HTH,
Nicolas. -
Sort the Data Selection in TVARV Table
hello...i wanted to run a SAP Standard Program and it is have a variant selection for me to select the variable from TVARV table. When this program run, I would like to have a selection of choosing the latest date to run the program based on the variant I save. I created a variables in the TVARV table but I cannot see any selection which can sort the selection based on the latest date. I can only choose to be EQ and etc. Is there any selection that I can make so that the program always choose to be run based on the latest date? thanksss alot!!!
Look at table VARID.
Rob -
How to make a new row as selected in adf table
Hi,
I am adding a new row to my table as below.
DCBindingContainer bindingContainer =
(DCBindingContainer)ADFUtil.evaluateEL("#{bindings}");
DCIteratorBinding iter = bindingContainer.findIteratorBinding("IfwSystemBrandView1Iterator");
ViewObject vo = iter.getViewObject();
row = vo.createRow();
row.setNewRowState(Row.STATUS_INITIALIZED);
vo.insertRow(row);
This code is adding a new row at the end of the table.
I want this new row to be selected after it gets added.
How to achieve this??
Thanks,
PraveenYou should mention your JDev version!!!!
in 11g you can archive this like
BindingContext bctx = BindingContext.getCurrentInstance();
BindingContainer bindings = bctx.getCurrentBindingEntry()
DCIteratorBinding dcIterator =
(DCIteratorBinding) bindings.get("IteratorBindingName");
Row rw = dcIteratorBinding.getRowSetIterator().createRow();
rw.setNewRowState(Row.STATUS_INITIALIZED);
//insert row to iterator
dcIteratorBinding.getRowSetIterator().insertRow(rw);
//make new row the current
dcIteratorBinding.setCurrentRowWithKey(
rw.getKey().toStringFormat(true));or better if you have access to the table (
private void createRowInTable(RichTable table){
CollectionModel model = (CollectionModel ) table.getValue();
JUCtrlHierBinding _binding = (JUCtrlHierBinding) model.getWrappedData();
DCIteratorBinding dcIteratorBinding= _binding.getDCIteratorBinding();
Row rw = dcIteratorBinding.getRowSetIterator().createRow();
rw.setNewRowState(Row.STATUS_INITIALIZED);
//insert row to iterator
dcIteratorBinding.getRowSetIterator().insertRow(rw);
//make new row the current
Key k = rw.getKey();
dcIteratorBinding.setCurrentRowWithKey(k.toStringFormat(true));
}Timo
Maybe you are looking for
-
Is there a way to control the number of consumed messages from JMS?
Hi everyone, I have a BPEL process that is consumes messages from a foreign queue, performs a transformation, and passes it to Oracle Apps. I'm curious if there is a way to control the number of messages consumed at a time for processing. For example
-
Housebank and payment method for vendor
Hi While doing MIRO, i want housebank and payment method to populate from vendor master data. I maintained both these details in VM data but its not populating automatically in MIRO. Please help. (m using ECC 6) Sadhana
-
Macbook Airport router problem
Over the last month, my MacBook refused to connect to my network under WPA/WPA2 encryption. After the recent security update, my computer connects fine, but has a tendency to cause the router to crash. Under WPA/WPA2, just browsing the web can crash
-
Normalization Gain vs. Manual Gain
In Final Cut 6 I've applied a gain of +12db to a clip and no audio peaks are found; but when I apply "normalization gain" to 0db (default) it only applies a gain of +7.38. If +12db produces no audio peaks, shouldn't "normalization" set it's gain at l
-
Hi All, Please suggest how i can acheive to determine my contact person in my transactions. my requirement is if a contact person is been maintained for a BP then it should pop up the respective contact person. If no contact person is maintained then