How add acl entries for webdav protocol
I have installed sunone web proxy3.6 sp3 .I get errors when i use the microsoft exchange web mail (OWS) which uses the webdav protocol. how to set the acl .
--------------Error Log----------------------
[07/Nov/2003:10:54:17] config: for host 192.168.103.106 trying to PROPFIND http://mymail.opentech.com.sg/exchange/Ganesh/Inbox/Alerts/, check-acl reports: access right name PROPFIND not defined
[07/Nov/2003:10:54:18] config: for host 192.168.103.106 trying to SEARCH http://mymail.opentech.com.sg/exchange/Ganesh/Inbox/Alerts/, check-acl reports: access right name SEARCH not defined
[07/Nov/2003:10:54:31] config: for host 192.168.103.106 trying to SUBSCRIBE http://mymail.opentech.com.sg/exchange/Ganesh/Inbox, check-acl reports: access right name SUBSCRIBE not defined
Thanks
Ganesh
Hey Ganesh
You need to go into the httpacl directory under proxy root.
edit the generated ACL file for ur proxy instance, viz if ur proxy instance is called XYZ edit the generated-proxy-XYZ.acl file.
You should see something l,ike the following:
ACL proxy-temp_formgen-READ-ACL_deny-2370 (GET, HEAD, POST, INDEX, CONNECT) {
Default deny anyone;
Default authenticate in {
Database "default";
Method basic;
Prompt "Please Login ";
Default allow (Test1, User1, User2);
ACL proxy-temp_formgen-WRITE-ACL_deny-2370 (PUT, DELETE, MKDIR, RMDIR, MOVE) {
Default deny anyone;
Default authenticate in {
Database "default";
Method basic;
Default allow (user3);
For the READ methods, just append the OPTIONS/PROPFIND/SEARCH/SUBSCRIBE methods as follows:
ACL proxy-temp_formgen-READ-ACL_deny-2370 (GET, HEAD, POST, INDEX, CONNECT, OPTIONS, PROPFIND, SEARCH,SUBSCRIBE)
As for Write methods:
ACL proxy-temp_formgen-WRITE-ACL_deny-2370 (PUT, DELETE, MKDIR, RMDIR, MOVE,LOCK,UNLOCK)
Basically u need to edit this file and add whatever method u want to restrict/allow.
Hope that helps
Thx
Maneesh.
Similar Messages
-
How to make entry for transit loss in the system
Hello to all,
I am having an issue with one subCon material.
Suppose,
Material A is the product required of 3000 MT Qty.
SubCon vendor have sent that qty, but there is a transit loss of 500 MT.
How to make entry for this transit loss in the system.
regards,
Anishacorrect me if i am wrong-
ur scenario is
for making material A ,
3000 MT of material B required.
but for producing A vendor uses 3500MT of B
solution : if this ia the case then u can overwrite the value of B at GRN from 3000MT to 3500MT.
OR
ur scenario is -
u require material A of 3000MT
vendor sends u 3000MT
but actualy u recieve 2500MT
and u have to pay for 3000MT as per bill
solution : if this is ur scenario then.
prerequisite-activate direct posting to G/L and material at MIRO
Path - SPRO->MM->LIV->activate direct posting to G/L and material at MIRO.
now procedure is -
step 1) do GR for 2500MT
step2) in LIV pay to vendor for 3000MT for that put 500 qty in material tab and the relavent amount.
in this way loss in transite will be book on inventory.
regards,
sujit -
Add static entry for SCAN LISTENER
Hey I am running a two node rac on grid 11.2 and db 11.2.0.3
My application does not like the scan listener, therefore I have to configure the remote listener parameter to the vips of the two hosts, which is working fine.
But it comes out the the system needs the service registered with the scan listener.
So. How can I add a static service entry for my scan listener ?
ChrisHi,
I don't understand why add static service name. Add static service name on listener is recommended only when you need connect remotely in a Inactive Instance and only to SYS user can connect or if you don't configured LOCAL and REMOTE Listener Parameter.
So, If you configure LOCAL and REMOTE Listener proper the all SERVICE NAME configured on your database will be always automatically added on all Listeners, you don't need worry about in configure the service on Listeners Manually.
With Oracle RAC you should not use the Parameter SERVICE_NAMES, you define Service Using EM or SRVCTL
http://docs.oracle.com/cd/E11882_01/server.112/e25513/initparams228.htm#REFRN10194
http://docs.oracle.com/cd/E14072_01/rac.112/e10718/hafeats.htm#BABHBDJD
Regards,
Levi Pereira -
How to maintain Entries for VIEWS in ORacle Sql developer
hi gurus,
Could you please help in maintaining an entries for VIEW is Oracle SQL develope...I have created a VIEW by name SD_WH08....now i need to maintain some entries in this for my testing purpose...how do i do this?
Your help is very much appreciated.
RegardsWhat do you mean by "maintaining an entries for VIEW" ?
K. -
How to remove entries for Enterprise Manager farm ?
I installed the Oracle 10g application server middle tier
(Forms and Report Services) on one server and made a mistake in the instance name. I deinstalled it and installed it again with the correct instance name.
Note that my infrastructure (Identity mgmt + metadata)
is on a different server.
When I start the http://localhost:1810 , the EM shows
me both the bad entry and good entry instances.
How do I get rid of the bad entry so that it does
not show up in the EM web page ?
I tried looking thru oidadmin and removing the
bad entries from Entry Management and restarting all
processes but still no luck.
Any ideas appreciated
Sam KhopkarFirst of all, make a copy of your existing targets.xml
Then modify your targets.xml
Did you do a key word search of the bad name? There should be multiple places you will need to remove. such as:
<Target TYPE="oracle_apache" NAME="bad.host_HTTP Server" DISPLAY_NAME="HTTP_Server" VERSION="2.0">
</Target>
<Target TYPE="oracle_webcache" NAME="bad.host_Web Cache" DISPLAY_NAME="Web Cache">
</Target>
<Target TYPE="oc4j" NAME="bad.host_home" DISPLAY_NAME="home" VERSION="1.3">
</Target>
<Target TYPE="oracle_bc4j" NAME="bad.host_BC4J" DISPLAY_NAME="BC4J" VERSION="9.0.4">
</Target>
<Target TYPE="oracle_ias" NAME="bad.host" VERSION="1.0">
</Target>
<Target TYPE="oc4j" NAME="bad.host_OC4J_BI_Forms" DISPLAY_NAME="OC4J_BI_Forms">
</Target>
<Target TYPE="oracle_repserv" NAME="bad.host_Reports_Server:xxxx
</Target>
and other similar cases.
Then do "emctl reload" for reloading the interface. -
How to find entries for the particular month
hi all,
I have a table ZTOS4 where i store the trips, trips created timestamp.
in my selection screen , i give the month as parameter.
now i need to select the trips created for the select month. how can i put the select query???
select trips timestamp
from ztos4
where timestamp = month ??????? (as timestamp is date and time and month is 01,02,03,....12)
how to put the where condition?????
points will be rewarded
thanks in advanceHi jayasree muthaiyan,
USE LIKE keyword in where condition of your select query...
However its better to provide the month and year both form the selection screen because there can be many years data in the table which r having same month ...
eg .. 02 then it will give Feb months data for all years say 2004 2005 .... 2008 ...
Also..
Here is the "help" for the syntax of LIKE in SELECT statement.
f NOT LIKE g
Addition:
... ESCAPE h
Effect
The condition is met for a table entry if the statement "f (does not) equal the pattern in g" is true for the values of f and g. f must always be a field descriptor, and g an ABAP field. If f has the value NULL, then the result of the check for the statement is unknown. Within a pattern, there are two special characters:
'_' (underscore) stands for any single character.
'%' (percentage sign) stands for any sequence of characters, including an empty string.
Examples
Example to select all customers whose name begins with 'M':
TABLES SCUSTOM.
SELECT ID NAME FROM SCUSTOM
INTO CORRESPONDING FIELDS OF SCUSTOM
WHERE NAME LIKE 'M%'.
WRITE: / SCUSTOM-ID, SCUSTOM-NAME.
ENDSELECT.
Example to select all customers whose name contains 'huber':
TABLES SCUSTOM.
SELECT ID NAME FROM SCUSTOM
INTO CORRESPONDING FIELDS OF SCUSTOM
WHERE NAME LIKE '%huber%'.
WRITE: / SCUSTOM-ID, SCUSTOM-NAME.
ENDSELECT.
Example to select all customers whose name does not contain 'n' as the second character:
TABLES SCUSTOM.
SELECT ID NAME FROM SCUSTOM
INTO CORRESPONDING FIELDS OF SCUSTOM
WHERE NAME NOT LIKE '_n%'.
WRITE: / SCUSTOM-ID, SCUSTOM-NAME.
ENDSELECT.
Notes
LIKE can only be used for alphanumeric database fields. In other words, table field f must have Dictionary type ACCP, CHAR, CLNT, CUKY, LCHR, NUMC, UNIT, VARC, TIMS or DATS. The comparison field g must always have type C.
The maximum length of the pattern is 2n - 1 characters, where n is the length of field f.
Trailing spaces are ignored in comparison field g. If a pattern contains trailing spaces, you must enclose it in single inverted commas ('). If your pattern is enclosed in inverted commas and you also want to include inverted commas as part of the pattern, the inverted commas in the pattern must be doubled.
You cannot use this variant in the ON addition to the FROM clause.
Hope it will solve your problem
Reward points if useful...
Thanks & Regards
ilesh 24x7 -
How to enter entries for table TVZBT
Hi,
can any one help me how to maintain payment team description in defferent languge in TVZBT table.
this table contain the following data in english
SPRAS ZTERM VTEXT
E ZA20 N 30 Due from end billing
Now i have to maintain same date in french ie
F ZA20 N 30d'f bill
how can i update.HI,
write a small program and insert it into the table .
data : wa like TVZBT.
wa-langu = 'F'.
wa-zterm = 'ZA20'.
wa-VTEXT = '30d'f bill '
insert tvzbt from wa.
is it the case that you just want to maintain only one entry of how... if its only one time one entry then i have other way of doing it with out writing the program.. please let me know -
How add Authorization check for user with assigened role for t.code-MIR4
Hi All,
Regarding authorization how to check authorizations check for user whith assigned roles for the t.code MIR4 using ABAP.
In Detail:2) All users are allowed to go to MIR4(invoice number), But ONLY for users with role: MM_RELEASE_INVOICE can proceed to do the posting.
suggest me...
Thanks,
srii..Hi Sri ,
first u need to find out in which user rules u are using this object , after that if u want to restrict users then remove create/change values from that object values .
make use of Tcode SUIM to find out all roles which are using this Object.
or
ask ur basis guy to remove authorizations to create/change....
regards
Prabhu -
Add recurring entries for days of the week
Hello,
I'm trying to setup a daily schedule for my dog walking business. I'd like to have each dog's name automaticaly listed under the day of the week which they are to walk on.
For example: "Scarlett" walks on Tuesdays, Wednesdays, and Fridays.
If B1 says "Tuesday" can I have one of the cells in that column automatically read "Scarlett" each week?
I'd like to have it so that all I have to do is put Tuesday up at the top and it automatically creates a list of my Tuesday dogs for me, Lulu, Scarlett, Mark, Dani, Zoe, Sharky, etc.Ah, those famous words, "All I have to do..."
Here's a partial solution. Unfortunately, it doesn't cover the "all I have to do" part. More about that in the description. Click the image for a larger version.
Table 1 (Data) is the table on which the name of each dog is entered (column A) and the days that dog is to be walked recorded using check box cells.
Table 2 (Index) creates a set of lookup tables from the information recoded on Data. Each table contains a column for the day listing a serial number to represent each dog scheduled to be walked that day and the column containing the names of the dogs, plus any intervening columns. The list of dogs has bee moved to the right as I was considering using VLOOKUP, which requires the search values to be listed to the left of the result values.
Tables 3 through 9 are the daily lists. These were created as a single seven-column table, then split into separate single column tables for each day.
Formulas:
Data: No formulas on this table.
Index:
A2: =IF(Data::B,MAX(A$1:A1)+1,"")
Fill down to row 10, then select A2:A11 and fill right to column G.
H2: =Data::A
H2 (enhanced): =IF(LEN(Data::A)>0,Data::A,"")
Fill down to H11
(Enhanced version prevents showing a zero on rows where no dog's name has been entered on Data.)
Days:
Make a seven column table with one header row.
A1: Sunday
Fill right to G1.
A2: =IF(ROW()-1>MAX(Index :: A),"",LOOKUP(ROW()-1,Index :: A,Index :: $H))
Fill down to A11. Select A2:A11, Fill right to column G.
Separate the table into seven single column tables, one for each day.
To do this:
Click on any cell to make the table active and show the column and row reference tabs.
Click one of the column reference tabs to select that column.
Click the same tab a second time and drag down until the column separates from the rest of the table. Continue to drag until the column is completely separated from the table, then release the mouse button.
Repeat for the rest of the columns to be separated.
Each of these tables may be placed on a separate sheet to make printing a single list easier if desired.
Regards,
Barry -
Cannot add entry for domain aliasing ...
Unable to add the entry for domain
postoffice@root >cat alias_domain.ldif
dn: dc=next-online,dc=net,o=internet
objectClass: alias
objectClass: inetDomainAlias
objectClass: top
aliasdObjectName: dc=mila,dc=com,o=internet
dc: next-online
Before adding I want to check what are the modification ...
postoffice@root >ldapmodify -a -n -v -D "cn=Directory Manager" -f alias_domain.ldif
Bind Password:
add objectClass:
alias
inetDomainAlias
top
add aliasdObjectName:
dc=mila,dc=com,o=internet
add dc:
next-online
!adding new entry dc=next-online,dc=net,o=internet
But when I actually try to add the entry It fails ...
postoffice@root >ldapmodify -a -v -D "cn=Directory Manager" -f alias_domain.ldif
Bind Password:
add objectClass:
alias
inetDomainAlias
top
add aliasdObjectName:
dc=mila,dc=com,o=internet
add dc:
next-online
adding new entry dc=next-online,dc=net,o=internet
ldap_add_s: Object class violation
Here's the entry in the errors file in the logs
[24/Feb/2004:16:51:19 -0800] - ERROR<5896> - Schema - conn=-1 op=-1 msgId=-1 - User error: Entry "dc=next-online,dc=net,o=internet", attribute "aliasedobjectname" required by object class "alias" is missingattribute "aliasedobjectname" required by object class "alias" is missing
I believe that the error message is pretty clear. you don't have all the required object classes to add this attribute to. Please check the schema guide and provisioning guide for more detail:
http://docs.sun.com/db/doc/816-6018-10
http://docs.sun.com/db/doc/816-6021-10 -
How to maintain entries in SM30
Hi,
How to maintain entries for this table FPB_LP6_R_MDT_C through SM 30?
I am facing the below Error while trying to maintain entries can anyone give me a solution.
"The maintenance dialog for FPB_LP6_R_MDT_C is incomplete or not defined".
Thanks>
Florian Kemmer wrote:
> Tho actually it doesnt look very dangerous to me.
> Most probably there is a program which creates entries in there, and the call is generic as well, since i dont get anything in the "where used"-list.
> Tho i noticed i can create entries with TA SE16N, WITHOUT giving anything like &sap_edit.
Hi Florian,
I believe if SAP does not want the table to be maintained manually it has done so for a purpose (may be i am wrong).
And for your observation on maintaining the table through SE16N this is because in the table attributes it must be "Entries can be maintained".
BR,
Suhas -
Acl Entry is not removed via KM API
Hi,
I want to update or remove an ACL Entry for a user on a certain resource.
For ex. If for a resource A, User "User1" has READ permissions, now if I want to remove these read permissions for user "User1" on this resource A, I am not able to do so using KM API.
The code which i am using for this is
resourceInfo is of Type IResource.
// Get the Acl Security manager.
IAclSecurityManager aclSecurityManager = (IAclSecurityManager) returnResourceInfo.getRepositoryManager().getSecurityManager(resourceInfo);
// Get the resourceAcl manager.
IResourceAclManager resourceAclManager = aclSecurityManager.getAclManager();
// Get the resource Acl
IResourceAcl rACl = resourceAclManager.getAcl(resourceInfo);
Here i am not having any method which remove the Acl entry for the specific user ex. "User1".
Edited by: Lokesh Malik on Nov 13, 2008 9:57 AM
Edited by: Lokesh Malik on Nov 13, 2008 12:13 PMHI Lokesh,
this might help,
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/1070413a-29e7-2a10-cc81-cdc92cdd231b
but you have to take into account that the resource can inherit the acl from the folder, so
if the ResourceAcl is null, you can create an acl and assign the permissions you want for the resource.
IResourceAcl ra = ram.getAcl(resource);
if(ra == null){
//"inherited permissions from the folder";
// instead of taking from the folder
//ra = ram.getInheritedAcl(resource);
// create your own acl
ra = ram.createAcl(resource);
ra.addOwner(resource.getContext().getUser());
// or whatever you need for this resource....
ra.removeOwner(<IUMPrincipal>);
Hope this helps
Regards
DV -
I'm a professor, and I'm trying to get my teaching schedule and office hour schedule onto my calendar without having to individually add every entry for three classes from beginning to end of semester.
Add a recurring evening in iCloud or whatever calendar that is synced to the device.
-
How can I add a new entry for determining a requirement type
Dear Friends,
How can I add a new entry for determining a requirement type
via Item Category + MRP type, I see no new entries selection.
This is in Avb Check & TOR-> TOR-> Determination of req type using transaction.
Please help.
Regards
Ravi.Availability Check and Transfer of Requirements > Transfer of Requirements > Define Requirements Types ?
Just one node above?
Never mind, you need to add entry on item category:S -
How to add mouse listener for a single row alone
I have a requirement. In a JTable when I double click a particular row the cells in the row should set to the width which I have provided.
The problem with my code is when I click fourth row in the table, the first row gets adjusted.
So how I need help is
only if I click the first row, the first row cell size should get adjusted not when I click fourth row.
Similarly if I give some cell width and height for fourth row cells, then when I double click the fourth row, the fourth should alone get adjusted and not the other rows.
Hope I have explained clearly.
How can it be achieved?
Please find below my code. Everything is hardcoded. So it may look messy. Please excuse.
// Imports
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JTextArea;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableCellRenderer;
import javax.swing.table.TableColumn;
class SimpleTableExample extends JFrame {
// Instance attributes used in this example
private JPanel topPanel;
private JTable table;
private JScrollPane scrollPane;
String data1 = "";
String data2 = "123456789ABCDEFGHIJKLMNOPQRSTUVQWXYZabcdefghijklmnopqrstuvwxyzaquickbrownfoxjumpedoverthelazydog";
int size = data2.length();
// Constructor of main frame
public SimpleTableExample() {
// Set the frame characteristics
setTitle("Simple Table Application");
setSize(400, 200);
setBackground(Color.gray);
// Create a panel to hold all other components
topPanel = new JPanel();
topPanel.setLayout(new BorderLayout());
getContentPane().add(topPanel);
// Create columns names
String columnNames[] = { "SEL", "DESIGN DATA", "PART NUMBER" };
// Create some data
String dataValues[][] = { { data1, data2, "67", "77" },
{ "", "43", "853" }, { "", "89.2", "109" },
{ "", "9033", "3092" } };
DefaultTableModel model = new DefaultTableModel(dataValues, columnNames);
model.addColumn("PART TITLE");
model.addColumn("SPECIAL INSTRUCTIONS");
table = new JTable(model) {
public boolean isCellEditable(int rowIndex, int colIndex) {
return false;
// set specific row height
table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
int colInd = 0;
TableColumn col = table.getColumnModel().getColumn(colInd);
int width = 50;
col.setPreferredWidth(width);
int colInd2 = 1;
TableColumn col2 = table.getColumnModel().getColumn(colInd2);
int width2 = 100;
col2.setPreferredWidth(width2);
int colInd3 = 2;
TableColumn col3 = table.getColumnModel().getColumn(colInd3);
int width3 = 10;
col3.setPreferredWidth(width3);
int colInd4 = 3;
TableColumn col4 = table.getColumnModel().getColumn(colInd4);
int width4 = 10;
col4.setPreferredWidth(width4);
int colInd5 = 4;
TableColumn col5 = table.getColumnModel().getColumn(colInd5);
int width5 = 10;
col5.setPreferredWidth(width5);
table.addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent e) {
if (e.getClickCount() == 2) {
JTable target = (JTable) e.getSource();
int row = target.getSelectedRow();
int column = target.getSelectedColumn();
TableColumn col1 = table.getColumnModel().getColumn(0);
col1.setPreferredWidth(50);
TableColumn col2 = table.getColumnModel().getColumn(1);
col2.setPreferredWidth(400);
table.getColumnModel().getColumn(1).setCellRenderer(
new TableCellLongTextRenderer());
table.setRowHeight(50);
TableColumn col5 = table.getColumnModel().getColumn(4);
col5.setPreferredWidth(200);
// Create a new table instance
// table = new JTable(dataValues, columnNames);
// Add the table to a scrolling pane
scrollPane = new JScrollPane(table);
topPanel.add(scrollPane, BorderLayout.CENTER);
// Main entry point for this example
public static void main(String args[]) {
// Create an instance of the test application
SimpleTableExample mainFrame = new SimpleTableExample();
mainFrame.setVisible(true);
class TableCellLongTextRenderer extends JTextArea implements TableCellRenderer {
public Component getTableCellRendererComponent(JTable table, Object value,
boolean isSelected, boolean hasFocus, int row, int column) {
this.setText((String) value);
this.setWrapStyleWord(true);
this.setLineWrap(true);
// set the JTextArea to the width of the table column
setSize(table.getColumnModel().getColumn(column).getWidth(),
getPreferredSize().height);
if (table.getRowHeight(row) != getPreferredSize().height) {
// set the height of the table row to the calculated height of the
// JTextArea
table.setRowHeight(row, getPreferredSize().height);
return this;
Edited by: 915175 on Aug 3, 2012 4:24 AMHi
Try below code. Hope this will help
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JTextArea;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableCellRenderer;
import javax.swing.table.TableColumn;
public class SimpleTableExample extends JFrame {
private JPanel topPanel;
private JTable table;
private JScrollPane scrollPane;
String data1 = "";
String data2 = "123456789ABCDEFGHIJKLMNOPQRSTUVQWXYZabcdefghijklmnopqrstuvwxyzaquickbrownfoxjumpedoverthelazydog";
int size = data2.length();
// Constructor of main frame
public SimpleTableExample() {
// Set the frame characteristics
setTitle("Simple Table Application");
setSize(400, 200);
setBackground(Color.gray);
// Create a panel to hold all other components
topPanel = new JPanel();
topPanel.setLayout(new BorderLayout());
getContentPane().add(topPanel);
// Create columns names
String columnNames[] = { "SEL", "DESIGN DATA", "PART NUMBER" };
// Create some data
String dataValues[][] = { { data1, data2, "67", "77" },
{ "", "43", "853" }, { "", "89.2", "109" },
{ "", "9033", "3092" } };
DefaultTableModel model = new DefaultTableModel(dataValues, columnNames);
model.addColumn("PART TITLE");
model.addColumn("SPECIAL INSTRUCTIONS");
table = new JTable(model) {
public boolean isCellEditable(int rowIndex, int colIndex) {
return false;
// set specific row height
table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
int colInd = 0;
TableColumn col = table.getColumnModel().getColumn(colInd);
int width = 50;
col.setPreferredWidth(width);
int colInd2 = 1;
TableColumn col2 = table.getColumnModel().getColumn(colInd2);
int width2 = 100;
col2.setPreferredWidth(width2);
int colInd3 = 2;
TableColumn col3 = table.getColumnModel().getColumn(colInd3);
int width3 = 10;
col3.setPreferredWidth(width3);
int colInd4 = 3;
TableColumn col4 = table.getColumnModel().getColumn(colInd4);
int width4 = 10;
col4.setPreferredWidth(width4);
int colInd5 = 4;
TableColumn col5 = table.getColumnModel().getColumn(colInd5);
int width5 = 10;
col5.setPreferredWidth(width5);
// Cell Render should apply on each column -- add by Rupali
for(int i=0; i< table.getColumnModel().getColumnCount(); i++){
table.getColumnModel().getColumn(i).setCellRenderer( new TableCellLongTextRenderer());
table.addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent e) {
if (e.getClickCount() == 2) {
JTable target = (JTable) e.getSource();
int row = target.getSelectedRow();
int column = target.getSelectedColumn();
setTableCellHeight(table,row,column); //Added by Rupali
TableColumn col1 = table.getColumnModel().getColumn(0);
col1.setPreferredWidth(50);
TableColumn col2 = table.getColumnModel().getColumn(1);
col2.setPreferredWidth(400);
TableColumn col5 = table.getColumnModel().getColumn(4);
col5.setPreferredWidth(200);
// Create a new table instance
// table = new JTable(dataValues, columnNames);
// Add the table to a scrolling pane
scrollPane = new JScrollPane(table);
topPanel.add(scrollPane, BorderLayout.CENTER);
* Created By Rupali
* This will set cell's height and column's width
* @param table
* @param row
* @param column
public void setTableCellHeight(JTable table, int row, int column) {
// set the JTextArea to the width of the table column
setSize(table.getColumnModel().getColumn(column).getWidth(),
getPreferredSize().height);
if (table.getRowHeight(row) != getPreferredSize().height) {
// set the height of the table row to the calculated height of the
// JTextArea
table.setRowHeight(row, getPreferredSize().height);
// Main entry point for this example
public static void main(String args[]) {
// Create an instance of the test application
SimpleTableExample mainFrame = new SimpleTableExample();
mainFrame.setVisible(true);
class TableCellLongTextRenderer extends JTextArea implements TableCellRenderer {
public Component getTableCellRendererComponent(JTable table, Object value,
boolean isSelected, boolean hasFocus, int row, int column) {
this.setText((String) value);
this.setWrapStyleWord(true);
this.setLineWrap(true);
return this;
}
Maybe you are looking for
-
CS4 Exporting and Importing Problems
Hey all, I joined this forum specifically so I could ask this question. I have been looking all around and can not find the answer. I have a Canon Vixia HF S10, with internal 32 gb memory, and am trying to import directly into Premiere Pro. Now, I
-
How can I convert an i-photo diashow
Hello I am all new to this and just created a few diashows. Now I would like to send them around to my friends (most using PC). Can you tell me how to do this - can I convert the diashow into a file that I can attach to a mail? Thanks Cat
-
Can't partition HD with Bootcamp Assistant on brand new iMac
I just got a 27" 1TB brand new iMac three days ago. After copying over all my files from my previous computer (PC), installing some software packages and configured the Mac the way I want it, yesterday I wanted to partition 80GB out of remaining 330G
-
Everything was fine on the phone until this a.m. I came home, and out the phone in the cradle so that I could sync everything, and itunes recognizes the phone, but instead of syncing, it says, "An iPhone has been previously synced with this computer"
-
No "Open" optio in IE, "Save" and "Cancel" only
I have an issue with a machine that does not give me to option to open a pdf when clicking on a link or and email pdf. I have uninstalled/reinstalled the reader and uninstalled IE7 and all the other tricks and tips generally associated with this issu