No cell seperator shown after adding rows to table
Hi All,
I'm trying to add rows for the user to click on to 'add new' similar to the contacts application. It works, but when the new row displays it has no separator. My code is inside the setEditing overridden method as shown...
- (void)setEditing:(BOOL)editing animated:(BOOL)animated {
// call super first
[super setEditing:editing animated:animated];
// add/remove placeholder items
[self.tableView beginUpdates];
NSMutableArray *indexPaths = [[NSMutableArray alloc] init];
for (int g=0; g < editGroups.count; g++)
if ([[editGroups objectAtIndex:g] isArray])
// get the count of objects for this group
SEL propertySelector = NSSelectorFromString([[[[editGroups objectAtIndex:g] editFields] objectAtIndex:0] fieldName]);
[indexPaths addObject:[NSIndexPath indexPathForRow:[[editObject performSelector:propertySelector] count] inSection:g]];
if (editing)
// Show the placeholder rows
[self.tableView insertRowsAtIndexPaths:indexPaths withRowAnimation:UITableViewRowAnimationFade];
else
// Hide the placeholder rows.
[self.tableView deleteRowsAtIndexPaths:indexPaths withRowAnimation:UITableViewRowAnimationTop];
// send object did update message to delegate
[delegate didUpdateObject];
[self.tableView endUpdates];
Thanks
Ray
I just found the problem, and for anyone else out there with the same issue. I had to remove the [super setEditing:editing animated:animated] at the beginning of my method. My super is UITableViewController, and for some reason calling the super on this method causes the seperator lines to vanish.
Thanks All
Similar Messages
-
Hi
I want to display a message after inserting rows in table like *'you have inserted a new row successfully*'.
i am using the createinsert ADF Button to insert the rows in table.after that i am comitting it.
after commiting i want to display message for the user.for this what i need to do.
Please help me.
Sailaja.user10860137
Can you please explain me the each line in the code briefly.
+public String saveButton_action(){+
BindingContainer bindings = getBindings();
OperationBinding operationBinding = bindings.getOperationBinding("Commit");
Object result = operationBinding.execute();
+// note "!" operator has been removed from the default code.+
+if(operationBinding.getErrors().isEmpty()){+
FacesContext ctx = FacesContext.getCurrentInstance();
FacesMessage saveMsg = new FacesMessage("Record Saved Successfully");
ctx.addMessage(null,saveMsg);
+}+
return null;
+}+
And i have requirement to show the message on favcet "status bar".not in a popup window.(from the above code the message is showing in popup window. )the Layout i am using is PanelCollection.
can you tell me what i need to do.
Thanks
Sailaja.
Edited by: sj0609 on Mar 19, 2009 8:03 AM -
Numbers missing reference after adding rows
Hi,
I came into a strange situation (which I did not have before).
I have a sheet summary contaning formulas that uses cells from a different sheet. The source sheet contains more than 100 rows containing different numbers which are used in more than 50 formulas in the summary sheet.
When adding rows inbetween the existing data sheet rows, I see that the summary sheet furmulas, in some cases, do not reference to the correct row number (they all should shift to the new row number) any more (out of 50 references only four got currapted).
Any ideas are appriciated (is this a known bug).
Thanks,
ZivZiv,
First, I want to thank you for asking a question that got me thinking about something I hadn't really considered before.
I am not entirely sure I understand your question or the test you proposed in the second post, but if I am reading it correctly, what you are expecting is the way Numbers is designed to work (and the way I have seen it work) and when I try the test from your second post I get the results I expect.
That is, a cell reference points to a cell, not a location; if you move that cell (for example, by adding a row above it, which moves it down one row) the reference in the formula is updated to reflect the new location, but the result of the calculation doesn't change.
But this got me wondering about how Numbers dealt with references to ranges of cells. For example, the formula =SUM(C3:C6) is equivalent to =SUM(C3, C4, C5, C6), but what happens when you add a row after row 4? Apparently, the second expression remains a sum of the values in four cells, but the values of C5 and C6 are changed to reflect the fact that they have moved to C6 and C7. However, in the first expression, the new cell is added to the range, so that it is now the sum of five values. Actually, if you add a row (or column) to one that passes through a range, in the middle, or on the outside, the formula updates to add the new cell to the range, even if you are adding cells immediately below the bottom row in the range (so none of the cells in the original range actually move).
I'm not sure any of this has much to do with your problem, unless possibly one (or four) of your expressions is referring to a range that happens to be one cell, which would update differently from one referencing a simple cell. As Jerry has said, it's pretty hard to know anything without knowing what expressions your formulas are using.
At any rate, thanks for making me think about something I hadn't explored before. -
I just replaced Pages after paying Apple $400+ for replacing a wiped-out hard-drive....
MANY HORRIBLE QUIRKS with Pages 5.1...
the one I listed above.....it's as if there is only one page....I can't see any added rows in the table below this arbitrary line drawn across the bottom! I can ADD the rows, but nothing I type in them is visible!Do you have Pages '09 in your Applications/iWork folder?
If not ask Apple to give it to you again.
You own it.
Peter -
Word VBA Macro problem with adding rows to table for BAPI call
Hello all,
I have code in Word macro which is reading file from the disk and converting it to binary. This binary should be inserted in the internal table (Dim As object) for further posting. Code is modified from the note 945682.
Here is the code:
Sub Read_File(FileNameFull As String)
Dim oBinaryDataTab As Object
Dim oBinaryDataRow As Object
Dim lBytesToRead As Long
Dim iNumChars, i As Integer
Dim s1022, s2044, sX As String
Dim fs, f, ts As Object
Dim ReadFile As String
' Actually does the work of uploading the document in 1022 byte pieces.
ReadFile = 0
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFile(FileNameFull)
Set ts = f.OpenAsTextStream(1, -2)
lBytesToRead = f.Size
ReadFile = f.Size
Do While ts.AtEndOfStream <> True
If lBytesToRead < 1022 Then
iNumChars = lBytesToRead
Else
iNumChars = 1022
End If
s1022 = ts.Read(iNumChars)
s2044 = ""
For i = 1 To Len(s1022)
sX = Hex$(CByte(Asc(Mid(s1022, i, 1))))
If Len(sX) = 1 Then
sX = "0" + sX
End If
s2044 = s2044 + sX
Next i
Set oBinaryDataRow = oBinaryDataTab.Rows.Add
oBinaryDataRow("LINE") = s2044
lBytesToRead = lBytesToRead - iNumChars
Loop
End Sub
But on the row "Set oBinaryDataRow = oBinaryDataTab.Rows.Add" code just stopped to work.
Can somebody give me a hint how to proceed?
I also tried to Dim oBinaryDataTable As Table and oBinaryDataRow as Row with the same result.
oBinaryDataTable will be used as to post file to SAP system without GUI FTP connection. Because of that it must be converted to binary form.
TIA
Gordan
P.S. Message to Moderator: Please, be so kind, and put the message in the proper forum if this is not this one.Self Resloved
-
JSF: Problems adding rows to table with custom method
Since this being my first post, I find it only appropriate to thank the development team for such a huge addition to the application development world. You guys rock. You have cured my Java identity crisis. That being said...
I have been stumped for days. I'm making a simple web cart. I am trying to get two string values (name and price) passed through a custom exposed application module method ran on a backing bean. What I want the exposed VO module to do is, upon receiving the two strings, create a new row on the empty data controlled table I have built to store them. Basically I just need to add rows to a table with my custom managed bean. Most recent version.
I have written a test method to make sure my backing bean and exposed app module impl were working. This test works:
//WORKS
//CartInfo.java
public String cb1_action() {
AppModuleImpl am = new AppModuleImpl();
am.testMethod();
return null;
//AppModuleImp.java
public void testMethod() {
System.out.println("WORKS");
}I found some code on how to add rows and unfortunately it isn't working out for some reason. Here is what is producing the error "Caused By: java.lang.NullPointerException" :
//DOESN'T WORK IN CUSTOM METHOD BUT WORKS WHEN DRAGGED ON TO THE PAGE AS A COMMAND BUTTON
//CartInfo.java
public String cb1_action() {
AppModuleImpl am = new AppModuleImpl();
am.testMethod("test", "test");
return null;
//AppModuleImp.java
public void testMethod(String pName,String pPrice) {
ViewObjectImpl vo = this.getCartVO1();
Row r = vo.createRow();
r.setAttribute("NAME", pName);
r.setAttribute("PRICE", pPrice);
vo.insertRow(r);
//The VO attributes for the DC are:
// Name : Type : Alias Name : Entity Usage : Info
NAME : String : NAME : (blank) : Transient
PRICE : String : PRICE : (blank) : TransientSo what I have so far is a table linked to my database. A user can select and click on a product on the row's individual Add button and using a modified selection listener, it returns the values to the backing_bean.
Then what I want it to do is have those variables passed to the other table. I just can't put it together.
Please if there is anyone that could send me in the right direction I would greatly appreciate it!
Thank you,
Jackif i understand you, you want to call application module method when user clicks on add button on the UI and your table is from VO
so what i can come up for now is:
1) create variable binding from the iterator for both name and price.
2) on your UI action button :
<af:commandButton actionListener="yourbean.addToCart">
<f:attribute name="pName" value ="binding.<created name bind variable>"
<f:attribute name="pPrice" value = "binding.<created price bind variable>"
</af:commandButton>
3) custom Managed Bean:
//yourBean.java
public void addToCart(ActionEvent e){
// get binding here
// use executeWitParams method to send parameter to the function "testMethod" and execute
//AppModuleImp.java
public void testMethod(String pName,String pPrice) {
CardVOImpl vo = this.getCartVO1();
CardVORowImpl r = (CardVORowImpl)vo.createRow();
r.setAttribute("NAME", pName);
r.setAttribute("PRICE", pPrice);
vo.insertRow(r);
Hope this helps...
Let me know if not..
Thanks
Edited by: MavenDev on Oct 30, 2011 8:08 PM -
Hi,
Can some one give me the code to add rows in the table control (with out calling a dummy screen).
Thanks in advance.Hi Subbu,
Which transaction are you calling? Did you check if there is a BAPI or a function module to do the same?
You can reward by choosing the radio-buttons next to each response based on how helpful they were to you. Once completely answered, you will choose 'Solved Problem' option, if that answer helped you to solve it. If you solved it yourself, right next to your original post, there will be a button 'Solved myself' or something like that. Choosing this will close the post and there will be a blue start next to the post.
Srinivas -
Adding rows to table control or step loop
Hello friends,
I have creazted a table control as data input to ITAB. The user should be able to add more rows if nesseccary to the table during data input.
How can I write the code to enable the user to do this. I would appresiate code as example.
thanks
BlackHi,
Create a button for insert in the application toolbar..
When the button is pressed..
CASE SY-UCOMM.
WHEN 'INSERT'.
Add new rows.
tc-lines = tc-lines + 20.
TC will be the table control name..
ENDCASE.
Thanks,
Naren -
How to regenerate classes after adding new related tables ?
HI,
I am using JDeveloper 10.1.3.0.4 to generate java classes from tables.
It is a great product, I like it a lot. I am planning to generate java classes in several iterations. I have one primary table, with FK from two different tables.
If I include all the 3 tables to generate java classes, it generates methods with which I can access the collections referred via FK. It is working great!
I like it a lot. Zero coding effort !!!
Now if I want to add another table, which is also a FK to the primary table, I was able to do the mapping manually using the mapper to create the relation. But how do I regenerate the primary class again to have a method to access the new collection?
Is it possible to do handcoding to introduce this new relation ?
If so , can you show some pointers ?
Thanking in advance
Sambath
Oracle ConsultingHi,
Additional information for the above question.
I am just reading the data, since all the tables are existing tables and I don't have any need to update the data.
Sambath -
Add row based on previous row in table control?
Dear all,
I have a table control with some rows. Every row contains one button. On button click i want to add another row with dirrerent data. I want to add content based on button text or another columns (ex text views text,) based on this text view, I have to add row. One button can click any no of times. On every click i want to add row, but desired position and content should be based on button click. Any help in doing this??
Cheers,
Venkys.Refer to these old threads referring this table and button problem.
Adding rows to table
How to create different rows in table or in ALV?
and for the current scenario what you can do is ...
in the eventhandler of the button click .
find out the row number by using the code to read index.
then based upon that add the element in the node at the desired position.
finding the row number
data indx type i.
DATA lo_el TYPE REF TO if_wd_context_element.
lo_el = wdevent->get_context_element( 'CONTEXT_ELEMENT' ).
indx = lo_el->get_index( ).
and the adding the element at the desired position say n
DATA lo_nd_zdealer TYPE REF TO if_wd_context_node.
lo_nd_zdealer = wd_context->get_child_node( name = 'DEALER' ).
data ls_str type wd_this->element_dealer.
ls_str-id = '00023445'.
ls_str-name = 'sarbjeet'.
ls_str-location = 'hosiarpur'.
ls_str-status = '0001'.
lo_nd_zdealer->bind_structure( new_item = ls_str
set_initial_elements = abap_false
index = n
thanks
sarbjeet singh -
EDIT method doesn't work after adding new row
I would like to start editing after adding new row into TableView.
I copied example from Oracle website: [Using JavaFX UI Controls - 13 Table View|http://docs.oracle.com/javafx/2/ui_controls/table-view.htm#CJAGDAHE]. Then I put additional button for adding new row and define action for the button.
final Button addButton = new Button("Add");
addButton.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent arg0) {
Person p = new Person("", "", "");
table.getItems().add(p);
table.getSelectionModel().select(p);
table.edit(table.getSelectionModel().getSelectedIndex(), table.getColumns().get(2));
});In result I can see selected new row but the table doesn't start edditing in the third column.
I have similar method for editing existing rows and it works properly.
final Button editButton = new Button("Edit");
editButton.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent arg0) {
table.edit(table.getSelectionModel().getSelectedIndex(), table.getColumns().get(2));
});Could you help me what I do wrong?Try wrapping the setCaretPosition(...) method in a SwingUtilities.invokeLater(...)
caret=outputArea.getDocument().getText(0,outputArea.getDocument().getLength()).length();Should be:
caret = outputArea.getDocument().getLength(); -
Numbers 09 continuing formulas when adding rows
Numbers 09 - I have a checkbook template but when adding rows at the bottom the formulas do not continue. I have tried adding rows from the last row "Add row below" and also while in the last cell hitting return. Neither of these work. Any suggestions?
Hi jc,
The rule is quite explicit: "If all the body cells in a column above the new row contain the same formula or cell
control, the formula or cell control is repeated in the new row."
So far there's been some information necessary to solving the problem missing from your posts. Please do the following, and supply the requested information:
Unhide ALL rows. There are two ways to do this, depending on what was done to hid them.
a. Click on the Reorganize button. If the checkbox beside "Show rows that match..." is checked, uncheck it.
b. If the checkbox is unchecked, or if there are still rows hidden after unchecking it, go to the Table menu and choose Unhide all Rows.
Click on any cell on the table to activate the table and show the Column and Row reference tabs. Hover the mouse over the tab for Row 1, then click the triangle that appears to open the local row menu. Repeat with rows 2, 3, 4, 5 and 6 until you find the first row whose menu starts with the item shown below. Which row has this menu item on your table?:
Now click on cell G2 (the first cell containing a balance).
Select and Copy the whole formula from this cell. Paste it into your reply to this message.
Repeat step 3 with the formula from cell G3. Paste it directly below the formula from G2, using the example below as a guide:
G2: (paste formula)
G3: (paste formula)
Regards,
Barry -
JTable cell being edited after model changed.
I have a fairly simple JTable, with a implementation of AbstractTableModel supplying the data. The cells are edited by using a JComboBox. I wrap these into a DefaultCellEditor. I have a KeyListener attached to the JTable listening for VK_DELETE, and when it finds one, instructs the model to delete the row represented by the selected row in the table.
Everything works fine until I want to delete a row from the table. My scenario is:
- I click in a cell, and the editor opens.
- I select an entry in the list. The editor closes, the result is rendered, and the wee yellow box around the cell is shown
- I hit the delete key.
- My key listener picks up the event, and informs the model to delete the row. I remove the row from the model and invoke fireTableDataChanged().
The result is that the row is deleted, but the table ends up with the cell editor deployed on the cell of the row below (which is now at the same row as the one I just deleted).
My tracing shows that the isCellEditable is called on the model after the delete. I don't know why.
Can anyone explain how to prevent this or what might be causing the table to think that the cell needs editing?
Thanks, AndrewIt will do whatever is the default. I wrap the JComboBox in a DefaultCellEditor. I can't see how the editor is involved at this point, or why the editor becomes involved after the row has been deleted.
Remember, at the time that I hit the delete key, there is no editor rendered or visible. I have the JTable displayed, a row selected, and the yellow box around one of the (editable but not currently being edited) cells. This has been achieved by editing a cell (displaying the cell editor - a combo box) and selecting an entry. The editor is removed, and the cell displayed with the (default) cell renderer for the table.
The delete action is caught by the listener on the table, the model is instructed to delete a row from its underlying data, which fires a fireTableDataChanged event.
That is all I do. After that it is all swing. The table model starts getting asked about cells being editable after I have finished deleting the row. I'll post the relevant code below if that helps.
The datamodel is of class ConstraintTableModel (see below) and the column model is of class DefaultTableColumnModel
JTable table = new JTable( dataModel, columnModel );The column model is defined liike so:
columnModel = new DefaultTableColumnModel();
TableColumn labelColumn = new TableColumn(ConstraintTableModel.LABEL_COLUMN);
labelColumn.setHeaderValue( dataModel.getColumnName(ConstraintTableModel.LABEL_COLUMN));
labelColumn.setPreferredWidth( 5 );
labelColumn.setMaxWidth( 5 );
labelColumn.setResizable( false );
TableColumn taskColumn = new TableColumn(ConstraintTableModel.TASK_COLUMN);
taskColumn.setHeaderValue( dataModel.getColumnName(ConstraintTableModel.TASK_COLUMN));
TableColumn typeColumn = new TableColumn(ConstraintTableModel.TYPE_COLUMN);
typeColumn.setHeaderValue( dataModel.getColumnName(ConstraintTableModel.TYPE_COLUMN));
columnModel.addColumn( labelColumn );
columnModel.addColumn( taskColumn );
columnModel.addColumn( typeColumn );I add the key listener like so:
table.addKeyListener( new KeyAdapter()
public void keyPressed( KeyEvent e )
if( e.getKeyCode() == KeyEvent.VK_DELETE )
log.debug("Delete pressed in listener attached to table ");
JTable t = (JTable) e.getSource();
int selectedRow = t.getSelectedRow();
if( selectedRow >= 0 )
log.debug(" Removing row " + selectedRow);
((ConstraintTableModel)t.getModel()).removeRow(selectedRow);
log.debug("Finished with key press");
} );The cell editor is created like this:
JComboBox taskEditorComponent = new JComboBox( tasksModel );
taskEditorComponent.setFont( GanttChart.tableFont );
taskEditorComponent.setBackground( Color.WHITE );
DefaultCellEditor taskEditor = new DefaultCellEditor(taskEditorComponent);
taskEditor.setClickCountToStart( 1 );
table.setDefaultEditor( GanttTask.class, taskEditor );The model is coded like so:
class ConstraintTableModel extends AbstractTableModel
// Constants
public static final int LABEL_COLUMN = 0;
public static final int TASK_COLUMN = 1;
public static final int TYPE_COLUMN = 2;
private Vector columnNames;
private ArrayList dataRows;
public ConstraintTableModel()
super();
this.buildDataVector();
this.addPrimerRow();
* Every row in the table is a GanttConstraint. Therefore when deciding what to
* display in any particular column of the table, we need to determine what the
* column is, and then use the informatino in the GanttConstraint to go out to the
* lookup and get the relevant object, and value to display.
public Object getValueAt( int row, int col )
Object returnObject = "";
GanttConstraint aConstraint = (GanttConstraint) this.getDataRows().get( row );
// We're rendering the task column. If there's no task id (partially filled in row)
// return blank otherwise return the master task
else if( col == ConstraintTableModel.TASK_COLUMN )
if( aConstraint.getMasterId() != null )
GanttTask masterTask = (GanttTask) real.getLookup().get( aConstraint.getMasterId() );
returnObject = masterTask;
// We're rendering the type column. If there's no type (partially filled in row)
// return blank otherwise return the constraint type
else if( col == ConstraintTableModel.TYPE_COLUMN )
if( aConstraint.getType() != null )
GanttConstraintType constraintType = (GanttConstraintType) GanttConstraintType.getConstraintTypes()
.get( aConstraint.getType()
.intValue() );
returnObject = constraintType;
return returnObject;
* When we receive this message, we are handed an object of the type specified in
* getColumnClass. We need to take this object and place the relevant information into
* the GanttConstraint row in the table model.
* Depending on whether the row being modified is an existing row or a new row, set
* the state of the constraint appropriately.
* @see javax.swing.table.TableModel#setValueAt(java.lang.Object, int, int)
public void setValueAt( Object value, int row, int col )
log.debug( "+setValueAt (row/col) " + row + "/" + col );
if ( value == null )
log.debug( " handed a null value. Returning" );
return;
GanttConstraint aConstraint = (GanttConstraint) this.getDataRows().get( row );
// If we are modifying the primer row, add another primer row.
if( row == ( this.getRowCount() - 1 ) ) // Last row is always the primer
log.debug( " adding a primer row" );
this.addPrimerRow();
// We're modifying the Task data. Get the GanttTask handed to us and place it
// into the master slot in the constraint.
if( col == ConstraintTableModel.TASK_COLUMN ) // Task
log.debug( " updating the master task" );
GanttTask selectedTask = (GanttTask) value;
aConstraint.setMaster( selectedTask );
// We're modifying the Type data. Get the GanttConstraintType handed to us and place it
// into the type slot in the constraint.
if( col == ConstraintTableModel.TYPE_COLUMN ) // Constraint type
log.debug( " updating the constraint type" );
GanttConstraintType selectedConstraintType = (GanttConstraintType) value;
aConstraint.setType( selectedConstraintType.getType() );
log.debug( "-setValueAt" );
public Class getColumnClass( int col )
Class columnClass = super.getColumnClass( col );
if( col == ConstraintTableModel.LABEL_COLUMN )
columnClass = String.class;
if( col == ConstraintTableModel.TASK_COLUMN )
columnClass = GanttTask.class;
if( col == ConstraintTableModel.TYPE_COLUMN )
columnClass = GanttConstraintType.class;
return columnClass;
// We are handing the data storage
public void setDataRows( ArrayList dataRows )
this.dataRows = dataRows;
public boolean isCellEditable( int row, int col )
log.debug( "+isCellEditable (row/col) " + row + "/" + col );
if( !real.canEdit() )
return false;
if( ( col == ConstraintTableModel.TASK_COLUMN ) ||
( col == ConstraintTableModel.TYPE_COLUMN ) )
return true;
else
return false;
// We are handing the data storage
public ArrayList getDataRows()
return this.dataRows;
public String getColumnName( int column )
return (String) this.getColumnNames().get( column );
* Clean up rows that do not have both the master task and type set. Not interested in them
public void removeDirtyRows()
log.debug( "+removeDirtyRows" );
Iterator dataIterator = this.getDataRows().iterator();
while( dataIterator.hasNext() )
GanttConstraint element = (GanttConstraint) dataIterator.next();
if( ( element.getMasterId() == null ) || ( element.getType() == null ) )
element.setTransient();
dataIterator.remove();
fireTableDataChanged();
log.debug( "-removeDirtyRows" );
public void removeRow( int row )
log.debug( "+removeRow(" + row + ")" );
if( row < this.getDataRows().size() )
GanttConstraint aConstraint = (GanttConstraint) this.getDataRows().get( row );
this.getDataRows().remove( row );
if( aConstraint.isClone() )
aConstraint.setDeleted();
else
aConstraint.setTransient();
getClone().removeConstraint( aConstraint );
fireTableDataChanged();
if( this.getRowCount() == 0 )
this.addPrimerRow();
log.debug( "-removeRow" );
public void clearRow( int row )
log.debug( "+clearRow(" + row + ")" );
if( row < this.getDataRows().size() )
GanttConstraint aConstraint = (GanttConstraint) this.getDataRows().get( row );
aConstraint.setMasterId( null );
aConstraint.setType( null );
fireTableRowsUpdated( row, row );
log.debug( "-clearRow" );
public int getColumnCount()
return getColumnNames().size();
public int getRowCount()
return dataRows.size();
* The table will be filled with constraints relevant to 'clone'.
private void buildDataVector()
ArrayList data = new ArrayList( 1 );
Collection allConstraints = getClone().getStartConstraints();
allConstraints.addAll( getClone().getEndConstraints() );
Iterator constraintIter = allConstraints.iterator();
while( constraintIter.hasNext() )
GanttConstraint element = (GanttConstraint) constraintIter.next();
if( element.getType().equals( GanttConstraint.START_SPECIFIED ) ||
element.getType().equals( GanttConstraint.FINISH_FROM_DURATION ) )
continue;
else
data.add( element );
this.setDataRows( data );
private Vector getColumnNames()
if( columnNames == null )
columnNames = new Vector( 3 );
columnNames.add( " " ); // Needs space otherwise all the headers disappear
columnNames.add( "Task" );
columnNames.add( "Constraint" );
return columnNames;
private void addPrimerRow()
log.debug( "+addPrimerRow" );
// Create a constraint for the 'clone' task. Set it as transient until validation
// where we will deal with it if necessary.
GanttConstraint primer = new GanttConstraint( real.getLookup() );
primer.setObjectId( chart.getNextUniqueId() );
primer.setTransient();
primer.setSlave( getClone() );
primer.setProject( getClone().getProject() );
getClone().addConstraint( primer );
this.getDataRows().add( primer );
int lastRow = this.getRowCount() - 1;
fireTableRowsInserted( lastRow, lastRow );
log.debug( "-addPrimerRow" ); -
Adding row at a table in indesign CS6 from javascript
I have a table in my indesign page.It has one column and several rows. I want to add a row at the begining of the table and add some text content to it.
I tried some provided code but none have worked.
This is how i reference the table object.
var mytable =myPage.textFrames.item(0).tables.item(0);
I tried each the following but none worked and gave an error
mytable.rows[0].cells[0].insertionPoints[0].contents = "TEST TEST";
mytable.rows.add( LocationOptions.AFTER, mytable.rows[-1] );
mytable.rows.add( LocationOptions.Before, mytable.rows[0] );
What should i do?I am actually looping over every page in my indesign file, every page contains 1 textframe with text inside it. I add a new textframe to the page and then move the new textframe content into the begginning of the existing textframe then delete the created one
myPage = myDocument.pages.item(x);
myTextFrame = myPage.textFrames.item(0);
newframe = myPage.textFrames.add();
newframe.contents ="TEST TEST" ;
newframe.paragraphs[0].appliedFont = app.fonts.item("Times New Roman");
newframe.paragraphs[0].fontStyle = "Bold";
newframe.parentStory.paragraphs.item(0).words.item(0).move(LocationOptions.AT_BEGINNING,m yTextFrame);
newframe.remove();
This was working correctly on all files until i faced one with a table. The code stoppes at this line
newframe.parentStory.paragraphs.item(0).words.item(0).move(LocationOptions.AT_BEGINNING,my TextFrame);
and Indesign becomes Not Responding
The table is visually inside the page textframe. I need to do the same logic when having a table i couldnt call the move function when the page has a table and not text in its textframe. I thought abt accessing the table in the page and adding a row at the beginning then writing in it what i need, alternative to what am doing with normal text instead of creating new frame and then moving text to original textframe at beginning.
When my textframe.content="" i know that there is a table and i need to alter it. Otherwise i do add new frame ,move content then delete.
Any suggestions? -
Setting corect value in JTable while adding row @ run time
HI All,
Iam facing the following problems in Java Swing while using JTable..
I have a JTable with 11 colums and i add row on run time..
Since i needed the 11th column of the table to be of type CheckBox i used the follwing object in the DefaultTableModel class..
Object[][] data =
{"1", "", "", "", "", "", new Double(0.0), new Integer(0), new Double(0.0), new Double(0.0),new Boolean(false) }
When ever i wan't to delete a row i will click the Boolean Object ( which appears as a Check box ) and then delete that row.. For deleteing i am using 1 methods..
1. By selecting the col by mouse and the click a button to delete the selected rows...
2. By selecting the col by key board , using a Menu ShortCut key ( CTRL-F ) and then using the space key to on the value , then i use another Menu ShortCut key ( CTRL-D ) to delete all the selected rows..
The above 2 methods work fine as for as deleting is concerned..
But the problem starts while adding another row after deleting one or more rows..That 2 happens while the deletion had been done by the KEYBORD only..
The problem is...
If there is more than 1 rows and i select some rows of any order..And then delete them with the Keyboard option..and then add a rows , while adding the row @ the postion where the last row was deleted iam getting the 11th col. value ( which apears as a check box ) as selected..For example if there is 4 rows and i delete the 3rd and 4th row and then when i add rows its fine for the 3rd row and for the 4th row ( which was the last one which was slected to be deleted ) i get the option as a selected one..
But while adding i use the above said Data object only..I then used the the
JTablename.getValueAt(i,10); to print the value and iam geting false only..
And more over when i try to focus in the cell in 1st row last column of the table by the setSelection method , the focus goes to the cell which appears to be enbled..
My friends asked me to use the follwing methods before adding rows ..
1. clearSelection()
2. Validate()
3. repaint()
But the problem seems not over can anyone help....
U can mail me to [email protected]
Love,.
SivaYes, relatively easily, I think.
In your end jump script set a second value in a different GPRM that identifies the last film played. This way the play all flag is set and you know which clip has just been seen.
On resuming the play all you need to reset the play all flag to '1' and then look at the other GPRM to see which clip played last. Use a bunch of jump commands to get back in to the playback at the start of the next logical clip and it should continue through as before.
The secret here is to clear the play all flag when showing a few clips, but use your 'resume play all' button to reset the flag and see where you were by reading the other GPRM.
The downside here is that you could be in clip 3 when you exit the play all, but you would have to resume clip 3 from the start when you return as the 'Resume' info will get cleared if you start showing other clips in the mean time.
Have you also considered setting up a video jukebox? You could then pick a selection of tracks to play in the order they were chosen and leave them to run through. This is a much trickier bit of scripting, but very possible!
Stories could have made things easier, but given the set-up that you have built you can still get what you need from the scripting
Maybe you are looking for
-
Where can I download Adobe Photoshop Elements 9 when i lost an instalation CD?
Please, where could I find an instalation file for Adobe Photoshop Element 9. A bought it last year, but lost a CD and now when I am changing computer I need an instalation file. I found only element 11 available. Can you help me please? Thank you.
-
DB Adaptor and inserting dates into Oracle DB
Hi, I'm using the Oracle DB Adaptor to poll a table in one instance (using logical delete) and to invoke a DB adaptor to insert/merge a row into a separate instance. NOTE :both tables have different definitions. I am using a BPEL transform to tfrm th
-
How d I get flash drive and install it.
Getting flash drive?
-
Installed prodcts: patchesets or Lincese mgr
Some time ago, I was asked to check if we have iExpenses and iReceivable installed or not. After gng around ML, I found the prod codes for them (OIE, OIR rep). By using the patchsets.sh, I found that the req patches have been applied.( though we are
-
Activation of all my Adobe software doesn't work anymore also Adobe Captivate
Hello, I'm a teacher at the Hague University in the Netherlands and I also bought the Adobe CS6 Master Collection, Adobe Premiere, Adobe Captivate 6 and it worked nice when I installed it in December 2012. But this morning all my Adobe software doesn