Have two facet in column header
Hi,
i want have in the column header a static text and button, i do this with facet but if i add a button, the text become invisible, how can i do this? If i want use button only it not centred in the header, how I can make it center?
NB : in the old table component if i use button it is centered.
My jsp text:
<ui:tableColumn binding="#{Page1.tableColumn3}" headerText="test" id="tableColumn3">
<ui:staticText binding="#{Page1.staticText3}" id="staticText3" text="#{currentRow.value['TRIP.DESTCITY']}"/>
<f:facet name="header">
<h:outputText binding="#{Page1.outputText6}" id="outputText6" text="test" value=" Article "/>
<ui:button action="#{Page1.button3_action}" binding="#{Page1.button3}" id="button3" text="Soci�t�"/>
</f:facet>
</ui:tableColumn>
Walid
Any suggestions to do this
Similar Messages
-
Alv report to have 2 lines for column header
How do I set the column header to have 2 lines?
eg
Week Ending --- 1st line
09.10.2007 --- 2nd line
My report always ends up with 2 detail lines when I tried to insert it into the catalog.Try this it may help you for multiple values for one instance....
*Type-pools
TYPE-POOLS: slis.
Data declarations.
DATA: BEGIN OF t_vbak OCCURS 0,
vbeln TYPE vbeln,
bstnk TYPE vbak-bstnk,
erdat TYPE vbak-erdat,
kunnr TYPE vbak-kunnr,
END OF t_vbak.
DATA: BEGIN OF t_vbap OCCURS 0,
vbeln TYPE vbeln,
matnr TYPE vbap-matnr,
netpr TYPE vbap-netpr,
waerk TYPE vbap-waerk,
kwmeng TYPE vbap-kwmeng,
meins TYPE vbap-meins,
END OF t_vbap.
DATA: t_fieldcatalog1 TYPE slis_t_fieldcat_alv.
DATA: t_fieldcatalog2 TYPE slis_t_fieldcat_alv.
DATA: v_repid TYPE syrepid.
DATA: s_layout TYPE slis_layout_alv.
DATA: v_tabname TYPE slis_tabname.
DATA: t_events TYPE slis_t_event.
start-of-selection event.
START-OF-SELECTION.
v_repid = sy-repid.
Get the fieldcatalog for the first block
PERFORM get_fieldcat1 CHANGING t_fieldcatalog1.
Get the fieldcatalog for the second block
PERFORM get_fieldcat2 CHANGING t_fieldcatalog2.
Get the data for the first block
SELECT vbeln bstnk erdat kunnr UP TO 10 ROWS
INTO TABLE t_vbak
FROM vbak WHERE vbeln > '0060000100'.
Get the data for the second block
SELECT vbeln matnr netpr waerk kwmeng meins UP TO 10
ROWS
INTO TABLE t_vbap
FROM vbap WHERE vbeln > '0060000100'.
init
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
EXPORTING
i_callback_program = v_repid.
First block
v_tabname = 'ITAB1'.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
is_layout = s_layout
it_fieldcat = t_fieldcatalog1
i_tabname = v_tabname
it_events = t_events
TABLES
t_outtab = t_vbak.
Second block
v_tabname = 'ITAB2'.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
is_layout = s_layout
it_fieldcat = t_fieldcatalog2
i_tabname = v_tabname
it_events = t_events
TABLES
t_outtab = t_vbap.
*Display
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
FORM GET_FIELDCAT1
Get the field catalog for the first block
FORM get_fieldcat1 CHANGING lt_fieldcatalog TYPE
slis_t_fieldcat_alv.
DATA: s_fieldcatalog TYPE slis_fieldcat_alv.
Order number
s_fieldcatalog-col_pos = '1'.
s_fieldcatalog-fieldname = 'VBELN'.
s_fieldcatalog-tabname = 'T_VBAK'.
s_fieldcatalog-ref_tabname = 'VBAK'.
s_fieldcatalog-ref_fieldname = 'VBELN'.
APPEND s_fieldcatalog TO lt_fieldcatalog.
CLEAR s_fieldcatalog.
Customer purchase order.
s_fieldcatalog-col_pos = '2'.
s_fieldcatalog-fieldname = 'BSTNK'.
s_fieldcatalog-tabname = 'T_VBAK'.
s_fieldcatalog-ref_tabname = 'VBAK'.
s_fieldcatalog-ref_fieldname = 'BSTNK'.
APPEND s_fieldcatalog TO lt_fieldcatalog.
CLEAR s_fieldcatalog.
Creation date.
s_fieldcatalog-col_pos = '3'.
s_fieldcatalog-fieldname = 'ERDAT'.
s_fieldcatalog-tabname = 'T_VBAK'.
s_fieldcatalog-ref_tabname = 'VBAK'.
s_fieldcatalog-ref_fieldname = 'ERDAT'.
APPEND s_fieldcatalog TO lt_fieldcatalog.
CLEAR s_fieldcatalog.
Customer
s_fieldcatalog-col_pos = '4'.
s_fieldcatalog-fieldname = 'KUNNR'.
s_fieldcatalog-tabname = 'T_VBAK'.
s_fieldcatalog-ref_tabname = 'VBAK'.
s_fieldcatalog-ref_fieldname = 'KUNNR'.
APPEND s_fieldcatalog TO lt_fieldcatalog.
CLEAR s_fieldcatalog.
ENDFORM.
FORM GET_FIELDCAT2
Get the field catalog for the second block
FORM get_fieldcat2 CHANGING lt_fieldcatalog TYPE
slis_t_fieldcat_alv.
DATA: s_fieldcatalog TYPE slis_fieldcat_alv.
Order number
s_fieldcatalog-col_pos = '1'.
s_fieldcatalog-fieldname = 'VBELN'.
s_fieldcatalog-tabname = 'T_VBAP'.
s_fieldcatalog-ref_tabname = 'VBAP'.
s_fieldcatalog-ref_fieldname = 'VBELN'.
APPEND s_fieldcatalog TO lt_fieldcatalog.
CLEAR s_fieldcatalog.
Material number
s_fieldcatalog-col_pos = '2'.
s_fieldcatalog-fieldname = 'MATNR'.
s_fieldcatalog-tabname = 'T_VBAP'.
s_fieldcatalog-ref_tabname = 'VBAP'.
s_fieldcatalog-ref_fieldname = 'MATNR'.
APPEND s_fieldcatalog TO lt_fieldcatalog.
CLEAR s_fieldcatalog.
Net price
s_fieldcatalog-col_pos = '3'.
s_fieldcatalog-fieldname = 'NETPR'.
s_fieldcatalog-tabname = 'T_VBAP'.
s_fieldcatalog-ref_tabname = 'VBAP'.
s_fieldcatalog-ref_fieldname = 'NETPR'.
s_fieldcatalog-cfieldname = 'WAERK'.
s_fieldcatalog-ctabname = 'T_VBAP'.
APPEND s_fieldcatalog TO lt_fieldcatalog.
CLEAR s_fieldcatalog.
Currency.
s_fieldcatalog-col_pos = '4'.
s_fieldcatalog-fieldname = 'WAERK'.
s_fieldcatalog-tabname = 'T_VBAP'.
s_fieldcatalog-ref_tabname = 'VBAP'.
s_fieldcatalog-ref_fieldname = 'WAERK'.
APPEND s_fieldcatalog TO lt_fieldcatalog.
CLEAR s_fieldcatalog.
Quantity
s_fieldcatalog-col_pos = '5'.
s_fieldcatalog-fieldname = 'KWMENG'.
s_fieldcatalog-tabname = 'T_VBAP'.
s_fieldcatalog-ref_tabname = 'VBAP'.
s_fieldcatalog-ref_fieldname = 'KWMENG'.
s_fieldcatalog-qfieldname = 'MEINS'.
s_fieldcatalog-qtabname = 'T_VBAP'.
APPEND s_fieldcatalog TO lt_fieldcatalog.
CLEAR s_fieldcatalog.
UOM
s_fieldcatalog-col_pos = '6'.
s_fieldcatalog-fieldname = 'MEINS'.
s_fieldcatalog-tabname = 'T_VBAP'.
s_fieldcatalog-ref_tabname = 'VBAP'.
s_fieldcatalog-ref_fieldname = 'MEINS'.
APPEND s_fieldcatalog TO lt_fieldcatalog.
CLEAR s_fieldcatalog.
ENDFORM.
ALV Report to have two different Reports
Plz Reward points if contents are useful,,, -
How to insert additional column header using dataTable
Hi everyone, I am using MyFaces 1.1.3, tomahawk 1.1.3, tomahawk-sandbox 1.1.5
I have to add one column header "Proficiency" as in image [http://www.nabble.com/file/p17206601/screenshot.jpg]
This is JSF code without "Proficiency":
<t:dataTable id="data" value="#{commonBean.tableList}" styleClass="standardTable" headerClass="table_header" rowClasses="table_row1, table_row2" columnClasses="standardTable_Checkbox_Column,standard_text,standardTable_Checkbox_Column,standardTable_Checkbox_Column" var="value" preserveSort="true" rows="10" width="100%" border="0" sortColumn="#{commonBean.sortColumn}" sortAscending="#{commonBean.ascending}" cellpadding="2" cellspacing="1" rowIndexVar="tableRowIndex">
<h:column>
<f:facet name="header">
<h:panelGrid styleClass="table_header2">
<h:outputText value="#{msg['select']}" />
</h:panelGrid>
</f:facet>
<h:selectBooleanCheckbox id="select" value="#{value.select}" />
</h:column>
<h:column>
<f:facet name="header">
<t:commandSortHeader columnName="languageSkill" arrow="true" styleClass="table_header">
<h:outputText value="#{msg['language.skill']}" />
</t:commandSortHeader>
</f:facet>
<h:commandLink action="#{commonBean.editAction}" actionListener="#{commonBean.editActionListener}">
<h:outputText value="#{value.languageSkill}" />
</h:commandLink>
<f:param id="object" value="#{value}" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="#{msg['spoken']}" />
</f:facet>
<h:outputText value="#{value.spokenDescription}" styleClass="standardText"/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="#{msg['written']}" />
</f:facet>
<h:outputText value="#{value.writtenDescription}" styleClass="standardText"/>
</h:column>
</t:dataTable>How to do ?
Thanks for your help
Edited by: nvduc82 on May 13, 2008 12:09 PM
Edited by: nvduc82 on May 13, 2008 8:46 PMI see 2 possibilities:
1. Merge two last columns. And then use panelGrid inside the cells.
2. Use JSTL and tag forEach. I found it much easy-to-use. -
How to pass column header as a parameter in Validation Expression (APEX4.0)
Hello
I created a new Page validation in APEX4.0 ( not 4.1 ).
(1) Type : Function Returning error text
(2) Validation Expression 1 :
begin
return validate_name ( p_c=> #COLUMN_HEADER# ,p_c_value=> to_date(:p26_LEAVE_FROM,'dd/mm/yyyy') );
end;
note: the validate_name is an oracle pl/sql procedure which takes two input parameters ( column header name and actual value ) and return a specific error message ( to that column ) or NULL.
(3) In the Error Message section, I left Error Message blank ( as the app ignored the mssage but used the one returned from the above function)
However, I chose "The Error display location" to be inline with field and notification" and Associated Item to be "p26_LEAVE_FROM".
My question, it worked if I hard coded the actual column header "LEAVE FROM" , but it didn't work if I used the above #COLUMN_HEADER# in Validation Expression. Can I avoid hard coding as the column header might be changed one day. Is there a better way to deal with multiple column validations with different error message for each column ? It seems that I will have to create similar page valiation for each column to be validated.
Thanks for your advice.
Edited by: Susanna on 19/01/2012 17:45You want something like this:
DECLARE
lio_success VARCHAR2( 2000 );
li_id NUMBER;
li_dep_id NUMBER;
li_sel_id := NUMBER;
li_date DATE;
lo_date DATE;
lio_return_message xyz_bpe_rec_fn.xyz_bpe_rec_col;
l_ret xyz;
BEGIN
lio_success := 'some value';
li_id := NULL; -- or some number
li_dep_id := NULL; -- or some number
li_sel_id := NULL; -- or some number
li_date DATE := sysdate;
lio_return_message.col1 := somevalue;
lio_return_message.col2 := somevalue;
lio_return_message.coln := somevalue;
l_ret := get_xyz( lio_success
, li_id
, li_dep_id
, li_sel_id
, li_date
, lo_date
, lio_return_message );
END;
/ -
How to Merge ADF Table Column Header in ADF Table ?
Hi All,
We need to have ADF Table Column header to be "Merged",
e.g :
There are two columns Header : | Qty (Case) | Qty (Pack) |,
can we customize it to display like this :
| ----- Qty -------|
| Case | Pack |
where there are two rows in column header, the first one is "Merged".
How can we do that ?
Thank you very much,
xtantoHi Kelly,
Thank you for your reply,
Using Column Faced, Header I can format the header of one column Only.
My requirement is to Merge header of two colums :
| ----- Qty -------|
| Case | Pack |
'Case' &'Pack' is two different column, so I need to add one row on the header of the two colums, then 'merge' them, and add the word '----Qty----'.
Is it possible ?
Thank you,
xtanto -
JTable : column header with subheaders
I need to create a table that looks like this:
======================
Car....|...PRICE......
.......|dollars.|euros
======================
camry..|18K.....|17k...
bmw....|80K.....|76K...
metro..|22K.....|30K...
(sorry for lousy "graphics")
My quesion is about the two-layered "PRICE" column header that has two subheaders for two different currencies.
What is the best way to approach this?So there's no standard feature for that (like in HTML)-- you basically have to implement it all yourself?
-
Row break + column header Question
I've got two question i can't find out by myself.
Question 1:
I use a row break on the first column of my report. That workd correctly. But how do i get a line or a empety row after the break? I prefer a line...
Question 2:
I want to have an extra header above some columns. how to create that. A example:
extra header 1 extra header 2
column1 column2 column3 column4 column5 column6 column7
hope someone can help me with this... tnx in advancedHi,
For your second question, you could create a custom template and put in the additional headers in there, under the 'Before Column Heading' section. I have done this with one of my reports where I simply copied the standard template and changed it to include the header information. This is an example of what I have in the Before Column Heading section for my custom template.
<tr><th class="t18ReportHeader"#ALIGNMENT# colspan="4" style="font-weight:bold;text-align:center;">Progress Data </th></tr>
<tr><th class="t18ReportHeader"#ALIGNMENT#> </th>
<th class="t18ReportHeader"#ALIGNMENT# style="font-weight:bold;text-align:center;" colspan="4"> Header 1 </th>
<th class="t18ReportHeader"#ALIGNMENT# colspan="5" style="font-weight:bold;text-align:center"> Header 2 </th>
<th class="t18ReportHeader"#ALIGNMENT# colspan="4" style="font-weight:bold; text-align:center"> Header 3</th>
HTH,
Chandini -
ADF Table - Column Header Icon support
Do we have icon support for column header for ADF Table?
I am looking for image added to the column header as in
http://img196.imageshack.us/img196/4562/tablesample.png
Thanks in advance,
NavaneethHi Navaneeth,
I actually never tried but maybe this does the trick
af|column::column-header-cell
icon: url("images/<your-image>");
[\code]
Might work.
Regards -
Problem::Table Column Heading Font control
Hi experts!
Do we have any way to change font and its size in column heading, in Table Component.
I tried but looks like we dont have access to table column heading. We can only enter heading but cant change its font and size.
Thanking you in anticipation.
AnnuHi!
As workaround You can try to set size of text for table to what You want to have for headers and then set size for every <webuijsf:tableColumn> tag to what You want to have for rows.
Thanks,
Roman. -
Hello,
Using obiee 11g,I have an analysis in my dashboard.
It has a table and a graph side by side.
The column heading is bit long (even though the column heading is now getting adjusted )
but its coming in 3 rows as there are 3 words,Now like i have it for 4 columns.
Total there are 7 columns.
What i would like to know is if its possible to have a one single column heading
for more then one columns.
For e.g. if the column is col1 abcdefght abc , col2 abcdefght abc....col4 abcdefght abc
then above these 4 columns have the abcdefght abc so that in the column heading i can just put
col1,col2,col3,col4?
abcdefght abc
col1 col2 col3 col4
Is this possible.
Whole idea is i have to use the 2 words for these columns and also reduce the space fro each column,
So that the table and graph gets aligned without any right scroll.
Thanksabcdefght abc
col1 col2 col3 col4Only one option. Change the table heading for all these 4 cols to abcdefght abc and put the required column headings as col1, col2 etc
Now goto table properted - Table view, in Display Column & Table Headings select 'As seperate row' and you are done.
Hope its useful -
Column header filtering not functioning for external lists
I have a problem with column header filtering on external lists, specific for columns of Number and Date types.
When the site's regional settings are in English (United States) filtering works fine, but if I choose any other regional setting with different number formatting (ie Dutch) then filtering on these columns gives no results.
When clicking on the column header filter dropdown, the numbers to filter on are displayed with thousands seperators where the numbers in the views are not formatted as seen in attached screenshot.
Filtering on custom sharepoint list with these regional settings is working fine, it is just on external lists, on number and date fields and regional setting is not English.
I have tried all different kind of regional settings on the client and the server, but no results.
Anybody has a clue?
Clicking on the column header shows all available filter values (with thousand seperator). Selecting one value gives no results:
No results after selecting a filter valueHi,
According to your post, my understanding is that you had an issue about column filter in external list.
We can use the SharePoint Manager to change the column type to “single line of text”, then you would filter column in the external list.
There is a similar thread for your reference:
http://social.technet.microsoft.com/Forums/en-US/fe67d581-6e7b-4770-b296-8ec0f9b5b769/not-able-to-filter-or-sort-by-list-column-headers-for-external-data-fields-ideas?forum=sharepointgeneralprevious
Thanks,
Jason
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected]
Jason Guo
TechNet Community Support -
Way to wrap Column Heading in two lines
Hi,
We have created one table UI element in web dynpro application.
We have a requirement to wrap a table column heading in the table.
Is there any way to wrap or keep the column heading in two lines.
Thanks in advance..
Regards,
Kranthi.Hi Kranthi,
not that I know of - but then again that doesn't mean there isn't!
however, you could force two lines by inserting your column in the table as a column inside a column group - you would get a line for the column group and a line for the column - effectively two lines. If this was the only column in the column group I can't see how it could cause any issue.
Hope this helps,
Cheers,
Chris -
Split ALV Column heading into two
Hello All,
I have a ALV Column Header - ALV LIST - SAP 46C.
Material | Info Type | Quantity | Price etc..
Due to space contraints and other reason client needs to split the Info type column into two.
Material | Info | Quantity | Price etc..
| Type |
The data records should not have any additional blank lines.
How to achieve this?
Thanks,You have to assign X to layout property no_colhead.
Then write your heading using write statements.
Here is the exact example you are looking for [Create Multiple Lines Header In ALV List Report|http://www.freesaptutorial.com/create-multiple-lines-header-in-alv-list-report/] -
JTable - One Column Heading for Two Columns
Can you adjust the default JTable to have one column heading for two columns of data? Is there a simple span command? I've looked at the api for JTable and JTableHeader and didn't see anything, is there something I'm missing? Any help would be appreciated.
What i am trying to accomplish is have column 'E' span 2 columns.
This is my code thus far, however it give the error from my pryor message. I am pretty sure it is because I'm using and Object[][] and a String[] instead of Vectors. What corrections do I need to make in order for my goal of:
[ A ][ B ][ C ][ D ][ E ][ F ][ G ]
[ 1 ][ 2 ][ 3 ][ 4 ][5][6][ 7 ][ 8 ]
Object[][] data = new Object[ROWS][COLUMNS];
String[] columnNames = {"A","B","C","D","E","E","F","G"};
table = new JTable(data, columnNames);
table.setBackground(Color.white);
table.addKeyListener(this);
DefaultTableCellRenderer d = new DefaultTableCellRenderer();
d.setHorizontalAlignment(JLabel.CENTER);
table.setDefaultRenderer(table.getColumnClass(0),d);
for (int i = 0; i < table.getColumnCount(); i++){
TableColumn aColumn = header.getColumnModel().getColumn(i);
TableCellRenderer renderer = aColumn.getHeaderRenderer();
if (renderer == null) {
renderer = new DefaultTableCellRenderer(){
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column){
JTableHeader header = table.getTableHeader();
if (header != null) {
setForeground(header.getForeground());
setBackground(header.getBackground());
setFont(header.getFont());
setHorizontalAlignment(JLabel.CENTER);
setText((value == null) ? "" : value.toString());
setBorder(UIManager.getBorder("TableHeader.cellBorder"));
return this;
aColumn.setHeaderRenderer(renderer); -
Problem in Adding two buttons under same column header (in JTable)
Hi,
I have a JTable and to a particular column i want to add two buttons.
Here the two buttons should be under the same column header and i need to add listners to these.
Any idea how to do this?
Thanks & regards
NeelOf course as your header is drawn by a renderer, the buttons don't actually work, but you can listen for mouse clicks within the area of the header and see which button the mouse position was over.
See the Java Table Sorter Demo code for how to add a mouse listener to the header...
http://java.sun.com/docs/books/tutorial/uiswing/components/example-1dot4/index.html#TableSorterDemo
....and from there you should be able to determine where in the component the click occured by using the getX() and getY() methods of the MouseEvent to determine which button in the renderer component was clicked. Use something like Rectangle.contains() to match the click location against the buttons.
Maybe you are looking for
-
Frustratingly slow performance Mavericks on Macbook Pro
Hi I have a mid 2009 Macbook Pro with Mavericks installed. Lately I have been getting frustrating spinning beachball hangs, apps crashing (particularly mail and aperture), boot times of 5 minutes plus, and shutdown times as long as 7 minutes. I've re
-
how to connect a printer to the usb OS X v10.9 Mavericks makbook air?
-
Can't Sync music to my ipod?
hello, i just recently bought th ipod gen 5 and can not sync my music to the ipod. it gets stuck and won't move at all. any solutions to this that work?
-
Why does my Audition CC crash after I record something?
Hello, I am currently making rap music using a Yeti pro USB by Blue microphones. Everytime I start up Audition everything goes fine until I record a verse over a beat, after I press stop I see the symbol when it is saving something over the file name
-
Graphic error with Lion (27", End 2009)
Hey, after installing Lion my screen is acting really weird. It looks like this: http://twitpic.com/5tcrmh Graphiccard: ATI Radeon HD 4850 512 MB anyone know a solution to my problem?