A data table in one column of a dynamic data table
Hi , I have to design a dynamic data table(with dynamic columns and data) which looks as the following
DETAILS NAME ROLE NUMBER CLASS SECTION
15 MATHS SURESH 15 10 A
20 SCIENCE
25 ENGLISH
15 MATHS SURESH 15 10 A
20 SCIENCE
25 ENGLISH
The data in the column 'DETAILS' should have inner table. The data in this inner table should have hyper links. If there is no inner table infor mation there shold be an image with hyperlink. This data table should also have pagination and sorting features. Please send me some example code for this. Please help me out as i have client demo on monday
You may find this example useful: [http://balusc.blogspot.com/2006/06/using-datatables.html#NestingDatatables].
To toggle between a nested datatable and a hyperlink with image just use the rendered attribute. E.g.
<h:column>
<h:dataTable rendered="#{!empty dataItem.innerList}">
</h:dataTable>
<h:commandLink rendered="#{empty dataItem.innerList}">
</h:commandLink>
</h:column>
...
Similar Messages
-
Convert a table with one column to panelList with outputText
Hi,
I have a table with one column, I would like to change it to use panelList to present it instead. What will be the syntax for panelList?
<af:table value="#{bindings.ItasUiRuleParamsVO2.collectionModel}"
var="row"
rows="#{bindings.ItasUiRuleParamsVO2.rangeSize}"
emptyText="#{bindings.ItasUiRuleParamsVO2.viewable ? 'No data to display.' : 'Access Denied.'}"
fetchSize="#{bindings.ItasUiRuleParamsVO2.rangeSize}"
rowBandingInterval="0"
selectedRowKeys="#{bindings.ItasUiRuleParamsVO2.collectionModel.selectedRow}"
selectionListener="#{bindings.ItasUiRuleParamsVO2.collectionModel.makeCurrent}"
rowSelection="single" id="t2"
partialTriggers="::t1">
<af:column sortProperty="RuleName" sortable="true"
headerText="#{bindings.ItasUiRuleParamsVO2.hints.RuleName.label}"
id="c11">
<af:outputText value="#{row.RuleName}"
id="ot11"/>
</af:column>
</af:table>
I tried this:
<af:panelList id="pl1">
<af:forEach items="#{bindings.ItasUiRuleParamsVO2.collectionModel}">
<af:outputText value="#{item.RuleName}" id="ot14"/>
</af:forEach>
</af:panelList>
but the error say:
javax.servlet.jsp.JspException: "items" must point to a List or array
at org.apache.myfaces.trinidadinternal.taglib.ForEachTag.doStartTag(ForEachTag.java:136)
Any ideas?
Thanks
-Mina<af:forEach items="#{bindings.ItasUiRuleParamsVO2.collectionModel}" var="row">
<af:outputText value="#{row.RuleName}" />
</af:forEach>
and make sure the table binding is still in place in your pagedef (or binding tab) -
When I import a text file(comma separated) into a numbers spreadsheet all the data goes into one column instead of individual columns based on the comma separators. Excel allows you to do this during the import.. Is there a way to accomplish this in numbers without opening it in Excel and the importing into Numbers.
Your user info says iPad. This is the OS X Numbers forum. Assuming you are using OS X… Be sure the file is named with a .csv suffix.
(I don't have an iPad, so I don't know the iOS answer.) -
Please help me one column i have this data col1
Please help me
one column i have this data
col1
Hi this is <SPAN style="FONT-SIZE: 18pt" data-mce-style="font-size: 18pt;">Rabindra.<SPAN style="FONT-SIZE: 10pt" data-mce-style="font-size: 10pt;">R u <SPAN style="FONT-SIZE: 18pt" data-mce-style="font-size: 18pt;">remember</SPAN> me .</SPAN></SPAN
dfg sdfgfdsg sfdgsdf gsfdgsdfsd <SPAN style="FONT-SIZE: 18pt" data-mce-style="font-size: 18pt;"><STRONG>Rabindra</STRONG></SPAN
i need like
col1
Hi this is Rabindra.R u remember me.
dfg sdfgfdsg sfdgsdf gsfdgsdfsd RabindraHi,
If str is a string, and you want a version of it without any of the tags (that is, without the '<' or '>' characters, or anything between them), then you can use REGEXP_REPLACE, like this:
REGEXP_REPLACE ( str
, '<[^>]+>' -
Fact table have tow column reference the same dim table
In my analytic domain, my fact table have tow column reference the same dim table, but in physical diagram, between two table ,can only have one join, so i create a copy of the dim table, then finish the join in physical. This method can resolve this question, but not so good, Anyone have perfect solution?
user4497169 wrote:
Thanks,
yours method is very very good, I don't know this method before. Where do you get this imfomation?The sample sales RPD has (good) modelling references you can refer to, otherwise think about how you'd write the SQL Statement yourself, you'd need to use an alias to access the same table on seperate joins. -
How to Organize the columns in the dynamic internal table?
Hello Folks!
How to Organize the columns in the dynamic internal table? i tried passing the parameter COL_POS to the fieldcatalog, Which is not working.Organize in What order ? What is your way to output ?
If you use ALV, you need to create fresh FIELD CATALOG for your dynamic table and then assign the column position.
Regards,
Diwakar -
How to split the data based on one column
Dear All,
I have the table data like this.
type quantity revenue_mny count country
a 10 10 2 India
a 20 12 3 India
b 30 15 1 India
a 35 20 2 US
b 20 10 1 US
b 60 15 1 US
I woulkd like to split the date based on type column.
For each country, for Type "a" get the sum of revenue count quanity ans same for b
and all shuld come in on row for each country.
output should be like
country revenue_mny(For a) quantity(for a) count(For a) revenue_mny(for b) quantity(for b) count(For b)
India 22 30 5 15 30 1
US 20 35 2 25 80 2
I tried the below query . its not splittng the date for each country in one row.
select country,
sum(case when type='a') then revenue_mny else 0 end ) revenue_mny_a,
sum(case when type='b' then revenue_mny else 0 end ) revenue_mny_b
sum(case when type='a' then quantity else 0 end) quantity_a,
sum(case when type='b' then quantity else 0 end) quantity_b from
test
group by country
Please need your heloLike this?
with t as
select 'a' type, 10 quantity, 10 revenue_mny, 2 cnt, 'India' country from dual union all
select 'a', 20, 12, 3, 'India' from dual union all
select 'b', 30, 15, 1, 'India' from dual union all
select 'a', 35, 20, 2, 'US' from dual union all
select 'b', 20, 10, 1, 'US' from dual union all
select 'b', 60, 15, 1, 'US' from dual
select country,
sum(case when type='a' then revenue_mny else 0 end ) revenue_mny_a,
sum(case when type='a' then quantity else 0 end) quantity_a,
sum(case when type='a' then cnt else 0 end) cnt_a,
sum(case when type='b' then revenue_mny else 0 end ) revenue_mny_b,
sum(case when type='b' then quantity else 0 end) quantity_b ,
sum(case when type='b' then cnt else 0 end) cnt_b
from t
group by country;result:
COUNTRY REVENUE_MNY_A QUANTITY_A CNT_A REVENUE_MNY_B QUANTITY_B CNT_B
India 22 30 5 15 30 1
US 20 35 2 25 80 2Or you can do it with a decode instead of case. The result will be the same:
with t as
select 'a' type, 10 quantity, 10 revenue_mny, 2 cnt, 'India' country from dual union all
select 'a', 20, 12, 3, 'India' from dual union all
select 'b', 30, 15, 1, 'India' from dual union all
select 'a', 35, 20, 2, 'US' from dual union all
select 'b', 20, 10, 1, 'US' from dual union all
select 'b', 60, 15, 1, 'US' from dual
select country,
sum(decode(type,'a',revenue_mny,0)) revenue_mny_a,
sum(decode(type,'a',quantity,0)) quantity_a,
sum(decode(type,'a',cnt,0)) cnt_a,
sum(decode(type,'b',revenue_mny,0)) revenue_mny_b,
sum(decode(type,'b',quantity,0)) quantity_b,
sum(decode(type,'b',cnt,0)) cnt_b
from t
group by country;(I changed tablename from TEST to T and columnname from COUNT to CNT, because you should not use reserved words as tablename or columnname.)
Edited by: hm on 09.10.2012 06:17 -
Concate 3 column data in to one column.
I would like to concate 3 columns in to one column. all three column has datatype as LONG. Is any one knows how to concate long datatype column into one column?
Thanks in Advance812294 wrote:
Is there any way to not use CLOB datatype? I am fetching data from three different tables.And what fetching from three different tables has to do with CLOB?
SQL> set serveroutput on
SQL> declare
2 concat_result clob;
3 tmp long;
4 begin
5 select text
6 into tmp
7 from dba_views
8 where rownum = 1;
9 concat_result := tmp;
10 select data_default
11 into tmp
12 from dba_tab_columns
13 where data_default is not null
14 and rownum = 1;
15 concat_result := concat_result || tmp;
16 select search_condition
17 into tmp
18 from dba_constraints
19 where search_condition is not null
20 and rownum = 1;
21 concat_result := concat_result || tmp;
22 dbms_output.put_line(concat_result);
23 end;
24 /
select
"LIB_IDX","LIB_NAME","VENDOR_NAME","PROTOCOL_NUM","VERSION_NUM","PATH_NAME","MAP
_FILE","FILE_CFGID","MAP_ELEM","ELEM_CFGID","MAP_SYNC" from v$map_library0 OBJ#
IS NOT NULL
PL/SQL procedure successfully completed.
SQL> SY. -
Labview Excel Search data in one column and send back data from the second!
Hello,
I am still very new with using LABVIEW and I have a issue. I am using an excel worksheet with two columns and four rows. In one column I have barcode numbers and in the second I have which sequence tests that the particular barcode has with it. I have it where I get the barcode scanned but what I need help with is having Labview search the excel sheet for a match on the Barcode (From column one) and return back the related test sequence that goes with it ( From Column two). Any suggestions???
JoeSorry!
Attachments:
Excel String Search.vi 50 KB
Barcode.xlsx 10 KB -
Add column in the dynamic internal table
Hi Experts,
I have a dynamic internal table. I need add new column in the internal table and I don´t Know.
My code:
DATA: it_generic TYPE REF TO Data,
wa_generic TYPE REF TO data.
FIELD-SYMBOLS: <table> TYPE ANY TABLE,
<wa> TYPE ANY,
<field> TYPE ANY.
CREATE DATA it_generic TYPE STANDARD TABLE OF (wa_datoscarga-ZTBLCAR).
CREATE DATA wa_generic TYPE (wa_datoscarga-ZTBLCAR).
ASSIGN it_generic->* TO <table>.
CHECK <table> IS ASSIGNED.
ASSIGN wa_generic->* TO <wa>.
CHECK <wa> IS ASSIGNED.
SELECT *
INTO CORRESPONDING FIELDS OF TABLE <table>
FROM (wa_datoscarga-ZTBLCAR)
WHERE bukrs EQ p_bukrs AND
z_petic EQ z_peticion AND
ZIDFASE eq 'E'.
After this I need add one column selection at the first position of the columns.
ThanksHi,
Please refer to the below link for the code snippet on how to create a dynamic internal table -
[Create a dynamic internal table.|http://www.divulgesap.com/blog.php?p=MjE=]
Cheers,
Ravi -
How to update column values in a table where that column is referring to different tables
i have a table Order it has columns
OrderID, Name, Total
1 trade value populated from i.e. tradeorder table
2 fixed value is populated from fixedorder table
3 annual value populated from another table
I m thinking of creating function for every order id to call those tables..
and there are many insertions taking place in order table ,,at the moment its 20 rows ..
kindly provide your suggestionsYou can group rows in order table and update the set of row from the specific table. For instance
UPDATE [ORDER] SET [TOTAL]=B.[TOTAL] FROM [ORDER] A INNER JOIN [TRADEORDER] B ON A.ORDERID=B.ORDERID WHERE A.NAME='TRADE'
UPDATE [ORDER] SET [TOTAL]=B.[TOTAL] FROM [ORDER] A INNER JOIN [FIXEDORDER] B ON A.ORDERID=B.ORDERID WHERE A.NAME='FIXED'
UPDATE [ORDER] SET [TOTAL]=B.[TOTAL] FROM [ORDER] A INNER JOIN [ANOTHERTABLE] B ON A.ORDERID=B.ORDERID WHERE A.NAME='ANNUAL'
Regards, RSingh -
Plotting multiple graphs on one waveform chart with dynamic data types
I'm trying to put multiple graphs on one waveform chart and having data agreement errors. I'm wondering if it has anything to do with the fact that dynamic data is being used (I've had no problems with other datatypes in the past). Does anyone know how to correct this problem? I've attached the following .VI. There will be plenty of .VIs on the bottom that won't load, but they are not consequential for this problem.
Thanks!
Brian
Solved!
Go to Solution.
Attachments:
Stiffness Control V1.vi 119 KByou could use stacked plots by right clicking on the chart and clicking on the stacked plots and than on the front panek you can put a bundle function on the FP and hook your signals up
Harold Timmis
[email protected]
Orlando,Fl
*Kudos always welcome
Attachments:
multiplotwaveform.JPG 138 KB -
Hi all,
I need the column DATEDIFFERENCE as per below
Kindly help me out .
How to perform on the same column .
Regards, Subathracreate table test (id varchar(10), createddate datetime, assigneddate datetime, resolveddate datetime)
insert into test values ('SD1023','4/2/2014 10:02:00','4/2/2014 10:06:00','6/2/2014 20:06:03')
insert into test values ('SD1023','4/2/2014 10:02:00','4/2/2014 10:20:01','6/2/2014 20:06:03')
insert into test values ('SD1023','4/2/2014 10:02:00','4/2/2014 12:02:00','6/2/2014 20:06:03')
insert into test values ('SD1023','4/2/2014 10:02:00','6/2/2014 20:06:03','6/2/2014 22:10:03')
insert into test values ('SD10123','6/2/2014 20:06:03','6/2/2014 20:06:03','6/2/2014 23:06:06')
insert into test values ('SD10123','6/2/2014 20:06:03','6/2/2014 21:06:04','6/2/2014 23:06:06')
insert into test values ('SD10123','6/2/2014 20:06:03','6/2/2014 22:06:05','6/2/2014 23:06:06')
insert into test values ('SD10123','6/2/2014 20:06:03','6/2/2014 23:06:06','6/2/2014 23:06:06')
;with mycte as (select *,row_number() Over(Partition by id Order by AssignedDate) rn1
,row_number() Over(Partition by id Order by AssignedDate DESC) rn2
from test)
,mycte1 as (
Select m0.id,m0.createddate,m0.assigneddate,m0.resolveddate,
CASE WHEN m0.rn1=1 Then m0.createddate Else m1.assigneddate End as dt1,
CASE WHEN m0.rn2=1 Then m0.resolveddate Else m0.assigneddate end as dt2
from mycte m0 left join mycte m1 on m0.id=m1.id and m0.rn1=m1.rn1+1)
select id,createddate,assigneddate,resolveddate
,datediff(second,dt1,dt2) as [Date Difference in seconds] from mycte1
order by dt1
drop table test -
Select the column details for table in one column as varchar2(32000)
Oracle Version: ORACLE 10G R 2
Problem : Select the column details for some tables and want to store the same in VARCHAR2(32000) separated by ||
Example:
TABLE_NAME COLUMN_NAME DATA_TYPE
EMP EMPNO NUMBER
EMP ENAME VARCHAR2
EMP JOB VARCHAR2
EMP MGR NUMBER
EMP HIREDATE DATE
EMP SAL NUMBER
EMP COMM NUMBER
EMP DEPTNO NUMBER
EMP RN NUMBER
Want to store
COLUMNS (empno||ename||job||mgr||hiredate||sal||comm||deptno||rn);SQL> var cur refcursor
SQL> declare
ctx number;
begin
ctx := dbms_xmlgen.newcontext('select * from emp');
dbms_xmlgen.setNullHandling(ctx, dbms_xmlgen.empty_tag);
open :cur for select * from xmltable('for $i in ROW return string-join($i/*, "||")' passing dbms_xmlgen.getxmltype(ctx).extract('ROWSET/ROW'));
end;
PL/SQL procedure successfully completed.
SQL> print cur
COLUMN_VALUE
7369||SMITH||CLERK||7902||17.12.1980 00:00:00||800||||20
7499||ALLEN||SALESMAN||7698||20.02.1981 00:00:00||1600||300||30
7521||WARD||SALESMAN||7698||22.02.1981 00:00:00||1250||500||30
7566||JONES||MANAGER||7839||02.04.1981 00:00:00||2975||||20
7654||MARTIN||SALESMAN||7698||28.09.1981 00:00:00||1250||1400||30
7698||BLAKE||MANAGER||7839||01.05.1981 00:00:00||2850||||30
7782||CLARK||MANAGER||7839||09.06.1981 00:00:00||2450||||10
7788||SCOTT||ANALYST||7566||19.04.1987 00:00:00||3000||||20
7839||KING||PRESIDENT||||17.11.1981 00:00:00||5000||||10
7844||TURNER||SALESMAN||7698||08.09.1981 00:00:00||1500||0||30
7876||ADAMS||CLERK||7788||23.05.1987 00:00:00||1100||||20
7900||JAMES||CLERK||7698||03.12.1981 00:00:00||950||||30
7902||FORD||ANALYST||7566||03.12.1981 00:00:00||3000||||20
7934||MILLER||CLERK||7782||23.01.1982 00:00:00||1300||||10
14 rows selected. -
How to achieve grouping of data based on one column
Hello PL/SQL Gurus/experts,
I am using Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production version
I have following table -
DROP TABLE T2;
create table T2(Manager,Employee) as select
'Nikki','Ram' from dual union all select
'Nina', 'Rita' from DUAL union all select
'Mike', 'Radha' from dual union all select
'Michael', 'Ratnam' from DUAL union all select
'Hendi', 'Ratna' from dual union all select
'Robert', 'Raman' from dual union all select
'Maria', 'Rolly' from dual union all select
'Kistrien', 'Rachna' from dual union all select
'Andrew', 'Ritvik' from dual union all select
'Emma', 'Ramesh' from dual union all select
'Andy', 'Ranpal' from dual union all select
'Brandy', 'Raunak' from dual union all select
'Nikki','Shyam' from dual union all select
'Nina', 'Sita' from DUAL union all select
'Mike', 'Sadhna' from dual union all select
'Michael', 'Satnam' from DUAL union all select
'Hendi', 'Satna' from dual union all select
'Robert', 'Samar' from dual union all select
'Maria', 'Sameer' from dual union all select
'Kistrien', 'Samrachna' from dual union all select
'Andrew', 'Satvik' from dual union all select
'Emma', 'Somesh' from dual union all select
'Andy', 'Sonpal' from dual union all select
'Brandy', 'Samar' from dual union all select
'Emma', 'Piyush' from dual union all select
'Andy', 'Pavan' from dual union all select
'Brandy', 'Paramjeet' from dual;Expected output -
Manager Employee
Nikki
Ram
Shyam
Nina Rita
Sita
Mike Radha
Sadhna
Michael Ratnam
Satnam
Hendi Ratna
Satna
Robert Raman
Samar
Maria Rolly
Sameer
Kistrien Rachna
Samrachna
Andrew Ritvik
Satvik
Emma Ramesh
Somesh
Piyush
Andy Ranpal
Sonpal
Pavan
Brandy Raunak
Samar
ParamjeetI thank to all of you in advance for your valuable time and inputsIn SQL, something like this...
SQL> ed
Wrote file afiedt.buf
1 select case when row_number() over (partition by emp.manager order by employee) = 1 then
2 mgr.manager
3 else
4 null
5 end as manager
6 ,emp.employee
7 from (select distinct manager from t2) mgr
8 join t2 emp on (mgr.manager = emp.manager)
9* order by mgr.manager, emp.employee
SQL> /
MANAGER EMPLOYEE
Andrew Ritvik
Satvik
Andy Pavan
Ranpal
Sonpal
Brandy Paramjeet
Raunak
Samar
Emma Piyush
Ramesh
Somesh
Hendi Ratna
Satna
Kistrien Rachna
Samrachna
Maria Rolly
Sameer
Michael Ratnam
Satnam
Mike Radha
Sadhna
Nikki Ram
Shyam
Nina Rita
Sita
Robert Raman
Samar
27 rows selected.If you want the managers on their own row with the employees underneath then you'll have to fudge it.
SQL> ed
Wrote file afiedt.buf
1 select case when row_number() over (partition by emp.manager order by employee nulls first) = 1 then
2 mgr.manager
3 else
4 null
5 end as manager
6 ,emp.employee
7 from (select distinct manager from t2) mgr
8 join
9 (select distinct manager, null as employee from t2
10 union all
11 select manager, employee from t2
12 ) emp on (mgr.manager = emp.manager)
13* order by mgr.manager, emp.employee nulls first
SQL> /
MANAGER EMPLOYEE
Andrew
Ritvik
Satvik
Andy
Pavan
Ranpal
Sonpal
Brandy
Paramjeet
Raunak
Samar
Emma
Piyush
Ramesh
Somesh
Hendi
Ratna
Satna
Kistrien
Rachna
Samrachna
Maria
Rolly
Sameer
Michael
Ratnam
Satnam
Mike
Radha
Sadhna
Nikki
Ram
Shyam
Nina
Rita
Sita
Robert
Raman
Samar
39 rows selected.
Maybe you are looking for
-
I need to run a map against a particular dataset - how can i do it in OWB
Hello again :) I need to run a map against table on a particular dataset (WHERE clause) - how can i do it in OWB? The map is loading data from table A into table B (doing all sorts of wierd and wonderful things in between). Now table A had more (a lo
-
Help file fails to generate RoboHelp 7 and Word 2003
Hello, I am back again with a new struggle. I am creating a WinHelp4 file for an older application using Word 2003 and Robohelp 7. There are several different results regardless of whether I make updates, corrections, add jumps, change Topic IDs or
-
Re: Losing NT Services (rather how to shutdown idleftexecs)
Hi, Hope I am not adding to the confusion. If unused ftexecs is the problem, look at technote no. 11435 - "Sample code to automate shutting down idle FTEXEC interpreters" . You can alsomanually kill them (rather shut them down) from EConsole. Hope th
-
C'mon - Photo Booth should be downloadable by now...
I just bought a Mac mini for my nieces and gave them my iSight so they could play with Photo Booth, and lo and behold, I can't find the Photo Booth software anywhere, much less on the included software. Seriously, this doesn't make ANY sense to me. W
-
Install problem 0x80070003 Adobe Reader XI
After I had to set back my windoiws 8.1 settings, I tried to re-install Reader XI (windows 8.1.) but without success. At the end of the installationproces I got the message: "An error occurred during the installation of assembly component {B708EB72-A