How do I set Column Width in table displayed - have tried everything :-(
Hi,
I'm using Jdev 10.1.2, adf bc and jsp's.
Simple problem, driving me nuts. In my app i display a number of different view objects in a number of jsp's. i want to set the width of the columns so that the info (if large) in each field will stay on one line. i.e. it wont continue onto the next line and take up two rows.
i have tried setting the width property of the <th> & <td>, setting the disply width property in the entity object editor and the view object editor, nothing makes a bit of difference to how the column is displayed.
this results in the tables looking messy and squised, which is totally unsatisfactory.
so if anyone could shed any light on the subject, i would be most grateful.
Thanks in advance......
hi Newbe,
if you set the option noWrap="true" on the column the text will not be wrapped;
<af:column noWrap="true" sortable="false" headerText="col5">
<af:outputText value="#{row.col5}"/>
</af:column>
Good luck
Luc Bors
Similar Messages
-
How can I set column width in JTable?
How can I set column width in JTable?
Also, read the JTable API before posting questions. You will find a link to the Swing tutorial on "How to Use Tables", which contains an example of doing exactly this.
-
I reinstalled my plug-ins into Photoshop CC (2014) on Mac OSX 10.9.4, and they are greyed out in the Filters menu. How do I get them to work? I have tried everything including repairing permissions.
My apologies. Your post jogged my little grey cells to the point that I did a few experiments. In essence, you are right. My plug-ins do not work with 8-bit greyscale images. I like to deliberately shoot B&W and have a Wratten #12 minus-blue filter on the lens--as I used to do with film cameras.
The raw files ( Fujifilm's .RAF) were converted in Adobe CR by checking off "Convert to Grayscale" under the fourth tab. In the future, I will do the B&W conversion in Photoshop with either Nik or Topaz plug-ins.
Thanks for your input! -
I CANNOT change my phone number setting to an sms capable number to set-up keychain.. I have tried everything. I am on a Mac OSX, Mavericks upgrade and an iPhone 5. My mobile is set to @icloud and my mac is stuck set on @me and there aren't any options for changing either my phone number, account, details or anything. I simply want to set-up keychain and receive an sms to my mobile and not to my sms non-compatible home phone number. Any help sooo appreciated.
On your Mac, Sign Out of iCloud, then Sign In with the ID you want to use.
-
I've been utilizing the below script (thank you so much Ramkumar. P!) to set column widths throughout a sizable InDesign book with tables on every page and it is truly a time saver. At this point in time, I have three versions of it because there are different column widths throughout the book. Is it possible to augment the script to run only on a selected text frame (containing a table)? If so, would someone be kind enough to share the augmented script with me? I've been trying to figure out this seemingly simple change through trial and error with no success as yet. I realize this is a totally newbie request and I'm entirely at the mercy of the kindness of the Javascript gods that contribute within this forum. Seeing that in a different post related to this script, one such guru responded to a request as simple as "Where do I put the scripts in InDesign" gave me enough courage to ask for some help! Thank you in advance to anyone willing to provide a solution.
var myDoc = app.activeDocument;
var myWidths = [100, 100, 150, 150];
for(var T=0; T < myDoc.textFrames.length; T++){
for(var i=0; i < myDoc.textFrames[T].tables.length; i++){
for(var j=0; j < myWidths.length; j++){
myDoc.textFrames[T].tables[i].columns[j].width = myWidths[j];
alert("Table width updated successfully...");Hello all
I have the same problem in that I'm not a scripting person, but was able to get the above script working without problem, and it does set irregular table column widths perfectly, so thanks to Ramkumar. P for that.
BUT, it changes the column width for ALL tables in the document, whereas I would like to just target the selected table.
Any ideas as to how I might amend this script to achieve this?
Thx, Christian -
How do I set column widths in read/write rules?
Hello structure experts,
I am reading a set of DITA files into a specific FM template format, and there is one detail I cannot get to work properly. It should be possible to define column widths in a table, even if the DITA file does not include that information. But the Structure Application Developer Reference does not give the information on which string to pass to the column widths fm property. Does anyone out there have experience in doing this ?
Thanks
JangGot it !!!
Turned out to be simple, but the info was more or less hidden in the Dev Ref Guide: I had already put the "fm property column widths is value " line in but did not know the syntax for the values. Turns out you need to delimit the values by spaces, not commas. The parser does not give ANY useful information about this, just mentions 'syntax error near somewhere' or completely ignores the values you specify.
This is how the rule for my DITA properties element now works out:
element "properties" {
is fm table element;
fm property columns value is "3";
fm property column widths value is "5cm 5cm 6cm";
It works. I earn 10 points for answering my own question. :-)
Ciao
Jang -
How to optimize the column width in Table Control
Hi all,
When I am displaying fields in Table Control, the columns are displayed in full length, and I am unable to see all the fields at once.
So as in grid , where we optimize the column width using layout, do we had any property for TC to do so.
thanks for your help.
Points would be awarded .
Regards,
Anil .Hi,
In Se51, you can do this one, ust open your table control and resize the TC, there is no direct option to do this for entire TC, you need to do this field by field, and arrage the TC to adjust in a Single screen. In the field parameters, you have the field lenghts, there you can minimize the length of a field
Regards
Sudheer -
How do I set column width for a table?
I want to set the same width for all the columns in a particular table. Is there anyway of doing this without having to actually manually adjust each individual column?
ThanksSelect the column headers and drag across (A,B,C for example) then select between one of the columns (your pointer will change shape). Select and drag to the new width. All selected columns will change.
Regards, -
How do I get my imessage to work, i have tried everything
could someone please tell me how to fix my imessage, it wont let me select my number so that i can recieve my messages to my number
You're going to need to give us some more information. What is happening when you try to use it? What error messages are you getting? What troubleshooting steps have you already taken?
-
How do I enable Java in Safari? I have tried everything 3 times.
I have a new Macbook Pro. I can not get Java to load when playing games. I have downloaded two times. When I go to Javas website it says plugin not enabled but when I go into my computer it says it is. HELP.
Safari > Preferences > Security
Internet Plug-ins:
Put a checkmark in the box beside "Allow Java".
Best. -
Set Column width in query (not using SQL*Plus)
How can I Set Column width in query
I understand you can set column width using
column col1 FORMAT A5
select col1 from table1;But this only works in SQL*Plus
I want to be able to do this in a regular SQL query window (not in SQL*Plus), how can I do it.....
I am using a 'SQL window' in PL/SQL Developer IDE
and when I use this syntax it says:
ORA-00900: Invalid SQL statement
Any suggestions are appreciated...
thanks,
M.Did you try using RPAD or LPAD functions? They fill the unfilled part of a string with character you provide... either on right or left side depending on what function you use.
e.g.
SELECT RPAD('Smith', 10, ' ') Name FROM dual;http://www.adp-gmbh.ch/ora/sql/rpad.html
Edited by: Zaafran Ahmed on Nov 10, 2010 11:50 AM -
How to set column width in alvgrid
hi
how to set column width in alvgrid.
thanks.Hi,
Check this,
REPORT ztest.
DATA: BEGIN OF i_scarr_tab OCCURS 0.
INCLUDE STRUCTURE scarr.
DATA: END OF i_scarr_tab.
DATA: i_scarr LIKE TABLE OF i_scarr_tab WITH HEADER LINE,
w_scarr LIKE LINE OF i_scarr_tab.
DATA: o_grid TYPE REF TO cl_gui_alv_grid,
o_container TYPE REF TO cl_gui_custom_container.
DATA: lt_fcat TYPE lvc_t_fcat,
ls_layo TYPE lvc_s_layo,
ls_sort TYPE lvc_s_sort,
lt_sort TYPE lvc_t_sort,
ls_fieldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE.
START-OF-SELECTION.
CALL SCREEN 9000.
*& Module status_9000 OUTPUT
text
MODULE status_9000 OUTPUT.
SET PF-STATUS '9000'.
SET TITLEBAR '9000'.
ENDMODULE. " status_9000 OUTPUT
*& Module user_command_9000 INPUT
text
MODULE user_command_9000 INPUT.
CASE sy-ucomm .
WHEN 'BACK' OR 'EXIT'.
SET SCREEN 0.
LEAVE SCREEN.
ENDCASE.
ENDMODULE. " user_command_9000 INPUT
*& Module init_9000 OUTPUT
text
MODULE init_9000 OUTPUT.
IF o_container IS INITIAL.
SELECT * FROM scarr INTO CORRESPONDING FIELDS OF TABLE
i_scarr UP TO 100 ROWS.
IF cl_gui_alv_grid=>offline( ) IS INITIAL.
Create a custom container control for ALV Control
CREATE OBJECT o_container
EXPORTING
container_name = 'CONTROL'.
Create a ALV Control
CREATE OBJECT o_grid
EXPORTING i_parent = o_container.
PERFORM build_field_catalgue.
ls_layo-sel_mode = 'A'.
CALL METHOD o_grid->set_table_for_first_display
EXPORTING
i_save = 'A'
i_default = 'X'
is_layout = ls_layo
CHANGING
it_outtab = i_scarr[]
it_fieldcatalog = lt_fcat
it_sort = lt_sort[].
ENDIF.
ENDIF.
ENDMODULE. " init_9000 OUTPUT
*& Form build_field_catalgue
text
--> p1 text
<-- p2 text
FORM build_field_catalgue .
DATA: ls_fcat TYPE lvc_s_fcat.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = sy-cprog
i_internal_tabname = 'I_SCARR_TAB'
i_structure_name = 'SCARR'
i_client_never_display = 'X'
CHANGING
ct_fieldcat = ls_fieldcat[]
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE 'FCAT Error' TYPE 'I'.
EXIT.
ENDIF.
LOOP AT ls_fieldcat.
CLEAR ls_fcat.
ls_fcat-fieldname = ls_fieldcat-fieldname. "Fieldname
ls_fcat-ref_table = ls_fieldcat-tabname. "DDIC ref struct
ls_fcat-inttype = ls_fieldcat-inttype. "Data type
ls_fcat-outputlen = ls_fieldcat-outputlen. "Column width
ls_fcat-coltext = ls_fieldcat-seltext_m. "Column Header
ls_fcat-seltext = ls_fieldcat-seltext_m. "Column Desc
ls_fcat-ref_field = ls_fieldcat-ref_fieldname. "Reference field
ls_fcat-ref_table = ls_fieldcat-ref_tabname. "Reference table
CASE ls_fieldcat-fieldname.
WHEN 'LUGGWEIGHT' OR 'FORCURAM'.
ls_fcat-edit = 'X'.
ls_fcat-do_sum = 'X'.
WHEN 'URL'.
ls_fcat-no_out = 'X'.
WHEN OTHERS.
ls_fcat-edit = ' '.
ls_fcat-do_sum = ' '.
ENDCASE.
APPEND ls_fcat TO lt_fcat.
ENDLOOP.
ENDFORM. " build_field_catalgue
check the programs bcalv_grid*.
check this link for more detailed example.
http://www.supinfo-projects.com/fr/2005/alv_display_fr/2/
Regards
Sruthi -
How to resize the columns of a table?
Hi there!
I want to resize the column of a JTable(constructed via AbstractTableModel) to
fit the exact width of the word in the header?
Can anyone tell me how to do this thing?
Regards,import java.awt.*;
import javax.swing.table.*;
public class ColumnResizeDemo extends javax.swing.JFrame {
public ColumnResizeDemo() {
initComponents();
TableColumn column = null;
for (int i = 0; i < jTable1.getColumnModel().getColumnCount(); i++) {
column = jTable1.getColumnModel().getColumn(i);
String hv = column.getHeaderValue().toString();
JTableHeader th = jTable1.getTableHeader();
FontMetrics fm = th.getFontMetrics(th.getFont());
column.setPreferredWidth(fm.stringWidth(hv)+5);
private void initComponents() {
jLabel1 = new javax.swing.JLabel();
jScrollPane1 = new javax.swing.JScrollPane();
jTable1 = new javax.swing.JTable();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("Column Resize Demo");
jLabel1.setText("Sets column width to fit exactly the corresponding header value");
getContentPane().add(jLabel1, java.awt.BorderLayout.NORTH);
jTable1.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{null, null, null, null},
{null, null, null, null},
{null, null, null, null},
{null, null, null, null}
new String [] {
"Title 1", "Title 0002", "Title 0000003", "Title 00000000000004"
jTable1.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
jScrollPane1.setViewportView(jTable1);
getContentPane().add(jScrollPane1, java.awt.BorderLayout.CENTER);
pack();
public static void main(String args[]) {
new ColumnResizeDemo().setVisible(true);
private javax.swing.JLabel jLabel1;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JTable jTable1;
} -
Setting column width in a command-line program
Is there a way to send data to the screen in a command-line Java program that will be formatted as a number
of columns with a set column width? I am looking for something similar to the C++ setw() I/O manipulator
used in cout.
Thanks,
SteveIf you go to: http://java.sun.com/docs/books/tutorial/essential/io/writingFiltered.html
it will show you how to subclass a filtered output stream and add your own formatting methods.Then you can chain your new class to System.out
like this:
YourFilteredStream yfs = new YourFilteredStream(System.out); .
Then:
yfs.yourNewMethod(); goes directly to system out in the new format. -
Autofit column width to table cell content in Pages
Hello,
Would anyone know how to autofit the column width of a table cell in Pages '09?
I have searched Pages Help to no avail.
Thank you very much in advance.There is a checkbox in the table inspector to auto-resize to fit content. Unfortunately, that only seems to work with rows, not columns.
Maybe you are looking for
-
AirPlay discovery over Bluetooth in AppleTV 6.1?
Has anyone got AirPlay discovery over Bluetooth, supposedly added to, AppleTV 6.1, working? Does it requires an iPhone 5 and/or an AppleTV (3rd generation)? I'm using an iPhone 4s with iOS 7.1 and an Apple TV (2nd gen) with 6.1: • AirPlay works fine
-
Hey does apple charges for free applications mentioned in Itune??
Yesterday i bought a Apple IPAD2. i have connected my IPAD2 to itunes at that my there was no applications in it. I have installed some free applications listed in the Itunes. i m curious about, does the apple charge for the free applications as well
-
Query Selection Box Descriptions
When I set up selections options in the 'WHERE' statement the selection fields default to standard text such as: Posting Date Greater or equal Posting Date Smaller or equal Description in Foreign Lang
-
How caching works in Webcenter sites?
Hi All, Can any body share some website URL where I can read about caching in webcenter. Thanks in advance. Regards, Nelash Jindal
-
Hi, I am trying upgrade to Snow leopard 10.6.8 from 6.3(trying to install Lion). After downloading the software i m getting a message "can not install on the HD, install 6.5 before proceeding further. I coud not understand. Any suggestions, I appreci