How to replace table cell elements position
Hello Experts,
I have a requirement where i have to replace the table cell elements at runtime.
lets say for example i have a node structure like this:
Root Node
table Node data
cell 1 (Name)
cell 2 (Description)
Now once the table rendered on Adobe form let say it has 2 rows
1st row : Test name1 | Test description1
2nd row: Test name2 | Test description2
now for display i have to show on form like this:
1st row : Test name1 | Test name2
2nd row: Test description1 | Test description2
Constraint is i cant change table node structure ,Now i was thinking if i could replace row 2 cell 1 ui element with row 1 cell 2 ui element at runtime in table without changing the mapped values.
Please let me know how i can achieve this or if is there any alternative way to do this.
Any inputs and help are most welcome.
Thanks,
Siddharth
Hi Siddharth,
You can achieve you requirement by creating table using subforms instead of using normal Table UI element.
Create the Table structure this way.
Table(Subform)
Row(Subform)
Name (TextField)
Description(TextField)
Put the name and description field in single column. Bind the table subform with node Data and set the property like this :
Content : Flowed
Flow Direction : Western Text
also check the "Repeat the subform for Each Data item" property.
Set the property of the Subform Row like this:
Content : Flowed
Flow Direction : top To bottom
Bind the Name & Description text field with the proper context.
Thanks & regards
Ravindra Singh
Similar Messages
-
How to set table cell renderer in a specific cell?
how to set table cell renderer in a specific cell?
i want set a cell to be a button in renderer!
how to do?
any link or document can read>?
thx!Take a look at :
http://www2.gol.com/users/tame/swing/examples/SwingExamples.html
It is very interesting, and I think your answer is here.
Denis -
How to mix table cells in keynote for ipad ?
I am trying to mix some table cells in my keyonote for iPad, but can not find how. I had created the presentation at my MacBook but when transfered for the iPad, it did lost this format.
Short answer: You can't. Selecting images for bullets only works on the Mac.
However, if you have both Keynote '09 for OSX and Keynote for iOS, you can create a dummy Keynote presentation on the Mac and add any modified bullets you need to it and then copy the Keynote dummy to your iPad using iTunes or Dropbox and then use this file on your iPad as a sort of scrap yard for bullet parts - you can open it on the iPad, COPY a slide that has the bullets that you like, close that file, open the file you want the bullets to appear and PASTE the slide. The bullets with the graphic elements you want will now behave as bullets on your iPad. Or...
If you only want the bullets, not the background slide, select the text box containing the bullets and COPY, then PASTE the Text Box where you want it on your own slide.
You may have to fiddle with fonts.
Messy, but works.
Good Luck. -
How to change Table Cell Field Type Dynamically?
Hi All,
I am fetching some news data from backend DB and displaying them in a WD Table. Now one News Item may or may not have a URL behind it. If I find the URL as null then I want to display the news as simple TextView otherwise as LinkToUrl. How can I change this input type dynamically for each row in the runtime?
If I use LinkToUrl all the time then the items which has URL as null gets displayed as normal text, but they are of very faint color and I can not change the text design. Whether if I user TextView I can set some text design like Header2, Header 3 etc.
Can anybody please help with some code block? My main requirement is how to change the table cell input type dynamically.
Thanks in Advance.
ShubhadipHi Shubhadip,
This is the sample code for creating and adding a table cell editor table dynamically.
public static void wdDoModifyView
(IPrivateDynamicTableCreationView wdThis, IPrivateDynamicTableCreationView.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
//@@begin wdDoModifyView
/*** 1.Create Table **/
IWDTable table =
(IWDTable) view.createElement(IWDTable.class, "table1");
table.setWidth("100%");
table.setVisibleRowCount(data.length);
/*** 2.Create nameColumn **/
IWDTableColumn nameColumn =
(IWDTableColumn) view.createElement(IWDTableColumn.class, "Name");
IWDCaption colHeader =
(IWDCaption) view.createElement(IWDCaption.class, "NameHeader");
colHeader.setText("¼O");
nameColumn.setHeader(colHeader);
IWDTextView nameViewer =
(IWDTextView) view.createElement(IWDTextView.class, "NameViewer");
nameViewer.bindText(nameAtt);
IWDTableCellEditor editor = (IWDTableCellEditor) nameViewer;
nameColumn.setTableCellEditor(editor);
table.addColumn(nameColumn);
IWDTableColumn nationalityColumn =
(IWDTableColumn) view.createElement(
IWDTableColumn.class,
"Nationality");
IWDTableCellEditor nationalityEditor =
(IWDTableCellEditor) nationalityViewer;
nationalityColumn.setTableCellEditor(nationalityEditor);
table.addColumn(nationalityColumn);
/** 3. Bind context to table **/
table.bindDataSource(nodeInfo);
//@@end
Bala
Kindly reward appropriate points. -
How to make table cell have certain width
Hi
i have 3 cells when i write text in any cell it effects the
width of other cells !!!
how to make every cell have certain? i mean i want to wrap
the text not to effect the cell width
thanks in advance.Hi Mac,
Try this
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
Transitional//EN">
<HTML><HEAD><TITLE>Home</TITLE>
<META http-equiv=Content-Type content="text/html;
charset=iso-8859-1">
<style>
.text-content-green {
FONT-SIZE: 11px;
COLOR: #a5a834;
LINE-HEIGHT: 20px;
FONT-STYLE: normal;
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;
TEXT-DECORATION: none;
.text-content-green:hover {
FONT-SIZE: 11px;
COLOR: #AE0B0B;
LINE-HEIGHT: 20px;
FONT-STYLE: normal;
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;
TEXT-DECORATION:underline;
.margin {
margin: 1px 1px 1px 1px;
border-style: solid;
border-top-width: 1px;
border-left-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-color: gainsboro;
</style
</HEAD>
<BODY topmargin="10px" leftmargin="0" rightmargin="0"
class="body-style">
<TABLE width="729" border="0" cellpadding="0"
cellspacing="0" cellsadding="0" align="center" class="margin">
<TBODY>
<TR>
<TD width="125" valign="top" bgcolor="#f0f0c1">
<table width="125" border="0" cellspacing="0"
cellpadding="0">
<tr>
<td width="25" height="25" align="middle"></td>
<td width="108" class="text-content-green"><A
class="text-content-green" href="default.html">LEFT
NAV</A></td>
</tr>
<tr>
<td colspan="2" align="middle"></td>
</tr>
<tr>
<td width="25" height="25" align="middle"></td>
<td width="108" class="text-content-green"></td>
</tr>
<tr>
<td colspan="2"></td>
</tr>
</table>
</TD>
<TD vAlign=top width=539 bgColor="white" height=471>
<P class="text-content-green" align=left
style="padding-left:5px">Lorem ipsum dolor sit amet, consectetur
adipisicing elit.Duis aute irure dolor in reprehenderit in
voluptate velit esse cillum .
</P>
</TD>
</TR>
</TBODY>
</TABLE>
</TD>
</TR>
</TBODY>
</TABLE>
</BODY>
</HTML>
HTH
Shanthi -
How to make table cells mandatory when visible
I have a form with two hidden subforms. Each subform contains a table with fields that need to be mandatory when visible.
The subforms are hidden or revealed based on a selection from a drop-down list.
I found the below script which works great for making a text field mandatory when visible, but, how do you apply this to cells in a table?
I can't figure it out.
if ("RMC-Fort Lupton-FIRE-DOT" == xfa.event.newText)
Table.FL.presence = "visible";
Table.FL.TextField1.mandatory ="error";
else
Table.FL.presence = "hidden";
Table.FL.TextField1.mandatory ="disabled";
if ("RMC-Ault-FIRE-DOT" == xfa.event.newText)
Table.ALT.presence = "visible";
Table.ALT.TextField2.mandatory ="error";
else
Table.ALT.presence = "hidden";
Table.ALT.TextField2.mandatory ="disabled";
Thanks in advance!Hi Bibhu,
Thanks for responding.
Here is the table structure. Rows 1 through 25 are all the same. Each row has two cells with Radio Buttons named "AsFound" and "AsLeft." Both need to be mandatory when visible. If you need more information, let me know.
Thanks!
Kurt -
How to make table cell drop down menu from an existing range in cell
Is this possible?? Checked all over the web & coming up empty. Trying to avoid re-typing in contents from previously created tables in the cell format pop-up menu. Please help.
I don't think there is an easy way to do this unless Yvan comes up with a script for you.
One option is to select the range of cells and copy/paste to TextEdit (yes, surprisingly it'll take a range of cells) then from TextEdit you can copy/paste each cell's contents one at a time to the popup menu list. Still a pain but it might be easier than other methods. The workflow I found quickest was to position TextEdit near the Inspector pane (which is open to the Cell inspector with your popup in it) and have the top of the Numbers window nearby. Double click on one cell's contents in TextEdit then Cmd-C to copy, click on the Numbers window up in the toolbar to make Numbers active again without selecting a different cell, then put the contents in the inspector (hit + then paste with Cmd-V). Repeat.
Message was edited by: Badunit -
How to replace lost Premeire Elements 8 ?
I moved and had to replace my HD, I went to reinstall PE8 but can't find my disk. I bought product, registered it and have my order number and serial number.
How can I download a copy of the install program?premiere elements 8 insta
Great news. Great job.
Please let us know if you have any questions.
Do not forget to download and install the Premiere Elements 8.0.1 Update once Premiere Elements 8 is installed.
http://www.adobe.com/support/downloads/detail.jsp?ftpID=4653
Also, disable automatic Background Rendering (Premiere Elements workspace) and the AutoAnalzyer Options (Elements
Organizer workspace).
Typically a good idea to do these downloads and installs with antivirus and firewall(s) disabled.
Best wishes
ATR -
How can a table cell span more than one page?
I need to configure a table of text that permits a single cell containing a large quantity of text to automatically span several pages. This works easily in WORD but not (apparently) in PAGES. I have used the Inspector to check that the table is configured to "Automatically resize to fit content", and that text also wraps in the cells. However, when text entered into a cell reaches the bottom of the page it disappears from view, even though more text can still be added to thst cell. Thus, the contents of the cell do not automatically flow into view on the next page (as automatically does happen in Microsoft Word). The "Pages08 User Manual", page 177, makes no reference to this facility. Neither does the video tutorial on Pages tables. Furthermore, I can find nothing in the "Template Chooser" that I can adapt to my needs. I very much doubt that this is a real limitation in Pages software - so what I am doing wrong?
Thanks, Peter. Okay, I have tried this but without too much success.
I set up a landscape, two column page and imported the Russian text. That resulted in 13 pages of Russian text, in both left and right columns. I then added the English at the end of the Russian and now have 26 pages in total. Then, as you suggest, I inserted a Column Break after the Russian. This forced the English to begin afresh on page 14.
Now I need to find a way of keeping all the Russian text in the left column of all the 26 pages so that I can have the corresponding English translation adjacent in the right column (for all pages 1 - 26). I have explored your suggestion of Layout Breaks but think I have either misunderstood you, or I am doing something fundamentally wrong!
Okay, so now I need to be a little more specific to help you visualize the problem. On my page 1, left column, I have three paragraphs of Russian. Para 4 begins close to the bottom of the left column and flows, as expected into the right-hand column of page 1. Now, if I insert a Layout Break at the end of para 3, I find paras 1-3 are uniformly shared across both the left and right columns. Para 4 stays in the left column, and understandably has moved up somewhat, but para 5, following correctly below para 4 in the left column now flows into the right column, following on from the end of para 3. There are no visual breaks, so now my page 1 left column reads paras 1, 2, first part of 3, then 4 and first part of 5, while the right column now shows the second part of para 3 and the the second part of para 5. This is confusing to understand and confusing to read. This is no good at all.
Inserting a Section Break after para 3 results in para 4 beginning in the left column of page 2 and the whole of the right column of page 1 remains blank. It also seems that that right column is now rendered inaccessible and so I will not be able to put the English of paras 1- 3 into it so that they are adjacent to the Russian paras 1-3 in the left column of page 1.
Inserting a Page Break instead of a Section Break produces the same effect.
In conclusion, I am still stumped. To keep all the Russian in the left column of all 26 pages, I would need to insert a page break at the end of every page .... but then there would seem to be no way to insert the English into the corresponding right-hand columns, beginning of course on page 1. I am surprised that such a fundamentally useful word-processing facility is so complex (or perhaps impossible) in Pages.
Thanks, again, Peter. I have to say that you have been more helpful and informed than any others that have tussled with me over this difficulty. -
How to remove table cell borders
Hi,
I’m using dreamweaver cs6.first i create a HTML page then i create a div tag (800w 900 h) & create a table inside of above div. i want to keep table border & make it to tickness, want to remove cell borders. I can’t find any options to remove the cell borders. Please any one can help me.
Thank you.table.borderless {
border-width: 0px;
background-color: white;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-weight: bold;
font-size: 1.2em;
text-align: center;
text-transform: none;
table.borderless th {
border-width: 0px;
padding: 5px;
background-color: white;
table.borderless td {
border-width: 0px;
padding: 5px;
background-color: white;
<table width="250" height="150" align="center" class="borderless">
<tr>
<th colspan="2" class="style1">Borderless table<br />
cell 1 & 2 merged</span> </th>
</tr>
<tr>
<th class="borderless">cell 3 </th>
<td class="borderless">cell 4 </td>
</tr>
<tr>
<th>cell 5 </th>
<td>cell 6 </td>
</tr>
</table> -
How to turn table cell borders on
No matter what I do, certain cell borders are turned off and they have different thicknesses. I want all borders of all cells in all tables in the page always turned on. I can't see any way to do this in CS6, the border button has disappeared. If it helps the cells can span multiple columns and/or rows. I don't see any difference in the source code for old tables created in a previous version and new tables.
CSS code:
table td {
border: 1px solid #CCC; /**adjust values as desired**/
Nancy O. -
Hello,
Could someone please help me understand how to access table cells (in report)? I have a report with a table populated from a channel. It shows, in one column, a list of names (which come from a channel). I have another channel with a list of colors and I want to associate each name in the table with a color from this second channel. I have tried without success to even access a cell using D2TabRow and D2TabCol and display the contents....
Any help is appreciated
Thanks
Solved!
Go to Solution.Hi Edna-S,
Thanks again for the help, but I am stuck at a very basic level. if I can get past that, the rest will work for me. Rather than using channels, I would like to reference elements in a table using the table row and column.
I found the script below in a previous post. Using it, I can create a two column table in Report. I added a little bit to the script and I can also change the font colour for the headers or a column.
But, I cannot figure out how to reference just one cell. If for example, I wanted to change the font colour for the third cell in the second column only, what commands should I use? In other words is there some equivalent of A= chT (row, channel) for use with tables where I could give the cell reference (row,col) and have the entry stored (A) in that cell returned?
Many Thanks!
Dim Length, Ch1, Ch2, GroupIdx
Length = 8
GroupIdx = GetCreateGroup("New Group")
Ch1 = GetCreateChannel(GroupIdx, "New Channel 1", Length)
Ch2 = GetCreateChannel(GroupIdx, "New Channel 2", Length)
For i = 1 to Length
ChDX(i, Ch1) = i
ChDX(i, Ch2) = i+5
Next
Call PicLoad("C:\DiademExercises\Table_test2.TDR")
Call GraphSheetShow("Property_table")
Call GRAPHObjOpen("2DTable1")
D2TABDATATYPE(1) = "Channel"
D2TABCHNNAME(1) = "[" & GroupIdx & "]/" & ChnName(Ch1)
D2TABDATATYPE(2) = "Channel"
D2TABCHNNAME(2) = "[" & GroupIdx & "]/" & ChnName(Ch2)
Call GRAPHObjClose("2DTable1")
Call PicUpdate
'******* GetCreateGroup() *** *** NEW Function ***
Function GetCreateGroup(GroupNameStr)
Dim ResultsGroupIdx
ResultsGroupIdx = GroupIndexGet(GroupNameStr)
IF ResultsGroupIdx = 0 THEN
Call GroupCreate(GroupNameStr)
ResultsGroupIdx = GroupCount
END IF
Call GroupDefaultSet(ResultsGroupIdx)
GetCreateGroup = ResultsGroupIdx
End Function ' GetCreateGroup()
'******* GetCreateChannel() *** *** NEW Function ***
Function GetCreateChannel(GroupIdx, ChanName, ChanLength)
Dim ResultChanNum, ChanIdx
ResultChanNum = CNo("[" & GroupIdx & "]/" & ChanName)
IF ResultChanNum = 0 THEN
ChanIdx = GroupChnCount(GroupIdx) + 1
Call ChnAlloc(ChanName, ChanLength, 1, DataTypeFloat64, "Numeric", GroupIdx, ChanIdx)
ResultChanNum = CNoXGet(GroupIdx, ChanIdx)
END IF
ChnLength(ResultChanNum) = ChanLength
GetCreateChannel = ResultChanNum
End Function ' GetCreateChannel()
Call GRAPHObjOpen("2DTable1")
D2TabNumColor(2) = "red" 'Changes font in column2 to red
D2TabTxtColor = "blue" 'Puts the header text blue in colour
Call GRAPHObjClose("2DTable1")
Call PicUpdate -
how to edit table cells ? i am trying it since 2 days. with different errors. it's throwing some null pointer exception.
public TableView getTableview() {
TableView<Contact> fx2TableView = new TableView<Contact>();
public TableColumn<String> firstNameCol = new TableColumn<String>("First Name");
fx2TableView.setLayoutX(260);
fx2TableView.setLayoutY(20);
fx2TableView.setOnMouseClicked(new EventHandler<MouseEvent>() {
public void handle(MouseEvent event) {
if(event.getClickCount()==2) {
System.out.println(fx2TableView.getEditingCell().getRow());
AccountDb myTableData = new AccountDb();
ObservableList<Contact> teamMembers = FXCollections.observableArrayList(myTableData.mymain());
fx2TableView.getItems().clear();
fx2TableView.setItems(teamMembers);
firstNameCol.setDataRetriever(new Callback<CellDataFeatures<String>, String>() {
public String call(CellDataFeatures<String> c) {
return ((Contact) c.getValue()).getFirstName();
TableColumn middleNameCol = new TableColumn("Middle Name");
middleNameCol.setDataRetriever(new Callback<CellDataFeatures<String>, String>() {
public String call(CellDataFeatures<String> c) {
return ((Contact) c.getValue()).getMiddleName();
TableColumn<String> lastNameCol = new TableColumn<String>("Last Name");
lastNameCol.setDataRetriever(new Callback<CellDataFeatures<String>, String>() {
public String call(CellDataFeatures<String> p) {
return ((Contact) p.getValue()).getLastName();
fx2TableView.getColumns().addAll(firstNameCol, middleNameCol, lastNameCol);
return fx2TableView;
}now i can see the data from table . how to edit it . i tried few statements to print a particular cell data.
by using
System.out.println(fx2TableView.getEditingCell().getRow()); or
fx2TableView.edit(fx2TableView.getColumns(fx2TableView.getEditingCell()));
System.out.println(fx2TableView.getRowFactory().call(CellDataFeatures<String> c) {
((Contact)c.getValue()).getFirstName()));
fx2TableView.getOnEditStart(new EventHandler<EditEvent>()) {
public void handle(EditEvent e) {
}); what to write ? i am totally lost . any example how to edit , save and cancel on tableview edit ?
Thanks.
Edited by: 809387 on Jun 9, 2011 9:49 AMHello User you can easily modify your Table Cell . In context of your code I've made one sample editing cell for your 'first column'.
firstNameCol.setCellFactory(new Callback<TableColumn<String>,TableCell<String>>(){
public TableCell<String> call(TableColumn<String> param) {
final StackPane stack = new StackPane();
final Label label = new Label("test");
final TextBox box = new TextBox("test");
box.setVisible(false);
//adding children to stack z-index
stack.getChildren().add(label);
stack.getChildren().add(box);
final TableCell cell = new TableCell();
cell.setNode(stack);
//event listener for textbox
box.setOnKeyPressed(new EventHandler<KeyEvent>(){
public void handle(KeyEvent event) {
if(event.getCode()==(KeyCode.ENTER)){
box.setVisible(false);
label.setText(box.getText());
box.setFocusTraversable(false);
//property Change Listener of Focus in textbox
box.focusedProperty().addListener(new ChangeListener<Boolean>(){
public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {
if(!newValue){
box.setVisible(false);
label.setText(box.getRawText());
//finally trigerring the visibility of textbox on double click
cell.setOnMouseClicked(new EventHandler<MouseEvent>(){
public void handle(MouseEvent event) {
if(event.getClickCount()==2)
box.setVisible(true);
box.requestFocus();
return cell;
});The above code runs the editing textbox when tablecell is double clicked.
You can manage the item of TableCell and make tablecell setNode() for more modification.
Please read the API for more information.
Thanks.
Narayan -
Invisible table cell boundaries
Hi you'all. Anyone out there know how to make table cell boundaries invisible so that text or graphics within a cell is superimposed over a page without boundary lines?
Hi Kath,
The delay of this reply doesn't reflect a lack of appreciation. Major distractions recently. Thanks again for your knowledge. Hopefully you work for Adobe -you've been right there for each post- and will therefore find this, despite my delayed response.
Richard -
How to colour cells in table ui element
hi,
i have to colour the cells in table ui element with diiferent colour according to the condition...
kindly suggest the same . any help will be appreciated.
thanks and regards,
sahai.sHi Sahai,
Please check below sample code..
DATA lo_nd_segment1 TYPE REF TO if_wd_context_node.
DATA lo_el_segment1 TYPE REF TO if_wd_context_element.
DATA ls_segment1 TYPE wd_this->Element_segment1.
data lt_segment1 type wd_this->elements_segment1.
DATA lv_segment TYPE wd_this->Element_segment1-segment.
data lr_column type ref to cl_wd_table_column.
navigate from <CONTEXT> to <SEGMENT1> via lead selection
lo_nd_segment1 = wd_context->get_child_node( name = wd_this->wdctx_segment1 ).
get element via lead selection
lo_el_segment1 = lo_nd_segment1->get_element( ).
lo_el_segment1 = WDEVENT->GET_CONTEXT_ELEMENT( 'CONTEXT_ELEMENT' ).
get all declared attributes
lo_el_segment1->get_static_attributes(
IMPORTING
static_attributes = ls_segment1 ).
DATA : lv_dropdown type string .
data desnval type WDUI_TABLE_CELL_DESIGN.
lv_dropdown = ls_segment1-segment. // this is drop down, based on drop down value i am setting color.
if lv_dropdown = 1.
desnval = cl_wd_table_column=>e_cell_design-badvalue_medium.
endif.
if lv_dropdown = 2.
desnval = cl_wd_table_column=>e_cell_design-criticalvalue_medium.
endif.
if lv_dropdown = 3.
desnval = cl_wd_table_column=>e_cell_design-key_medium.
endif.
if lv_dropdown = 4.
desnval = cl_wd_table_column=>e_cell_design-goodvalue_medium.
endif.
lo_el_segment1->set_Attribute(
name = 'CELL_DESIGN'
VALUE = desnval ).
Cheers,
Kris.
Edited by: kissnas on Apr 9, 2011 6:53 AM
Maybe you are looking for
-
Fixed Asset calculates extra period for Depreciation
Hi All, I have imported the Fixed Asset for 2007B for the Year 2010. while checking the import, i notice that the system calculates an additional period for depreciation. Here is my scenario : a. Asset Cost = 15,863.12 (purchased on 31-May-2007). b.
-
How to restore the Main Drive from Time Machine after replacement
I have a Late 2008 PowerBook Pro. I have a 2TB external drive for Time Machine. I replaced the main drive with a 1 TB drive and thought that i could restore from the Time Machine. I have another external drive that has an earlier OS on it. It lets me
-
PA2002: table updation problem!!
Hello all, Please suggest me function module by which i can change infotype 2002. i don't wanna change subtype. i only want to change values of begruz and endruz. Means only time details of employee. Regards, Purvesh.
-
Horizontal lines rendering lighting filter in photoshop cc how do i fix this?
I am using windows 7/64 bit and my graphics card is Nvidia FX3700
-
New Form 24 Program from April 2008
Hi Experts In Service.sap.com/hrin page and in the Note 1067264 ( New Program for Form 24Q e-File generation) It is given that from April2008 we need to use new Program for Creating F24 but when i execute the transaction it is simply the old one(Crea