Adding images to rows in a table depending on file type
Hello,
Within Visual Composer we have a table which lists documents and contains information about the document type
i.e. description = 'This is a Word Document', file type = 'application/msword'
then I have uploaded the images (icons) for the different file types, created a 'Document Type' column (of type image) in the table and assigned the correct boolean statements to determine which icons are shown
e.g. BOOL(IF(@MIMETYPE == 'application/msword', true, false))
This is the exact steps explained in the how to: How To
Integrate BI Document Store and SAP Analytics Applications
But just does not work? It will not display the icons even though the file type (MIMETYPE) is displayed and is correct.
Any help much appreciated!
Seem to have fixed the problem.
By adding a filter before the table view it seems to allow a slight delay which allows the file types to load and the IF statements run correctly and display the correct images for the various file types.
Still seems that there is a slight Visual Composer Issue there? (but now with a work-around)
Similar Messages
-
Colouring Rows of a Table depending on a particular condition.
Hi,
The problem I am facing is coloring specific rows of a table depending on the satisfaction of a particular condtion. For example: All rows having the value in the amount column greater than 1000 have to be coloured in red and the remaining yellow.
Can anyone please help me out with this row-coloring problem?
Regards,
Gaurav.Hi Martin,
Have used an image column to display image.
You can define the condition in the URL field, to display the image. Something like:
=IF(@img=="50",store@IMAGE_URL&"Green_dot.png",IF(@img=="40",store@IMAGE_URL&"Yellow_dot.png",IF(@img=="39",store@IMAGE_URL&"Red_dot.png","")))
Where store@IMAGE_URL has the URL to the location where the images are stored.
Let me if it helps.
Regards,
Dharmi -
TYPE OR TABLE DEPENDENCY OF OBJECT TYPE (ORA-2303)
제품 : SQL*PLUS
작성날짜 : 2004-05-20
==================================================
TYPE OR TABLE DEPENDENCY OF OBJECT TYPE (ORA-2303)
==================================================
PURPOSE
Type이나 table의 dependency가 있는 type을 drop하거나 replace하고자
하면 ORA-02303 error가 난다. 이 error의 원인을 알아보도록 한다.
Explanation
Object의 attribute나 method를 수정하기 위해서는 object type을 drop하고 재생성
해야 한다. Type이나 table의 dependency가 있는 type을 drop하거나 replace하고자
하면 ORA-02303 error가 난다. Object type은 type (nested table 또는 VARRAY)
또는 object table로써 구체적으로 표현된다. 만약 data의 보존이 필요하다면
temporary table에 manual하게 옮겨놓아야 한다.
SQL Reference guide에 의하면 DROP TYPE FORCE 옵션은 recommend하지 않는다.
왜냐하면 이 옵션을 쓰게 되면 복구가 불가능하고 dependency가 있던 table들은
access하지 못하는 결과를 초래한다.
Example
아래의 query 1, 2, 3은 dependency을 확인하는 query문이다.
1. Find nested tables
select owner, parent_table_name, parent_table_column
from dba_nested_tables
where (table_type_owner, table_type_name) in
(select owner, type_name
from dba_coll_types
where elem_type_owner = '<typeOwner>'
and elem_type_name = '<typeName>');
2. Find VARRAYs
select owner, parent_table_name, parent_table_column
from dba_varrays
where (type_owner, type_name) in
(select owner, type_name
from dba_coll_types
where elem_type_owner = '<typeOwner>'
and elem_type_name = '<typeName');
3. Find object tables
select owner, table_name
from dba_object_tables
where table_type_owner = '<typeOwner>'
and table_type = '<typeName>'
and nested = 'NO';
Example ) Logon as Scott
/* Create an user defined object type */
SQL> create type object_type as object (
col1 number,
col2 varchar2(20))
Type created.
/* Create nested table type */
SQL> create type object_ntable as table of object_type
Type created.
/* Create varray type*/
SQL> create type object_varray as varray(5) of object_type
Type created.
/* Create parent table with nested table and varray */
SQL> create table master (
col1 number primary key,
col2_list object_ntable,
col3_list object_varray)
nested table col2_list store as master_col2
Table created.
/* Create object table */
SQL> create table object_table of object_type (col1 primary key)
object id primary key;
Table created.
ORA-2303 results if attempt to drop type with dependencies
SQL> drop type object_type;
drop type object_type
ERROR at line 1:
ORA-02303: cannot drop or replace a type with type or table dependents
위의 queery 1,2,3을 이용하여 object type dependency을 확인한다.
-- Find nested tables utilizing object type
SQL> select owner, parent_table_name, parent_table_column
from dba_nested_tables
where (table_type_owner, table_type_name) in
(select owner, type_name
from dba_coll_types
where elem_type_owner = 'SCOTT'
and elem_type_name = 'OBJECT_TYPE');
OWNER PARENT_TABLE_NAME PARENT_TABLE_COLUMN
SCOTT MASTER COL2_LIST
-- Find VARRAYs utilizing object type
SQL> select owner, parent_table_name, parent_table_column
from dba_varrays
where (type_owner, type_name) in
(select owner, type_name
from dba_coll_types
where elem_type_owner = 'SCOTT'
and elem_type_name = 'OBJECT_TYPE');
OWNER PARENT_TABLE_NAME PARENT_TABLE_COLUMN
SCOTT MASTER COL3_LIST
-- Find object tables
SQL> select owner, table_name
from dba_object_tables
where table_type_owner = 'SCOTT'
and table_type = 'OBJECT_TYPE'
and nested = 'NO';
OWNER TABLE_NAME
SCOTT OBJECT_TABLE
참고)
bulletin : 11576 처럼 utility을 이용하는 방법이 있다.
우리는 여기서 주의하여야 할 것은 script $ORACLE_HOME/rdbms/admin/utldtree.sql
을 내가 보고자 하는 user에서 돌려야 한다는 것이다.
$sqlplus scott/tiger
SQL> @$ORACLE_HOME/rdbms/admin/utldtree.sql
SQL> exec deptree_fill('TYPE','SCOTT','OBJECT_TYPE');
PL/SQL procedure successfully completed.
SQL> select * from ideptree;
DEPENDENCIES
TYPE SCOTT.OBJECT_TYPE
TYPE SCOTT.OBJECT_NTABLE
TABLE SCOTT.MASTER
TYPE SCOTT.OBJECT_VARRAY
TABLE SCOTT.MASTER
TABLE SCOTT.MASTER_COL2
TABLE SCOTT.OBJECT_TABLE
Reference Documents
Korean bulletin : 11576
<Note:69661.1>Hi Carsten,
Thanks for the sharp hint. It works.
However, when I create a table using the schema, it gives me this error:
varray DOC."LISTOFASSIGNEDNUMBER"."ASSIGNEDNUMBER"
ERROR at line 14:
ORA-02337: not an object type column
Here is the script:
CREATE TABLE CUSTOMMANIFEST (
ID NUMBER PRIMARY KEY,
DOC sys.XMLTYPE
xmltype column doc
XMLSCHEMA "http://www.abc.com/cm.xsd"
element "CustomManifest"
varray DOC."LISTOFMANIFESTPORTINFO"."MANIFESTPORTINFO"
store as table MANIFESTPORTINFO_TABLE
(primary key (NESTED_TABLE_ID, ARRAY_INDEX))
organization index overflow
varray DOC."LISTOFASSIGNEDNUMBER"."ASSIGNEDNUMBER"
store as table ASSIGNEDNUMBER_TABLE
(primary key (NESTED_TABLE_ID, ARRAY_INDEX))
organization index overflow
LISTOFASSIGNEDNUMBER itself is complexType and not sure where is the error....
You may note there are more than two hierachy/levels...
Thanks. -
Aperture performs adjustments in a different order depending on file type
Aperture performs Adjustments in a different order depending on file type.
Here's an example:
Starting with two copies of an image, one in RAW format (Canon CRW from a D60), the other in TIFF (opened the .crw file in Preview and exported an 8bit tiff file).
{The test image is a photo of my copy of Aperture on the floor of my studio (which, for reference, is a few points of Cyan off of a neutral grey).}
The original Image.
http://members.arstechnica.com/x/adrien/testRAW_originalImage.jpg
Adjustments
http://members.arstechnica.com/x/adrien/adjustments.jpg
The RAW file adjusted
http://members.arstechnica.com/x/adrien/testRAW_adjusted.jpg
The TIFF files adjusted
http://members.arstechnica.com/x/adrien/testTIFF_adjusted.jpg
Import both of these files (testRAW.crw & testTIFF.tiff) into Aperture.
Make adjustments to the RAW and TIFF images:
- Exposure: Saturation -> 0 (lowest possible value).
- White Balance: Temp -> 3500K (from 5000K).
It doesn't matter what order you perform these operations in.
The RAW file is now a neutral greyscale image. With the Saturation set to 0, the White Balance makes no major difference in the image, it stays grey.
The TIFF file, however, is now a blue tinted greyscale image - much like a sepia-tone effect. Moving the White Balance slider changes the color of the image.
It appears that Aperture is performing the Saturation and WB operations in a different order: for the RAW file it first performs the WB, then the saturation; while in the TIFF file it performs the saturation first, then the WB.
The result is the same for a JPEG image.
The RAW behavior is the 'expected' behavior in photography - White Balance should happen 'before' the Saturation setting.
I've filed the bug with Apple (number 4394125 at bugreport.apple.com). hopefully they'll fix this.
Cross posted from this discussion at the MacAch on ArsTechnica forums:
http://episteme.arstechnica.com/groupee/forums/a/tpc/f/8300945231/m/893007866731 /r/832001796731#832001796731Well, there are different ways of achieving this.
Solution 1:
You can create a new output type which will be triggered and call a same driver program and the new smart form. I am sure you can customize as to what Purchasing document type will trigger which output type. Get in touch with someone in the function team to get this configured.
Solution 2:
No Customizing, let the configuration be the same, but in the driver program change the value of "TNAPR-FONAM" immediately after the form entry_neu to the new form name based on the Purchasing document type. -
Problem while adding a new row to the table.
hello,
In my ADF form i have a table. and when i click on CreateInsert it add a new to the table but at the first. i want all the new rows to be added at the end of the table in a sequence. how can i do this?....
Thanks and Regards,
RakshithaHi,
Try this:
DCIteratorBinding dciter;
BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
dciter = (DCIteratorBinding) bindings.get("findAllTestAndryIter");
ViewObjectImpl vo = dciter.getViewObject();
if (vo != null)
Row row = vo.createRow();
int rangeSize = vo.getRangeSize();
int rowsInRange = vo.getAllRowsInRange().length;
int insertPos = rowsInRange < rangeSize? rowsInRange: rangeSize - 1;
vo.insertRowAtRangeIndex(insertPos, row);
vo.setCurrentRow(row);
} -
Problems with adding a new row in my table
Im an ADF beginner but I thought it would be simple to to do some basic CRUD stuff in ADF. Im now even struggling when i try to add a new row to my table.
Seems that the primary key id is not set correctly...
could someone help?Hi,
Have a look to this page CREATE SEQUENCE
Regards,
Sébastien
Creating a Sequence: Example
The following statement creates the sequence customers_seq in the sample schema oe. This sequence could be used to provide customer ID numbers when rows are added to the customers table.
CREATE SEQUENCE customers_seq START WITH 1000 INCREMENT BY 1 NOCACHE NOCYCLE; -
Problem in adding a new row in a table.. plsss hlppp
Hi Friends,
I have a table defaulted to 4 rows. I have a add button to add a new row in the table.
When i have already 4 rows in table, and when i click add its adding that 5th row correctly( and i used set_lead_selection for this new row ).
But i want to automatically make a next page once i hit the ADD button here. Each time now i m hitting next page then only able to see hte 5th row. I need once ADD is clicked, i want to see the 5th row visible..
Can someone tell me how to code or do this
thanks friends,,,
Nirajahi niraja,
Plz refer to the following code:
method onactiononadd .
node_material type ref to if_wd_context_node.
elem_material type ref to if_wd_context_element.
stru_material type sflight.
node_material = wd_context->get_child_node( name = 'ANNA' ).
elem_material = node_material->get_element( ).
if ( elem_material is initial ).
call method node_material->create_element
receiving
element = elem_material.
endif.
call method elem_material->get_static_attributes
importing
static_attributes = stru_material .
call method node_material->bind_structure
exporting
new_item = stru_material
set_initial_elements = abap_false.
endmethod.
i hope it helps
regards
arjun -
Adding and Removing Rows from a Table
So first time user here so hold on. I am creating a form in Adobe, using the LiveCycle Designer. It has help files on creating a table and having it grow as data is entered. So I create a table and follow the steps but nothing happens. Not sure what I am doing wrong here.
CustomerTable.Row1.instanceManager.addInstance(1);
This is code for my button. It is place in the first data row of the table. I inserted a subform so that I could have to buttons there.
I labeled everything accordingly (my table is called 'CustomerTable'). When I go to previeiw or save it and open as a regular pdf i will not give me more rows to enter information in. Is this syntax wrong or am I just retarded today?
BenPost your question in the LiveCycle Designer forum.
-
Hide a Row in Pivot table depending on condition
Hi , I am using pivot table which is in below format.
I--------------------date 1 | date 2 | date 3| new calculated item
measure 1 v1 v2 v3 v4
measure 2 v5 v6 v7 v8
measure 3 v9 v10 v11 v12
measure 4 v13 v14 v15 v16
now i need to hide the date 2 (ie v2 v6,v10,v14) column in the pivot table ( which is actually a value in a row for a column named as_of_date)
is this possible.
please let me know the solution.Thanks @mma
i am unable to pass that {val1} exactly
here my scenario is, i have
year prompt and quarter prompt
depending on year prompt ,quarter prompt is populated with 4 dates
now i need to pass the max and min values of dates
to the asofdate.
please explain me this scenario.
thanks -
Adding 2 different rows in the Table in JSF
Hi All,
How can I acheive this in JSF
Let me explain my requirement:
Consider a simple table which is displaying rows.
It has columns say col1->colId and col2->colName.
Id Name
1 kk
2 jjNow on clicking the colId of row1, another row say row001should be embedded in between row1 and row2. Now this row001 should contain 3 columns each having 2 rows.
Id Name
1 kk
DOB ABC Curr Yen
Nation EUR State Thames
2 jj
So the extra details such as DOB, Nation, Curr and state are hidden for id and is displayed only when user clicks Id and collapse when user clicks id again
Don't forget I am novice to JSF :(What you need is a tree.
See Tomahawk (www.myfaces.org) -
Static list from table depending on user type
All i have a table where i define users and their roles, and i want to setup a static list that would display something like the following, but i want to filter depending on the users role
so if the user is lets say part of dev then i want them to see
So my table contains
pending,completed,work, accepeted, approved
pending,completed,work
And if they are part of business then to see
accepeted, approved, pending.
And in my select list i am doing the following select * from mytable.Hi Ben,
to my knowledge it's not possible to change or restrict a static list on the fly.
Why don't you create a table for your static values? Than you are able to restrict the select list. And you even get a useful description when you use your table somewhere else and want to know in which status it is.
Patrick
Check out my APEX-blog: http://inside-apex.blogspot.com -
Problem of deletion of rows in jtable, table refreshing too
Hi,
I have a table with empty rows in the beginning with some custom properties( columns have fixed width...), later user would be adding to the rows to this table and can delete, I've a problem while deleting the rows from table,
When a selected row is deleted the model is also deleting the data but the table(view) is not refreshed.
Actually i'm selecting a cell of a row, then hitting the delete button.
So the model is deleting the information, but i'm not able to c the fresh data in table( especially when the last cell of last row is selectd and hit the delete button, i am getting lots of exception)
Kindly copy the below code and execute it, and let me know,
* AuditPanel.java
* Created on August 30, 2002, 3:05 AM
import javax.swing.*;
import java.awt.*;
import javax.swing.table.*;
import java.awt.event.*;
import javax.swing.event.*;
import java.util.Vector;
* @author yaman
public class AuditPanel extends javax.swing.JPanel {
// These are the combobox values
private String[] acceptenceOptions;
private Vector colNames;
private Color rowSelectionBackground = Color.yellow;
private int rowHeight = 20;
private int column0Width =70;
private int column1Width =96;
private int column2Width =327;
private javax.swing.JPanel jPanel2;
private javax.swing.JPanel jPanel1;
private javax.swing.JButton jButton2;
private javax.swing.JButton jButton1;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JTable jTable1;
/** Creates new form AuditPanel */
public AuditPanel() {
public void renderPanel(){
initComponents();
public String[] getAcceptenceOptions(){
return acceptenceOptions;
public void setAcceptenceOptions(String[] acceptenceOptions){
this.acceptenceOptions = acceptenceOptions;
public Vector getColumnNames(){
return colNames;
public void setColumnNames(Vector colNames){
this.colNames = colNames;
public Vector getData(){
Vector dataVector = new Vector();
/*dataVector.add(null);
dataVector.add(null);
dataVector.add(null);
return dataVector;
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
private void initComponents() {
java.awt.GridBagConstraints gridBagConstraints;
jPanel2 = new javax.swing.JPanel();
jButton1 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
jPanel1 = new javax.swing.JPanel();
jTable1 = new javax.swing.JTable();
setLayout(new java.awt.GridBagLayout());
setBorder(new javax.swing.border.EmptyBorder(0,0,0,0));
jPanel2.setLayout(new java.awt.GridBagLayout());
jPanel2.setBorder(new javax.swing.border.EmptyBorder(0,0,0,0));
jButton1.setText("Add");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.ipadx = 8;
gridBagConstraints.insets = new java.awt.Insets(0, 1, 5, 0);
gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
jPanel2.add(jButton1, gridBagConstraints);
jButton2.setText("Delete");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 1;
gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
jPanel2.add(jButton2, gridBagConstraints);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 2;
gridBagConstraints.gridy = 0;
gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
add(jPanel2, gridBagConstraints);
jPanel1.setLayout(new java.awt.GridBagLayout());
jPanel1.setBorder(new javax.swing.border.BevelBorder(javax.swing.border.BevelBorder.LOWERED, Color.black, Color.gray) );
jTable1.setModel(new javax.swing.table.DefaultTableModel(getData(), getColumnNames()));
// get all the columns and set the column required properties
java.util.Enumeration enum = jTable1.getColumnModel().getColumns();
while (enum.hasMoreElements()) {
TableColumn column = (TableColumn)enum.nextElement();
if( column.getModelIndex() == 0 ) {
column.setPreferredWidth(column0Width);
column.setCellEditor( new ValidateCellDataEditor(true) );
if( column.getModelIndex() == 1) {
column.setPreferredWidth(column1Width);
column.setCellEditor(new AcceptenceComboBoxEditor(getAcceptenceOptions()));
// If the cell should appear like a combobox in its
// non-editing state, also set the combobox renderer
//column.setCellRenderer(new AcceptenceComboBoxRenderer(getAcceptenceOptions()));
if( column.getModelIndex() == 2 ) {
column.setPreferredWidth(column2Width); // width of column
column.setCellEditor( new ValidateCellDataEditor(false) );
jScrollPane1 = new javax.swing.JScrollPane(jTable1);
jScrollPane1.setPreferredSize(new java.awt.Dimension(480, 280));
jTable1.setMinimumSize(new java.awt.Dimension(60, 70));
//jTable1.setPreferredSize(new java.awt.Dimension(300, 70));
//jScrollPane1.setViewportView(jTable1);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
jPanel1.add(jScrollPane1, gridBagConstraints);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 0;
add(jPanel1, gridBagConstraints);
// set the row height
jTable1.setRowHeight(rowHeight);
// set selection color
jTable1.setSelectionBackground(rowSelectionBackground);
// set the single selection
jTable1.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
// avoid table header to resize/ rearrange
jTable1.getTableHeader().setReorderingAllowed(false);
jTable1.getTableHeader().setResizingAllowed(false);
// Table header font
jTable1.getTableHeader().setFont( new Font( jTable1.getFont().getName(),Font.BOLD,jTable1.getFont().getSize() ) );
jButton1.setMnemonic(KeyEvent.VK_A);
// action of add button
jButton1.addActionListener( new ActionListener(){
public void actionPerformed(ActionEvent actionEvent){
// If a button press is the trigger to leave a JTable cell and save the data in model
if(jTable1.isEditing() ){
//System.out.println("table is edition ");
String text=((javax.swing.text.JTextComponent)jTable1.getEditorComponent()).getText();
jTable1.setValueAt(text,jTable1.getSelectedRow(),jTable1.getSelectedColumn()) ;
jTable1.getCellEditor().cancelCellEditing();
// find out total available rows
int totalRows = jTable1.getRowCount();
int cols = jTable1.getModel().getColumnCount();
if( jTable1.getModel() instanceof DefaultTableModel ) {
((DefaultTableModel)jTable1.getModel()).addRow(new Object[cols]);
int newRowCount = jTable1.getRowCount();
// select the first row
jTable1.getSelectionModel().setSelectionInterval(newRowCount-1,newRowCount-1);
jButton2.setMnemonic(KeyEvent.VK_D);
// action of Delete button
jButton2.addActionListener( new ActionListener(){
public void actionPerformed(ActionEvent actionEvent){
int totalRows = jTable1.getRowCount();
// If there are more than one row in table then delete it
if( totalRows > 0){
int selectedOption = JOptionPane.showConfirmDialog(null,"Are you sure you want to delete this audit row?","Coeus", JOptionPane.YES_NO_OPTION);
// if Yes then selectedOption is 0
// if No then selectedOption is 1
if(0 == selectedOption ){
// get the selected row
int selectedRow = jTable1.getSelectedRow();
System.out.println("Selected Row "+selectedRow);
if( selectedRow != -1 ){
DefaultTableModel dm= (DefaultTableModel)jTable1.getModel();
java.util.Vector v1=dm.getDataVector();
System.out.println("BEFOE "+v1);
v1.remove(selectedRow);
jTable1.removeRowSelectionInterval(selectedRow,selectedRow);
System.out.println("After "+v1);
}else{
// show the error message
JOptionPane.showMessageDialog(null, "Please Select an audit Row", "Coeus", JOptionPane.ERROR_MESSAGE);
} // end of initcomponents
class AcceptenceComboBoxRenderer extends JComboBox implements TableCellRenderer {
public AcceptenceComboBoxRenderer(String[] items) {
super(items);
public Component getTableCellRendererComponent(JTable table, Object value,
boolean isSelected, boolean hasFocus, int row, int column) {
if (isSelected) {
setForeground(table.getSelectionForeground());
super.setBackground(rowSelectionBackground);
} else {
setForeground(table.getForeground());
setBackground(table.getBackground());
// Select the current value
setSelectedItem(value);
return this;
class AcceptenceComboBoxEditor extends DefaultCellEditor {
public AcceptenceComboBoxEditor(String[] items) {
super(new JComboBox(items));
} // end editor class
public class ValidateCellDataEditor extends AbstractCellEditor implements TableCellEditor {
// This is the component that will handle the editing of the
// cell value
JComponent component = new JTextField();
boolean validate;
public ValidateCellDataEditor(boolean validate){
this.validate = validate;
// This method is called when a cell value is edited by the user.
public Component getTableCellEditorComponent(JTable table, Object value,
boolean isSelected, int rowIndex, int vColIndex) {
if (isSelected) {
component.setBackground(rowSelectionBackground);
// Configure the component with the specified value
JTextField tfield =(JTextField)component;
// if any vaidations to be done for this cell
if(validate){
//tfield.setDocument(new JTextFieldFilter(JTextFieldFilter.NUMERIC,4));
tfield.setText( ((String)value));
// Return the configured component
return component;
// This method is called when editing is completed.
// It must return the new value to be stored in the cell.
public Object getCellEditorValue() {
return ((JTextField)component).getText();
// This method is called just before the cell value
// is saved. If the value is not valid, false should be returned.
public boolean stopCellEditing() {
String s = (String)getCellEditorValue();
return super.stopCellEditing();
public void itemStateChanged(ItemEvent e) {
super.fireEditingStopped();
}//end of ValidateCellDataEditor class
public static void main(String args[]){
JFrame frame = new JFrame();
AuditPanel auditPanel = new AuditPanel();
frame.getContentPane().add(auditPanel);
auditPanel.setAcceptenceOptions(new String[]{"Accepted", "Rejected", "Requested"} );
java.util.Vector colVector = new java.util.Vector();
colVector.add("Fiscal Year");
colVector.add("Audit Accepted");
colVector.add("Comment" );
auditPanel.setColumnNames( colVector);
auditPanel.renderPanel();
frame.pack();
frame.show();Hi,
I've got the solution for it. As when the cursor is in cell of
a row and hit the delete button, the data in that cell is not saved,
So i'm trying to save the data first into the model then firing the action event by doing this ..
jButton2.addActionListener( new ActionListener(){
public void actionPerformed(ActionEvent actionEvent){
// If a button press is the trigger to leave a JTable cell and save the data in model
if(jTable1.isEditing() ){
String text=((javax.swing.text.JTextComponent)jTable1.getEditorComponent()).getText();
jTable1.setValueAt(text,jTable1.getSelectedRow(),jTable1.getSelectedColumn()) ;
jTable1.getCellEditor().cancelCellEditing();
// HERE DO THE DELETE ROW OPERATION
<yaman/> -
Hello,
I am using jdev 11.1.2.4.0...
The requirement is that users would like to upload images from their local drive to server drive and they would like display images from server drive later.
We don't want to keep images in database. I am not sure what the solution should be; however, I plan to ....
1. create a table to keep an information of images -- image_id, image_location (server drive), image_filename
2. create a page where users can enter image information and specific filename from a local drive (I think I will use inputFile component) and provide the preview button to display an image on screen before save it. To save data is to save information to the database and copy an image file to the server drive (the destination location for image files is predefined.)
3. create another page where users can browse information from the database and display an image for a selected record by getting from the server.
I need suggestions on...
1. how to display an image on page from the local drive?
2. how to copy a file from a local drive to a server?
3. how to display an image on page from the server drive?
Thank you.
natSee:
http://tompeez.wordpress.com/2011/11/26/jdev11-1-2-1-0-handling-imagesfiles-in-adf-part-1/
http://tompeez.wordpress.com/2011/11/26/jdev11-1-2-1-0-handling-imagesfiles-in-adf-part-2/
http://tompeez.wordpress.com/2011/12/16/jdev11-1-2-1-0-handling-imagesfiles-in-adf-part-3/
Where Timo saves images to the database, you save it to the file system (examples on how to do this from Java are available plenty if you just Google for it). Similar to Timo you then use the image tag to display images. The difference is that you can directly add the URL from the database table.
The benefit of using a database to host images is that you are not dependent on file server structures though
Frank -
Changing The Preview Image for File Types
Is there any way for me to change the image that shows up as the preview for file types? For example, I use OpenOffice and all my .doc files show up as blank pages of paper, which I don't like. I've tried to change this to no avail, from using the "Get Info" window to within the program itself. Any help?
If you have an image that you want to use, do a Get Info on it, select the image at the top of the box and then copy from the Edit menu. Then on your OpenOffice document do a Get Info and paste the image into the little image icon at the top of the Get Info box.
-
Not able to create rows in a table with dependent columns in an OAF page.
We have a table in an OAF page which has the property "Records Displayed" set as "10". Hence pagination kicks in for more than 10 rows in the table. "Add rows" is enabled in this table. The table also has 'detail' component.
In this table, we have created 2 new columns (dropdowns) using personalization. Dropdown 2 is dependent on the value selected in Dropdown1. Both are required fields.
We are able to add new rows to the table. All the columns render properly. Dropdown 2 also renders properly depending on the values selected in Dropdown1. There is no issue until we add the 10th row (remember the number of displayed records in the tabble is 10). When we add the 10th row, the fields appear properly. Dropdown1 values are displayed as expected. But when we select a value in Dropdown1, Dropdown2 does not refresh and get populated with the expected values (depending on Dropdown1 values). Dropdown2 remains blank. But this happens only when the 10th row is added. Since Dropdown2 is a required field and since Dropdown2 is not refreshed with values depending on Dropdown1, the records cannot be saved.
There seems to be a problem with refresh when the nth row is added to the table where 'n' is the Records displayed in the table (pagination).
If we change the Records Displayed to say 15 then we have the above problem when adding the 15th row. 14 rows can added to the table without an issue.
Can a workaround (other than increasing the number of displayed records) be provided for this issue?Hi,
I suspect you have written a method having String return type but the method does not have return statement.
Go to the Catalogue component->BPM Object->Right click on the BPM object and select New Method->Give the method name. Now the method window will be opened. Go to the propertied tab of the right most panel. Set the return type as string. In the method window editor write your business logic. The below mentioned code is for sample one.
String msg = "Hello World";
return msg;
Bibhu
Maybe you are looking for
-
Native SQL string in Receiver JDBC
Hi All, I have a requirement where in i have to make us of message protocol : Native SQL String . SDN explanation is as follow : When inserting a line into a table the corresponding document looks as follows:* "INSERT INTO tableName (column-name1, c
-
Step Through a List of .p12 Certificates and Their Passwords to Extract Property Data
This is a follow-up question to my previous thread: http://social.technet.microsoft.com/Forums/en-US/58ca3098-e06d-419a-9465-1ae7973e1c04/extract-p12-property-information-via-powershell?forum=ITCG I understand how to extract the information for a cer
-
I can't watch received video messages on iPhone
Someone in a group message sends a phone number to call a client - there doesn't seem to be a way to copy the phone number to the iphone dialer, or to tap the number to call from iphone, or even to tap to call from skype if we had skype credit. Is th
-
Unresponsive itunes on Windows Vista
I Just finished backing up my entire itunes library to disc so I can retrieve the much needed space. I would like to down load it to windows vista on an HP laptop. I was able to down load 5 of the 19 discs before everything in itunes froze. I tried r
-
Interactive form in WD4A - dynamic table - adding rows
Hi, I have a problem with dynamic table in WD4A. User can add row to table by clicking a button on form, but added rows are not transfered to mapped context node in my web dynpro application. I have made a lot of searches on SDN and I have found a lo