Problem in Adding a column
Hi All,
I have to added a segment Previous Department from Further Previous Employer Information DFF, so for I have added a column in Employment History section in iRecruitment named as Department through personalize page link also added a flex (Dept) where I am getting confuse and don't know how to configure this with DFF and its segment , can any body help me out , its urgent
Regards,
set fnd: diagnostics to 'Yes'
You can see detailed error message.
You can browse the page in the functional administrator responsibility and disable or delete personalizations.
--Prasanna
Similar Messages
-
Problems with Adding Fields/Columns to Crosstab in XI
Post Author: ph03nix
CA Forum: General
I am having problems with formatting a crosstab report in CRXI and am hoping that someone has a solution.
The crosstab report is a subreport, and requires the following columns, grouped by Firm (also not working optimally, but at least working):
Evaluator, Factor1Rate,[Factor2Rate, .., FactorNRate], Summary, UpdateDate, UpdatedBy
Where:
Evaluator is the person that did the evaluation that resulted in each rating (formula field)
Factor1Rate, etc, may have one, many, or all of these be applicable - there can be up to 15 of these. Each FactorRate column is to display the "rating" given by the Evaluator in the corresponding row/column (this much works). The table heading is a formula, but the corresponding rate is not.
Summary should display "Complete" if and only if there is a Comment field (not displayed) filled out for each FactorNRate that has a value of 0, 1 or 5 - otherwise it is blank
DateEntered is one of 2 fields ("last_updated" , or "creation_date" if last_updated is null - a formula field)
UpdatedBy is the last name of the person who last touched the ratings (formula field)
I have gotten the FactorRates to display in the headers, and gotten the corresponding rates to display underneath them, but I cannot seem to add any other columns to the report - they are either added as headers with the factor_rating columns repeated as subgroups (with incorrect data), or are added under existing headers with duplicates of the ratings. I just want to add one column for each field as if it were a normal (non-crosstab) table.
TIA!the 3 last files
Attachments:
Z1&Z2.vi 19 KB
tau_inn (SubVI).vi 16 KB
tau_ut (SubVI).vi 10 KB -
AdvancedDataGrid problem with programmatically adding a column
Hi everybody,
I have a Problem with adding columns programmatically to a AdvancedDataGrid. The code:
var cols:Array = thisDataGrid.columns;
cols.push(dgc);
thisDataGrid.columns = cols;
does create a column, adds it to the cols array, bot the last code line has no effect. The cols wont be found in the thisDataGrid.columns property...
What could be the problem? I'm working with a test license, and on the advanceddatagrid the watermark shows up. Could this be a problem?
Thanks for help!
MarkusAs the columns property of an adg is bindable, you could try to bind it to an array and afterwards, add columns to that array:
AS:
[Bindable]
private var adgCols:Array = new Array();
private function addCol():void
var myCol:AdvancedDataGridColumn = new AdvancedDataGridColumn();
myCol.headerText = "test";
myCol.dataField = "v1";
adgCols.push(myCol);
MXML:
<mx:AdvancedDataGrid id="adg" designViewDataType="flat" columns="{adgCols}"/>
This helps?
Dany -
JTable sorting - problem when adding elements (complete code inside)
I�m writing this email with reference to a recent posting here but this time with the code example. (I apologize for the duplicated posting � this time it will be with the code)
Problem: when adding more elements to the JTable (sorted) the exception: ArrayIndexOutOfBoundsException is thrown.
Example: If the elements in the table are 10 and then the user requests for 8 � the table will produce the correct result. However, if the user will ask for 11 items (>10) the exception will be thrown.
The program: The program below (compiles and running). A JTable is constructed with 3 items, when you click the button - the return result should be 4 items - this will generate the error, WHY?
I would highly appreciate your thoughts why this is happening and most importantly � how to fix it.
Thanks a lot
3 files:
(1) TableSorterDemo
(2) Traveler
(3)TableSorter
//TableSorterDemo:
package sorter;
import javax.swing.DefaultListModel;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.table.AbstractTableModel;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
* TableSorterDemo is like TableDemo, except that it
* inserts a custom model -- a sorter -- between the table
* and its data model. It also has column tool tips.
public class TableSorterDemo implements ActionListener
private JPanel superPanel;
private JButton clickMe = new JButton("click me to get diff data");
private boolean DEBUG = false;
private DefaultListModel defaultListModel;
private JTable table;
public TableSorterDemo()
superPanel = new JPanel(new BorderLayout());
defaultListModel = new DefaultListModel();
init1();
TableSorter sorter = new TableSorter(new MyTableModel(defaultListModel)); //ADDED THIS
table = new JTable(sorter); //NEW
sorter.setTableHeader(table.getTableHeader()); //ADDED THIS
table.setPreferredScrollableViewportSize(new Dimension(500, 70));
//Set up tool tips for column headers.
table.getTableHeader().setToolTipText(
"Click to specify sorting; Control-Click to specify secondary sorting");
//Create the scroll pane and add the table to it.
JScrollPane scrollPane = new JScrollPane(table);
//Add the scroll pane to this panel.
superPanel.add("Center", scrollPane);
superPanel.add("South",clickMe);
clickMe.addActionListener(this);
public JPanel getPanel()
return superPanel;
public void init1()
//in real life this will be done from the db
Traveler a = new Traveler();
Traveler b = new Traveler();
Traveler c = new Traveler();
a.setFirstName("Elvis");
a.setLastName("Presley");
a.setSprot("Ping Pong");
a.setNumYears(3);
a.setVegetarian(true);
b.setFirstName("Elton");
b.setLastName("John");
b.setSprot("Soccer");
b.setNumYears(2);
b.setVegetarian(true);
c.setFirstName("shaquille");
c.setLastName("oneil");
c.setSprot("Golf");
c.setNumYears(22);
c.setVegetarian(true);
defaultListModel.addElement(a);
defaultListModel.addElement(b);
defaultListModel.addElement(c);
public void init2()
//in real life this will be done from the db
Traveler d = new Traveler();
Traveler e = new Traveler();
Traveler f = new Traveler();
Traveler g = new Traveler();
d.setFirstName("John");
d.setLastName("Smith");
d.setSprot("Tennis");
d.setNumYears(32);
d.setVegetarian(true);
e.setFirstName("Ron");
e.setLastName("Cohen");
e.setSprot("Baseball");
e.setNumYears(12);
e.setVegetarian(true);
f.setFirstName("Donald");
f.setLastName("Mac Novice");
f.setSprot("Vallyball");
f.setNumYears(1);
f.setVegetarian(true);
g.setFirstName("Eithan");
g.setLastName("Superstar");
g.setSprot("Vallyball");
g.setNumYears(21);
g.setVegetarian(true);
defaultListModel.addElement(d);
defaultListModel.addElement(e);
defaultListModel.addElement(f);
defaultListModel.addElement(g);
class MyTableModel extends AbstractTableModel
private DefaultListModel myModel;
public MyTableModel(DefaultListModel m)
myModel=m;
private String[] columnNames = {"First Name",
"Last Name",
"Sport",
"# of Years",
"Vegetarian"};
public int getColumnCount()
return columnNames.length;
public int getRowCount()
return myModel.size();
public String getColumnName(int column)
return getNames()[column];
public String[] getNames()
String[] names = {"First Name", "Last Name", "Sport", "# of Years", "Vegetarian"};
return names;
public Object getValueAt(int row, int col)
return distributeObjectsInTable(row, col, (Traveler) myModel.elementAt(row));
public Object distributeObjectsInTable(int row, int col, Traveler tr)
switch(col)
case 0:
return tr.getFirstName();
case 1:
return tr.getLastName();
case 2:
return tr.getSprot();
case 3:
return new Integer(tr.getNumYears());
case 4:
return new Boolean (tr.isVegetarian());
default:
return "Error";
public Class getColumnClass(int c)
return getValueAt(0, c).getClass();
private static void createAndShowGUI()
//Make sure we have nice window decorations.
JFrame.setDefaultLookAndFeelDecorated(true);
//Create and set up the window.
JFrame frame = new JFrame("TableSorterDemo");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//Create and set up the content pane.
TableSorterDemo newContentPane = new TableSorterDemo();
newContentPane.getPanel().setOpaque(true); //content panes must be opaque
frame.setContentPane(newContentPane.getPanel());
//Display the window.
frame.pack();
frame.setVisible(true);
public static void main(String[] args)
//Schedule a job for the event-dispatching thread:
//creating and showing this application's GUI.
javax.swing.SwingUtilities.invokeLater(new Runnable()
public void run()
createAndShowGUI();
public void actionPerformed(ActionEvent ae)
if (ae.getSource()==clickMe)
defaultListModel.removeAllElements();
init2(); //if the size of the model was less than 2 items - the result will be ok.
//in other words, if you commens the last 2 rows of this method (addElement(f) & g)
// the result will be fine.
table.updateUI();
}//(2) Traveler
package sorter;
public class Traveler
private String firstName;
private String lastName;
private String sprot;
private int numYears;
private boolean vegetarian;
public String getFirstName()
return firstName;
public String getLastName()
return lastName;
public int getNumYears()
return numYears;
public String getSprot()
return sprot;
public boolean isVegetarian()
return vegetarian;
public void setFirstName(String firstName)
this.firstName = firstName;
public void setLastName(String lastName)
this.lastName = lastName;
public void setNumYears(int numYears)
this.numYears = numYears;
public void setSprot(String sprot)
this.sprot = sprot;
public void setVegetarian(boolean vegetarian)
this.vegetarian = vegetarian;
}//(3)TableSorter
package sorter;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import java.util.List;
import javax.swing.*;
import javax.swing.event.TableModelEvent;
import javax.swing.event.TableModelListener;
import javax.swing.table.*;
public class TableSorter extends AbstractTableModel {
protected TableModel tableModel;
public static final int DESCENDING = -1;
public static final int NOT_SORTED = 0;
public static final int ASCENDING = 1;
private static Directive EMPTY_DIRECTIVE = new Directive(-1, NOT_SORTED);
public static final Comparator COMPARABLE_COMAPRATOR = new Comparator() {
public int compare(Object o1, Object o2) {
return ((Comparable) o1).compareTo(o2);
public static final Comparator LEXICAL_COMPARATOR = new Comparator() {
public int compare(Object o1, Object o2) {
return o1.toString().compareTo(o2.toString());
private Row[] viewToModel;
private int[] modelToView;
private JTableHeader tableHeader;
private MouseListener mouseListener;
private TableModelListener tableModelListener;
private Map columnComparators = new HashMap();
private List sortingColumns = new ArrayList();
public TableSorter() {
this.mouseListener = new MouseHandler();
this.tableModelListener = new TableModelHandler();
public TableSorter(TableModel tableModel) {
this();
setTableModel(tableModel);
public TableSorter(TableModel tableModel, JTableHeader tableHeader) {
this();
setTableHeader(tableHeader);
setTableModel(tableModel);
private void clearSortingState() {
viewToModel = null;
modelToView = null;
public TableModel getTableModel() {
return tableModel;
public void setTableModel(TableModel tableModel) {
if (this.tableModel != null) {
this.tableModel.removeTableModelListener(tableModelListener);
this.tableModel = tableModel;
if (this.tableModel != null) {
this.tableModel.addTableModelListener(tableModelListener);
clearSortingState();
fireTableStructureChanged();
public JTableHeader getTableHeader() {
return tableHeader;
public void setTableHeader(JTableHeader tableHeader) {
if (this.tableHeader != null) {
this.tableHeader.removeMouseListener(mouseListener);
TableCellRenderer defaultRenderer = this.tableHeader.getDefaultRenderer();
if (defaultRenderer instanceof SortableHeaderRenderer) {
this.tableHeader.setDefaultRenderer(((SortableHeaderRenderer) defaultRenderer).tableCellRenderer);
this.tableHeader = tableHeader;
if (this.tableHeader != null) {
this.tableHeader.addMouseListener(mouseListener);
this.tableHeader.setDefaultRenderer(
new SortableHeaderRenderer(this.tableHeader.getDefaultRenderer()));
public boolean isSorting() {
return sortingColumns.size() != 0;
private Directive getDirective(int column) {
for (int i = 0; i < sortingColumns.size(); i++) {
Directive directive = (Directive)sortingColumns.get(i);
if (directive.column == column) {
return directive;
return EMPTY_DIRECTIVE;
public int getSortingStatus(int column) {
return getDirective(column).direction;
private void sortingStatusChanged() {
clearSortingState();
fireTableDataChanged();
if (tableHeader != null) {
tableHeader.repaint();
public void setSortingStatus(int column, int status) {
Directive directive = getDirective(column);
if (directive != EMPTY_DIRECTIVE) {
sortingColumns.remove(directive);
if (status != NOT_SORTED) {
sortingColumns.add(new Directive(column, status));
sortingStatusChanged();
protected Icon getHeaderRendererIcon(int column, int size) {
Directive directive = getDirective(column);
if (directive == EMPTY_DIRECTIVE) {
return null;
return new Arrow(directive.direction == DESCENDING, size, sortingColumns.indexOf(directive));
private void cancelSorting() {
sortingColumns.clear();
sortingStatusChanged();
public void setColumnComparator(Class type, Comparator comparator) {
if (comparator == null) {
columnComparators.remove(type);
} else {
columnComparators.put(type, comparator);
protected Comparator getComparator(int column) {
Class columnType = tableModel.getColumnClass(column);
Comparator comparator = (Comparator) columnComparators.get(columnType);
if (comparator != null) {
return comparator;
if (Comparable.class.isAssignableFrom(columnType)) {
return COMPARABLE_COMAPRATOR;
return LEXICAL_COMPARATOR;
private Row[] getViewToModel() {
if (viewToModel == null) {
int tableModelRowCount = tableModel.getRowCount();
viewToModel = new Row[tableModelRowCount];
for (int row = 0; row < tableModelRowCount; row++) {
viewToModel[row] = new Row(row);
if (isSorting()) {
Arrays.sort(viewToModel);
return viewToModel;
public int modelIndex(int viewIndex)
return getViewToModel()[viewIndex].modelIndex;
private int[] getModelToView()
if (modelToView == null) {
int n = getViewToModel().length;
modelToView = new int[n];
for (int i = 0; i < n; i++) {
modelToView[modelIndex(i)] = i;
return modelToView;
// TableModel interface methods
public int getRowCount() {
return (tableModel == null) ? 0 : tableModel.getRowCount();
public int getColumnCount() {
return (tableModel == null) ? 0 : tableModel.getColumnCount();
public String getColumnName(int column) {
return tableModel.getColumnName(column);
public Class getColumnClass(int column) {
return tableModel.getColumnClass(column);
public boolean isCellEditable(int row, int column) {
return tableModel.isCellEditable(modelIndex(row), column);
public Object getValueAt(int row, int column) {
return tableModel.getValueAt(modelIndex(row), column);
public void setValueAt(Object aValue, int row, int column) {
tableModel.setValueAt(aValue, modelIndex(row), column);
// Helper classes
private class Row implements Comparable {
private int modelIndex;
public Row(int index) {
this.modelIndex = index;
public int compareTo(Object o) {
int row1 = modelIndex;
int row2 = ((Row) o).modelIndex;
for (Iterator it = sortingColumns.iterator(); it.hasNext();) {
Directive directive = (Directive) it.next();
int column = directive.column;
Object o1 = tableModel.getValueAt(row1, column);
Object o2 = tableModel.getValueAt(row2, column);
int comparison = 0;
// Define null less than everything, except null.
if (o1 == null && o2 == null) {
comparison = 0;
} else if (o1 == null) {
comparison = -1;
} else if (o2 == null) {
comparison = 1;
} else {
comparison = getComparator(column).compare(o1, o2);
if (comparison != 0) {
return directive.direction == DESCENDING ? -comparison : comparison;
return 0;
private class TableModelHandler implements TableModelListener {
public void tableChanged(TableModelEvent e) {
// If we're not sorting by anything, just pass the event along.
if (!isSorting()) {
clearSortingState();
fireTableChanged(e);
return;
// If the table structure has changed, cancel the sorting; the
// sorting columns may have been either moved or deleted from
// the model.
if (e.getFirstRow() == TableModelEvent.HEADER_ROW) {
cancelSorting();
fireTableChanged(e);
return;
// We can map a cell event through to the view without widening
// when the following conditions apply:
// a) all the changes are on one row (e.getFirstRow() == e.getLastRow()) and,
// b) all the changes are in one column (column != TableModelEvent.ALL_COLUMNS) and,
// c) we are not sorting on that column (getSortingStatus(column) == NOT_SORTED) and,
// d) a reverse lookup will not trigger a sort (modelToView != null)
// Note: INSERT and DELETE events fail this test as they have column == ALL_COLUMNS.
// The last check, for (modelToView != null) is to see if modelToView
// is already allocated. If we don't do this check; sorting can become
// a performance bottleneck for applications where cells
// change rapidly in different parts of the table. If cells
// change alternately in the sorting column and then outside of
// it this class can end up re-sorting on alternate cell updates -
// which can be a performance problem for large tables. The last
// clause avoids this problem.
int column = e.getColumn();
if (e.getFirstRow() == e.getLastRow()
&& column != TableModelEvent.ALL_COLUMNS
&& getSortingStatus(column) == NOT_SORTED
&& modelToView != null) {
int viewIndex = getModelToView()[e.getFirstRow()];
fireTableChanged(new TableModelEvent(TableSorter.this,
viewIndex, viewIndex,
column, e.getType()));
return;
// Something has happened to the data that may have invalidated the row order.
clearSortingState();
fireTableDataChanged();
return;
private class MouseHandler extends MouseAdapter {
public void mouseClicked(MouseEvent e) {
JTableHeader h = (JTableHeader) e.getSource();
TableColumnModel columnModel = h.getColumnModel();
int viewColumn = columnModel.getColumnIndexAtX(e.getX());
int column = columnModel.getColumn(viewColumn).getModelIndex();
if (column != -1) {
int status = getSortingStatus(column);
if (!e.isControlDown()) {
cancelSorting();
// Cycle the sorting states through {NOT_SORTED, ASCENDING, DESCENDING} or
// {NOT_SORTED, DESCENDING, ASCENDING} depending on whether shift is pressed.
status = status + (e.isShiftDown() ? -1 : 1);
status = (status + 4) % 3 - 1; // signed mod, returning {-1, 0, 1}
setSortingStatus(column, status);
private static class Arrow implements Icon {
private boolean descending;
private int size;
private int priority;
public Arrow(boolean descending, int size, int priority) {
this.descending = descending;
this.size = size;
this.priority = priority;
public void paintIcon(Component c, Graphics g, int x, int y) {
Color color = c == null ? Color.GRAY : c.getBackground();
// In a compound sort, make each succesive triangle 20%
// smaller than the previous one.
int dx = (int)(size/2*Math.pow(0.8, priority));
int dy = descending ? dx : -dx;
// Align icon (roughly) with font baseline.
y = y + 5*size/6 + (descending ? -dy : 0);
int shift = descending ? 1 : -1;
g.translate(x, y);
// Right diagonal.
g.setColor(color.darker());
g.drawLine(dx / 2, dy, 0, 0);
g.drawLine(dx / 2, dy + shift, 0, shift);
// Left diagonal.
g.setColor(color.brighter());
g.drawLine(dx / 2, dy, dx, 0);
g.drawLine(dx / 2, dy + shift, dx, shift);
// Horizontal line.
if (descending) {
g.setColor(color.darker().darker());
} else {
g.setColor(color.brighter().brighter());
g.drawLine(dx, 0, 0, 0);
g.setColor(color);
g.translate(-x, -y);
public int getIconWidth() {
return size;
public int getIconHeight() {
return size;
private class SortableHeaderRenderer implements TableCellRenderer {
private TableCellRenderer tableCellRenderer;
public SortableHeaderRenderer(TableCellRenderer tableCellRenderer) {
this.tableCellRenderer = tableCellRenderer;
public Component getTableCellRendererComponent(JTable table,
Object value,
boolean isSelected,
boolean hasFocus,
int row,
int column) {
Component c = tableCellRenderer.getTableCellRendererComponent(table,
value, isSelected, hasFocus, row, column);
if (c instanceof JLabel) {
JLabel l = (JLabel) c;
l.setHorizontalTextPosition(JLabel.LEFT);
int modelColumn = table.convertColumnIndexToModel(column);
l.setIcon(getHeaderRendererIcon(modelColumn, l.getFont().getSize()));
return c;
private static class Directive {
private int column;
private int direction;
public Directive(int column, int direction) {
this.column = column;
this.direction = direction;
}The table listens to the TableModel for changes. Changing the table by adding/removing
rows or columns has no affect on its table model. If you make changes to the table model
the table will be notified by its TableModelListener and change its view. So tell
MyTableModel about the change of data:
public class TableSorterDemo implements ActionListener
MyTableModel tableModel;
public TableSorterDemo()
defaultListModel = new DefaultListModel();
init1();
tableModel = new MyTableModel(defaultListModel);
TableSorter sorter = new TableSorter(tableModel);
public void actionPerformed(ActionEvent ae)
if (ae.getSource()==clickMe)
defaultListModel.removeAllElements();
init2();
tableModel.fireTableStructureChanged();
} -
Retain field order on form when adding/deleting columns
If I move my html around to change the layout of the fields on an AddForm.aspx and then I start adding and deleting columns, the ordering of the ff## changes and I can have problems.
Its fine if I've only added new columns...what I've done is create an AddForm1.aspx to get the fresh ff##'s at the end of the list. I copy them over to my AddForm.aspx
If I add and delete columns, then I can have problems.
The ff## may be renumbered when making an AddForm1.aspx and copying the new fields might create an error because of dupe ff##'s.
If I use AddForm1.aspx, I lose my layout of the fields on my form AddForm.aspx.
I have been successful finding the ordering of the columns on AddForm1 and renumbering on AddForm.
But this is pain and error-prone.
What do people do to get around this dilema?
thx
RichHi,
By default, we can change the order at the Lists content type settings page.
I suggest you provide more information about your requirement(screenshot) to make others easier to find a solution for you.
More information:
http://social.technet.microsoft.com/Forums/sharepoint/en-US/31a5030b-9494-4057-b4ad-485435fdceb0/sharepoint-designer-2010-reorder-fields-for-newform-edifform-viewform?forum=sharepointgeneralprevious
http://kalsing.blogspot.com/2006/11/create-custom-list-form-for-sharepoint.html
Thanks,
Dennis Guo
TechNet Community 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]
Dennis Guo
TechNet Community Support -
Problem in updating first column header in JTable
hi
I am using JTable in my application. I want to change first column name of JTable every time when a JList is selected. I am using DefaultTableModel for JTable. I added first column in Constructor and another in a method. I have to edit only first column header. How can i do this???
I used this code but it is not working.
table.getColumnModel().getColumn(0).setHeaderValue("Name of column");
table.getTableHeader().resizeAndRepaint();
Your help will be appreciated.
Thanks in advance
Sonaltable.getColumnModel().getColumn(0).setHeaderValue("Name of column");
table.getTableHeader().repaint();Works for me so post a SSCCE ( http://www.sscce.org/ ) that shows the problem. -
Problem involving dynamic table columns in ECM
Hi,
In my current project I have got a requirement whose solution I am not able to figure out.
My requirement is this:
I will have a table containig budget owners name(since its compensation management in HR).There will be a table popin inside this table on the click of the personal number of the budget owner. Now the table popin will have another table with all employees name under that particular budget owner.
The problem is that the table inside the popin will not be having fixed columns.
Actually the columns will be coming from a function module(HRWPC_RFC_OADP_EVAL_DATAVIEW ) in the form of an internal table .
My requirement is this how can this be handled?
How to create the table with dynamic columns?Mind it,the data inside the table also have to binded and some of the columns will also be editable.
Experts please help!
Thanks and Regards,
Saikat.Hello Saikat,
I didnt understand why you want to create the table at design and change it runtime. you as well create the table at runtime. Because the table columns defined in the design time will not match number of table columns required at runtime. this depends on the outpur of your function module.
Anyway here is the solution for your requirement
1. create a attribute in the view controller (say MR_VIEW) of TYPE REF TO if_wd_view.
2. in the doModifyview method write the following code
if first_time = abap_true.
wd_this->mr_view = view.
endif.
3. after calling you function module write the following code to change the biniding of the table and table columns
data lo_table type ref to cl_wd_table.
lo_table ?= wd_this->mr_view->get_element( id = 'TABLE' ). "Pass the ID of the table that is created at design time
data lo_nd_table2 type ref to if_wd_context_node.
data lo_ndi_table2 type ref to if_wd_context_node_info.
data lv_node_path type string.
data lv_attribute_path type string.
data lt_attributes type wdr_context_attr_info_map.
data ls_attribute like line of lt_attributes.
data lo_column type ref to cl_wd_table_column.
data lo_text_view type ref to cl_wd_text_view.
data lo_header type ref to cl_wd_caption.
lo_nd_table2 = wd_context->get_child_node( 'TABLE2' ). "dynamically create context node name
lv_node_path = lo_nd_table2->get_meta_path( abap_true ). "Get the path of this node
lo_table->bind_data_source( path = lv_node_path ). "change the ata
lo_table->remove_all_columns( ). "remove all the design time columns
lo_table->remove_all_grouped_columns( ).
lo_ndi_table2 = lo_nd_table2->get_node_info( ).
lt_attributes = lo_ndi_table2->get_attributes( ). "get the attributes in the context node
"if you already have the list of attributes then you can just loop through them
loop at lt_attributes into ls_attribute.
concatenate lv_node_path '.' ls_attribute-name into lv_attribute_path.
"Creating Table column
lo_column = cl_wd_table_column=>new_table_column( view = wd_this->mr_view ).
"Creating table cell editor
lo_text_view = cl_wd_text_view=>new_text_view(
bind_text = lv_attribute_path "Path of the context attribute
view = wd_this->mr_view ).
"creating header for the table column
lo_header = cl_wd_caption=>new_caption(
text = ls_attribute-name
view = wd_this->mr_view ).
"Setting cell editor and header for the column
lo_column->set_table_cell_editor( lo_text_view ).
lo_column->set_header( lo_header ).
"Adding the column to the table
lo_table->add_column( the_column = lo_column ).
endloop.
BR, Saravanan -
Problem while inserting new Column in JTable
Hi,
I am facing Problem while inserting new Column in JTable.
I have a JTable with one inherited ColumnModel class.
When I am adding the column and moving towards the corresponding location, it moves successfully.
but if I am adding another column or making any changes to table column structure the table retains the defualtcolumn structure.
please help me to solve this..
Regards
Ranjith.........Maybe this example will help:
http://forum.java.sun.com/thread.jspa?forumID=57&threadID=579527 -
Problems with matrix's columns
Hi friends,
I'm working on the "133" SBO form , and i would exchange
data from the four columns i've added to the Matrix,to the UserTable i've created before.
I created columns in this way:
FUColSp = FUmatrix.Columns.Add("col1", SAPbouiCOM.BoFormItemTypes.it_EDIT)
FUColSp.TitleObject.Caption = "Saldo"
FUColSp.Width = 60
FUColSp.Editable = True
Now i would make some calculations between values on the columns' cells and my usertable data.
The problem is that SBO doesn't allow me to edit values in the "new columns' cells" so i can do nothing.
How can i solve this problem?
Does every column "MUST BE BOUNDED" to a datasource or not?
Thank you very much!
Giammichele.Hi,
You can create a UserdataSource to your columns.
1- Create a UserdataSource in you form
oForm.DataSources.UserDataSources.Add("MyDataCol1", SAPbouiCOM.BoDataType.dt_SHORT_NUMBER, 30)
2-Create your column and assign the datasource
FUColSp = FUmatrix.Columns.Add("col1", SAPbouiCOM.BoFormItemTypes.it_EDIT)
FUColSp.TitleObject.Caption = "Saldo"
FUColSp.Width = 60
FUColSp.Editable = True
FUColSp.DataBind.SetBound(True, "MyDataCol1", "col1")
3- Use the value of your column
Ribeiro Santos -
Hi,
I have a problem with adding a latest JSF 1.2 RI from Sun (https://javaserverfaces.dev.java.net/files/documents/1866/44998/jsf-1_2_03.zip) to JDeveloper as a new library.
I created a new User library and added into it jsf-impl.jar and jsf-api.jar from JSF 1.2 RI.
Then I try to create two new JSP Tag libraries based from .tld files.
When a .tld file is placed in "TLD File:" field there is no information below about Library Version and Required JSP Version. If I check "Execute Tags in JSP Visual Editor" and click "Customize" button - list of tags in "Customize Tag Library" window is empty.
I have errors when I try to use JSF Tags from this new library in JSP page like :
"Can't create tag instance: f:view (class: null). Make sure, that the tag class or a library contained this class is available in this application"
(free translation to English)
Is this possible to add JSF RI v1.2 as another library in Jdeveloper 10.1.3.1 ?
thanks for help
koliHi,
This solution is not exactly for Jdeveloper 10.1.3.x I think.
- "Create a JSF system library." section, point 2. - there is not possible to add library in folder other than User I see, so I added it in User folder.
- "Register the JSF JSP tag libraries." section, point 5. - in JD 10.1.3 there is no dialog box, I checked checkbox "Show Tag Library in Palette". A new library was added to User folder but there is no new libraries in component Palette.
Even as I use "Edit tag libraries .." from Component Palette context menu and add manually new tag libraries to selected, there is no libraries in Component Palette after it.
I feel so problem is with different .tld files format, not with adding libraries method.
Sun RI tld file (from version 1.2_03) fragment:
<taglib xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd"
version="2.1">
<!-- ========== Tag Library Description Elements ========================= -->
<description>
The core JavaServer Faces custom actions that are independent of
any particular RenderKit.
</description>
<tlib-version>1.2</tlib-version>
<short-name>f</short-name>
<uri>http://java.sun.com/jsf/core</uri>
tld included in JD:
<!DOCTYPE taglib
PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
"http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
<taglib>
<!-- ========== Tag Library Description Elements ========================= -->
<tlib-version>1.0</tlib-version>
<jsp-version>1.2</jsp-version>
<short-name>f</short-name>
<uri>http://java.sun.com/jsf/core</uri>
<description>
The core JavaServer Faces custom actions that are independent of
any particular RenderKit.
</description>
Did JDeveloper 10.1.3.x maintain with taglib version 1.2 ?
Regards
koli -
Facing problem with a date column in select query
Hi,
I am facing problem with a date column. Below is my query and its fainling with " invalid number format model" .
Query: SELECT *
FROM EMP
WHERE trunc(LAST_UPDATED) >= to_date(to_char(22-05-2009,'dd-mm-yyyy'),'dd-mm-yyyy')
LAST_UPDATED column is "DATE" data type.
Please help me ThanksRadhakrishna Sarma wrote:
SeánMacGC wrote:
WHERE LAST_UPDATED >= to_date('22-05-2009','dd-mm-yyyy');
You do not need the TRUNC here in any case.
I don't think so. What if the user wants only data for 22nd May and the table has records with date later than 22nd also? In that case your query willl not work. In order for the Index to work, I think the query can be written like this I think Sean is right though. Use of TRUNC Function is quiet useless based on the condition given here, since the to_date Function used by OP will always point to midnight of the specified date, in this case 22-05-2009 00:00:00.
Regards,
Jo
Edit: I think Sean proved his point... ;) -
Adding a column in the MSS Approval view
What are the options for adding a column in the MSS approval view (CATS regular) ?
there are lot of colums available in cats customisation for this
Please check
In the IMG (transaction SPRO), go to
- SAP Customizing Implementation Guide
- Cross-Application Components
- Time Sheet
- Specific Setting for CATS regular
- CATS regular
- Approve Working Time
- Define Field Selection for Individual Approval View
- Define Field Selection for Detail View
Here you can assign lot of columns to your profile
which is easily customisable -
[SOLVED] Problem with adding a SSH connection to startup
Hi guys. I have a problem with adding ssh connection to startup. i want this command to run before kde login screen and keep running all time.
ssh -D 9292 remoteuser@remotehost
but it doesnt connect. Thanks for help!
Last edited by alperenel (2011-03-11 00:10:27)cactus wrote:
ssh -fN -D 9292 remoteuser@remotehost
you need -f, which sends ssh to the background, and -N which does not execute a remote command.
If you need it to run as a user other than root, then you probably need to utilize su as well.
it didnt work either. i am putting it in rc.local but doesnt work. -
Problem reading a xmlType column (return only 999 rows) with XMLTable
Hello,
I'm new in the forum.
Sorry for my english.
I have a problem reading an xmltype column.
My oracle's version is 11.1.0.6.0
I have a table like this:
Create Table TestXml (idProg number, xmldata XmlType)
XMLTYPE COLUMN xmldata
STORE AS BINARY XML;
I have a xml file containing the equivalent of 10000 record (like a csv).
my schema xsd is the following:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="applicazione">
<xs:annotation>
<xs:documentation>Flusso Monitoraggi</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="periodo" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="segmento" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="progressivo" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="stato" type="xs:string"/>
<xs:element name="ts_start" type="xs:string"/>
<xs:element name="ts_stop" type="xs:string"/>
<xs:element name="nota_esecuzione" type="xs:string"/>
<xs:element name="ts_esecuzione" type="xs:string"/>
</xs:sequence>
<xs:attribute name="valore" type="xs:integer" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="nome" type="xs:string" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="nome" type="xs:string" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="nome" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:schema>
When I try to read my xmltype column with this select :
SELECT ap.desc_applicazione,pe.seq_periodo, pe.desc_elem_temp_ist,
sg.desc_segmento_elab,pg.seq_progressivo,
pg.desc_stato,pg.ts_start,pg.ts_stop,pg.nota_esecuzione,pg.ts_esecuzione,
pg.valore_prog,sg.seq_segmento,idProg
FROM testXML p,
XMLTable('/applicazione' PASSING p.xmlData
COLUMNS
seq_applicazione for ordinality,
desc_applicazione VARCHAR2(50) PATH '@nome',
periodo XMLType PATH 'periodo') ap,
XMLTable('periodo' PASSING ap.periodo
COLUMNS
seq_periodo for ordinality,
desc_elem_temp_ist VARCHAR2(50) PATH '@nome',
segmento XMLType PATH 'segmento') pe,
XMLTable('segmento' PASSING pe.segmento
COLUMNS
seq_segmento for ordinality,
desc_segmento_elab VARCHAR2(50) PATH '@nome',
progressivo XMLTYPE PATH 'progressivo') sg,
XMLTable('progressivo' PASSING sg.progressivo
COLUMNS
seq_progressivo for ordinality,
valore_prog NUMBER PATH '@valore',
desc_stato VARCHAR(10) PATH 'stato',
ts_start VARCHAR2(50) PATH 'ts_start',
ts_stop VARCHAR2(50) PATH 'ts_stop',
nota_esecuzione VARCHAR2(50) PATH 'nota_esecuzione',
ts_esecuzione VARCHAR2(50) PATH 'ts_esecuzione'
) pg
where idProg = 1
I obtained only 999 rows.
I tried with two file xml, one containing 10000 repetition of progressivo, the other containing 10000 repetition of segmento.
Anybody know why? Where is my error?
Thank you in advance for any response.
MaurizioHello,
I'm new in the forum.
Sorry for my english.
I have a problem reading an xmltype column.
My oracle's version is 11.1.0.6.0
I have a table like this:
Create Table TestXml (idProg number, xmldata XmlType)
XMLTYPE COLUMN xmldata
STORE AS BINARY XML;
I have a xml file containing the equivalent of 10000 record (like a csv).
my schema xsd is the following:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="applicazione">
<xs:annotation>
<xs:documentation>Flusso Monitoraggi</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="periodo" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="segmento" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="progressivo" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="stato" type="xs:string"/>
<xs:element name="ts_start" type="xs:string"/>
<xs:element name="ts_stop" type="xs:string"/>
<xs:element name="nota_esecuzione" type="xs:string"/>
<xs:element name="ts_esecuzione" type="xs:string"/>
</xs:sequence>
<xs:attribute name="valore" type="xs:integer" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="nome" type="xs:string" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="nome" type="xs:string" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="nome" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:schema>
When I try to read my xmltype column with this select :
SELECT ap.desc_applicazione,pe.seq_periodo, pe.desc_elem_temp_ist,
sg.desc_segmento_elab,pg.seq_progressivo,
pg.desc_stato,pg.ts_start,pg.ts_stop,pg.nota_esecuzione,pg.ts_esecuzione,
pg.valore_prog,sg.seq_segmento,idProg
FROM testXML p,
XMLTable('/applicazione' PASSING p.xmlData
COLUMNS
seq_applicazione for ordinality,
desc_applicazione VARCHAR2(50) PATH '@nome',
periodo XMLType PATH 'periodo') ap,
XMLTable('periodo' PASSING ap.periodo
COLUMNS
seq_periodo for ordinality,
desc_elem_temp_ist VARCHAR2(50) PATH '@nome',
segmento XMLType PATH 'segmento') pe,
XMLTable('segmento' PASSING pe.segmento
COLUMNS
seq_segmento for ordinality,
desc_segmento_elab VARCHAR2(50) PATH '@nome',
progressivo XMLTYPE PATH 'progressivo') sg,
XMLTable('progressivo' PASSING sg.progressivo
COLUMNS
seq_progressivo for ordinality,
valore_prog NUMBER PATH '@valore',
desc_stato VARCHAR(10) PATH 'stato',
ts_start VARCHAR2(50) PATH 'ts_start',
ts_stop VARCHAR2(50) PATH 'ts_stop',
nota_esecuzione VARCHAR2(50) PATH 'nota_esecuzione',
ts_esecuzione VARCHAR2(50) PATH 'ts_esecuzione'
) pg
where idProg = 1
I obtained only 999 rows.
I tried with two file xml, one containing 10000 repetition of progressivo, the other containing 10000 repetition of segmento.
Anybody know why? Where is my error?
Thank you in advance for any response.
Maurizio -
How to add get the field name for a newly added site column.
I have the following:-
Enterprise wiki site collection inside SharePoint server 2013.
I added a new site column of type managed metadata.
I opened the enterprisewiki.aspx page layout using the SP designer, to add the newly added site column to it.
But I have noted that to add any site column I need to know the field name , for example the default wiki category column is referenced inside the page layout as follow:-
<Taxonomy:TaxonomyFieldControl FieldName="Wiki_x0020_Page_x0020_Categories" EmptyValueDescriptionForTargetTemplate="<%$Resources:cms,enterwiki_nocategories_assigned%>" DisableInputFieldLabel="true" runat="server"/>
<b>
So my question is how I can know the field name for my newly added site column?
Thanks in advance for any help.
RegardsHi,
The “FieldName” should be the internal name of the column, you will find it at the address bar at the “Site Columns”->”Edit Column” page:
Best regards,
Patrick
Patrick Liang
TechNet Community Support
Maybe you are looking for
-
1:1 FSB:Memory ratio on 865pe fisr (250+Mhz)
Does anyone have memory that is capable of running 250mhz and over? I was interested in knowing whether the bios changes your ratio to 5:4 when you select 250mhz FSB and over like mine does. I don't know why it changes the ratio when the ram is capab
-
Applcation scanning using SQL developer3.0
How to do application scanning in SQL Developer for sybase ctlib and dblib applications? A reply with a step by step walk through will be helpful ..
-
Hello; Is anyone out there have integrated the XML Publisher with Application Express (aka HTML DB) ? Thank you. Shaun
-
SAPBPBEOPBT_PIBDTA bank file not correct
When you create bank file using the format SAPBPBEOPBT_PIBDTA following content can be observed in Record Type 0: 00 0703051100001030511 000000123456711DB&S bvba 8650 HOUTHULST BELGM 0 5 Here we
-
I want to get a copy of the photos from my wife's apple pc into my iPad?
I want to copy the photos on my wife's apple pc into my iPad?