How to avoid displaying a blank row in the table component
Hi,
I have a create insert button and a table as in a read only form.
Each time i click on a create insert button a popup appears were the person enter the corresponding values and on clicking submit button it has to show changes in the table and on clicking cancel button it has to go back to the page.
But even when i click the cancel there is still an empty row is shown in the table. Is there a way to avoid it ?
Thanks in advance.
I am using this managed bean to refresh the table.
public class popupRefreshBean
private RichTable refreshTable;
public popupRefreshBean()
public void refreshTable(ReturnEvent returnEvent)
AdfFacesContext adf=AdfFacesContext.getCurrentInstance();
adf.addPartialTarget(this.getRefreshTable());
// Add event code here...
public void setRefreshTable(RichTable refreshTable)
this.refreshTable = refreshTable;
public RichTable getRefreshTable()
return refreshTable;
}
Similar Messages
-
How to avoid editing a deleted record in a Table component
Hi! Everyon,
I am building a prototype using JSC. In Page1.jsp, I have a table displaying the records. On column one there are buttons that allow the user to edit the record, including deleting it. My problem is: when somebody else deleted a record and if the current user tries to edit the same record by clicking the edit button on the corresponding row he will get the next record. Could somebody tell me how to solve this problem? Thanks in advance.
By the way, I do not access database directly from the Web part. Instead, I dropped a session bean's method on the Table compoment. In the edit button's event handler, I use
TableRowDataProvider row = (TableRowDataProvider )getBean("currentRow");However, since that record was deleted already I always get the next record.
With best regards,
DanielThank you very much for your help. And sorry for not explaining clearly.
I have a session bean that has getCities(), getCity(String code) and other methods. getCities() returns an array of CityDO objects and getCity(String) returns a CityDO object. class CityDO basically is a JavaBean containing city code, city name and other information. When I designed the web part using Java Studio Creator, I dropped a Table component to the design view first, then dropped the EJB method getCities() onto that Table component. Up to now, it is very similar to http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/ejb.html and everything worked fine.
In order to edit a CityDO record, I added a column containg "edit" buttons into the Table component. If the user clicks the edit button we will show the CityDO in another page called editPage.jsp. In editPage.jsp, the user can update the city or simply delete it. Here is the major part of the event handler of the edit button in Page1,
public String editCity_action() {
TableRowDataProvider row = (TableRowDataProvider)getBean("currentRow");
String code = (String)row.getValue("code"); // "code" is a field in CityDO
CityDO city = null;
try {
city = cityClient1.getCity(code);
} catch (Exception ex) {
ex.printStackTrace();
return null;
getSessionBean1().setCity(city); // pass the city to editPage
return "editPage";
}Usually, the above logic is good. However, if somebody else deleted one city and the current user tries to edit that deleted city (it is still in his table), he gets the next city. The real problem is in editCity_action(),
row.getValue("code") returns an updated value, but I only need the old one.
You memtioned ArrayList. That could be a good solution. Suppose I have an ArryList containing the CityDO objects, if I can bind the table to my ArrayList that will solve my problem. Could you tell me how to do the binding in that case?
Thank you again.
With best regards,
Daniel
By the way, I do not access database directly from
the Web part. I do not understand what you mean by the above
statement.
Instead, I dropped a session bean's
method on the Table compoment. Can you explain further. What method did you drop on
the Table component?
In the edit button's
event handler, I use
TableRowDataProvider row =
(TableRowDataProvider
)getBean("currentRow");However, since that
record was deleted already I always get the next
record.Here is the delete code from
http://developers.sun.com/prodtech/javatools/jscreator
/learning/tutorials/2/inserts_updates_deletes.html.
As is is working on the rowkey in the page bean's
table, that should not be affected by other users in
other sessions, the rowkey should not change, even if
the underlying record has changed.
public String delete_action() {
form1.discardSubmittedValues("save");
try {
RowKey rk = tableRowGroup1.getRowKey();
if (rk != null) {
tripDataProvider.removeRow(rk);
tripDataProvider.commitChanges();
tripDataProvider.refresh();}
(Exception ex) {
log("ErrorDescription", ex);
error(ex.getMessage());
return null;
}What is the underlying structure for the table's
data. Is it a row cache from a query? Is it an
ArrayList? -
Need to add a blank row to a table when checkbox selected
Hi ALL,
I have a custom page having 2 check boxes and few fields , i am doing search operation by entering one checkbox checked and few other fields and data displaying in table region.
my requirement is when i select second check box and click one button as add new row it should create a blank row in the table, means table should availabe with a blank row so that user can insert data,
please help me on thsi
ThnaksHi there ,
If you 're working with advance table then you have an default option to create a blank row , please through topic 'add another row '
in jdev guide .
If you are working the regular table region then you might follow the below code suggested .
Create a new item of the type button ( not submit button ) and handle the event in PFR of your controller class
String addRow=pageContext.getParameter(EVENT_PARAM); // "addRow " is an event attached to table
if("addAnotherRow".equals(addRow))
am.invokeMethod("AddRow");
In AMimplementation class :
public void AddRow()
OAViewObject headerVO = (OAViewObject)getsdaPacelineWorkupHeaderUpdateVO1();
sdaPacelineWorkupHeaderUpdateVORowImpl rowh = (sdaPacelineWorkupHeaderUpdateVORowImpl)headerVO.getCurrentRow();
rowh.getPacelineHeaderId();
OAViewObject lineVO = (OAViewObject)getsdaPacelineWorkupLineUpdateVO1();
Row lineRow = lineVO.createRow();
Row lineRo = lineVO.last();
lineRow.setAttribute("PacelineHeaderId",rowh.getPacelineHeaderId());
lineRow.setNewRowState(Row.STATUS_INITIALIZED);
lineVO.last();
lineVO.next();
lineVO.insertRow(lineRow);
lineVO.setCurrentRow(lineRow);
lineVO.setCurrentRow(lineVO.last());
Note : Replace your vo name in place of sdaPacelineWorkupHeaderUpdateVO1()
Please let me know if you have any questions .
Regards ,
Keerthi -
How to identify one specific row in the table STPO?
Hi!
How can I identify one specific row in the table STOP? As an input for my ABAP function I have MatNr, Plant, Alternative, BomUsage and Bom Position (0010, 0020...). With these values I can ask the table MAST to get the STLNR. But how can I get all needed values to specify an entry in the table STPO then?
Thanks,
KonradHere is a actual working code that we used here.
*-- get the bom details
li_mast-mandt = sy-mandt.
li_mast-matnr = material.
li_mast-werks = '6000'.
li_mast-stlan = '1'.
call function 'GET_MAST'
exporting
all = 'X'
no_buffer = 'X'
set = 'X'
tables
wa = li_mast
exceptions
call_invalid = 1
end_of_table = 2
get_without_set = 3
key_incomplete = 4
key_invalid = 5
no_record_found = 6
others = 7.
if sy-subrc <> 0.
clear: kdf_material,
kdf_material_desc.
exit.
endif.
loop at li_mast.
*-- get the valid headers
move-corresponding li_mast to li_stko.
li_stko-stlty = 'M'.
call function 'GET_STKO'
exporting
all = 'X'
datub = l_valid_date
datuv = l_valid_date
del = ' '
no_buffer = 'X'
set = 'X'
valid = 'X'
tables
wa = li_stko
exceptions
call_invalid = 1
end_of_table = 2
get_without_set = 3
key_incomplete = 4
key_invalid = 5
no_record_found = 6
others = 7.
if sy-subrc <> 0.
continue.
endif.
loop at li_stko.
move-corresponding li_stko to li_stpo.
call function 'GET_STPO'
exporting
all = 'X'
alter = li_stko-stlal
datub = l_valid_date
datuv = l_valid_date
no_buffer = 'X'
set = 'X'
valid = 'X'
* VIEWNAME =
tables
add_wa = li_cszalt
wa = li_stpo
exceptions
call_invalid = 1
end_of_table = 2
get_without_set = 3
key_incomplete = 4
key_invalid = 5
no_record_found = 6
viewname_invalid = 7
others = 8.
if sy-subrc <> 0.
continue.
else.
exit.
endif.
endloop.
if not li_stpo[] is initial.
exit.
endif.
endloop. -
How to avoid printing a blank page when there is 'no data' in the report.
how to avoid printing a blank page when there is 'no data' in the report.
try like this
if@section:IND=1
this template
end ifsectionbreak
if@section:IND=2
this template
end if -
How to display more than 200 rows in the table?
Hi Experts,
Is that possible to display more than 200 rows in a Table.
when i query from table, it has 1000 rows, i want to display all the 1000 rows in the Table.
when i query, the values are displaying up to 201 rows only,
when i click next on 200 - 201 it throws Exception says
*"Query has exceeded 200 rows. Potentially more rows exist, please restrict your query."*
let me know how to display all the 1000 rows in a table without Exception.
Any idea will be highly appreciated.
Thanks
AswathThe number of rows retrieved is controlled by profile option "FND: View Object Max Fetch Size". I believe 200 is the default value. Pl see these MOS Docs
386402.1- Query Has Exceeded 200 Rows
275876.1 - Oracle Application Framework Profile Options Release 11i (11.5.10)
HTH
Srini -
How to add blank line below the table/row whenever there is no data
Hello Everyone,
I have a table in my report template like below:-
Children / Dependents: Name / Comments: Grandchildren: Name / Comments:
Son John Daughter Smith
Daughter Laura Son Kevin
Son Bill None NA
When i run the report I need to achieve the following conditions:-
Condition 1: Loop through all rows and whenever there is data in any row in the table...I need to Populate and print it.
Condition 2: When Loop is ended, when you see there is no data in any row in the table... add a dash line at the end of the table.
Condition 3: Total no of populated rows + blank dash line <= Max no of rows in DB. And when max no of populated rows in report = max no of rows in DB/UI ... don’t print dash line.
I want to achieve these conditions. Can you please help me.
Thanks..RitheshHello Everyone,
I have a table in my report template like below:-
Children / Dependents: Name / Comments: Grandchildren: Name / Comments:
Son John Daughter Smith
Daughter Laura Son Kevin
Son Bill None NA
When i run the report I need to achieve the following conditions:-
Condition 1: Loop through all rows and whenever there is data in any row in the table...I need to Populate and print it.
Condition 2: When Loop is ended, when you see there is no data in any row in the table... add a dash line at the end of the table.
Condition 3: Total no of populated rows + blank dash line <= Max no of rows in DB. And when max no of populated rows in report = max no of rows in DB/UI ... don’t print dash line.
I want to achieve these conditions. Can you please help me.
Thanks..Rithesh -
Excel export contains a blank row for the Report Header
Hi,
I am getting a blank row as the first row in my SSRS report when exported to excel. I have already taken care of following things,
1. I have hidden all of the Page Header items using Globals
2. The position of Report Body Tablix is 0, that means there is no space between report header and Report Body.
I have developed this Report in SSRS 2012, please let me know if any more details are required. I think even after hiding Header Items, excel creates a placeholder for page header. I can't remove header from my reports as it is needed to be published in
pdf.
Regards
MohitHi Mohit,
According to your description, you are getting a blank row as the first row in your excel report when you export the report to excel, you have hidden all the items in the Page Header by using the Globals, right?
This blank row is for the page header, although you have hidden all the items in it, but it will still display when export report to excel. Because we can’t hidden the page Header directly. Normally, we can hidden all the items in the page Header, So in
the design phase we can also see the blank area above the report body when preview.
We have an alternative way by add the “SimplePageHeaders” setting in “RSReportserver.config” file, after configuration the page Header will not display in the first row of the worksheet but is rendered to the Excel page header. In Reporting Services, the
“SimplePageHeaders” default value is “FALSE” and it indicates that the page header is rendered to the first row of the worksheet. In order to display the page header in the Header/Footer section of Excel, we need to set the “SimplePageHeaders” setting value
to “TRUE”. I did a test on my local machine and here are my steps:
Navigate to RSReportserver.config file: <drive:> Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer\RSReportserver.config.
Backup the RSReportserver.config file before modify it, open the RSReportserver.config file with Notepad format.
Set the Excel rendering extension code like this:
<Render>
<Extension Name="EXCELOPENXML" Type="Microsoft.ReportingServices.Rendering.ExcelOpenXmlRenderer.ExcelOpenXmlRenderer,Microsoft.ReportingServices.ExcelRendering">
<Configuration>
<DeviceInfo>
<SimplePageHeaders>TRUE</SimplePageHeaders>
</DeviceInfo>
</Configuration>
</Extension>
</Render>
4. Save the RSReportserver.config file.
Note: Changing the rendering extension parameters only affects rendering operations on the Report Server.
When I access to Report Manager and export the report(includes a page header) to Excel format, the blank row will disappear now.
Similar thread for your reference:
SimplePageHeader property in SSRS 2008 not working
Removing 2 top blank rows when export to excel in ssrs 2008
r2 report
You can find more detail in these articles about the page header and page footer:
Exporting to Microsoft Excel (Report Builder and SSRS)
If you still have any question, please feel free to ask.
Regards
Vicky Liu -
Pie Chart Only Displays the Data of the First Row of the Table
Hi Experts,
I have a problem that the pie chart will not change when click on a second row or other rows on the table. It only displays the data of the first row of the table. How can I set up to make it reflect on any rows when I click the table? Please help, and I would very appreciate that.
Thanks,
-DonThanks a lot for your response. I have realized that the pie chart behaves that way, so I just use the filter to see the specific data that I want. Also, you can drag the row and drop it right at the first row to see the data in the pie chart.
-
INSERTing a blank row in the result set
Hi friends,
SELECT * FROM EMPLOYEES ORDER BY DEPARTMENT_ID;
In the result of the above, I need to INSERT a blank row in the result for each DEPARTMENT_ID. i.e., the result should look like the following:
EMP_ID - NAME - SALARY - DEPARTMENT_ID
101 - Albert - 10,000 - 10
102 - Benjamin - 8,000 - 10
103 - Chitra - 10,500 - 20
104 - David - 4,500 - 20
105 - Elango - 6,000 - 20
106 - Fathima - 6,000 - 30
107 - Ganga - 9,000 - 30
etc.
I don't want to insert into the table. Just in display I need a blank row.
Thanks in advance.
Edited by: Iniyavan on Mar 8, 2010 11:37 AMAre you looking for this?
satyaki>select * from v$version;
BANNER
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
PL/SQL Release 11.1.0.6.0 - Production
CORE 11.1.0.6.0 Production
TNS for 32-bit Windows: Version 11.1.0.6.0 - Production
NLSRTL Version 11.1.0.6.0 - Production
Elapsed: 00:00:00.00
satyaki>
satyaki>select * from emp;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7369 SMITH CLERK 7902 17-DEC-80 800 20
7499 ALLEN SALESMAN 7698 20-FEB-81 1600 300 30
7521 WARD SALESMAN 7698 22-FEB-81 1250 500 30
7566 JONES MANAGER 7839 02-APR-81 2975 20
7654 MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30
7698 BLAKE MANAGER 7839 01-MAY-81 2850 30
7782 CLARK MANAGER 7839 09-JUN-81 2450 10
7788 SCOTT ANALYST 7566 19-APR-87 3000 20
7839 KING PRESIDENT 17-NOV-81 5000 10
7844 TURNER SALESMAN 7698 08-SEP-81 1500 0 30
7876 ADAMS CLERK 7788 23-MAY-87 1100 20
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7900 JAMES CLERK 7698 03-DEC-81 950 30
7902 FORD ANALYST 7566 03-DEC-81 3000 20
7934 MILLER CLERK 7782 23-JAN-82 1300 10
14 rows selected.
Elapsed: 00:00:00.00
satyaki>
satyaki>break on deptno
satyaki>
satyaki>
satyaki>select empno,
2 ename,
3 sal,
4 deptno
5 from emp
6 order by deptno;
EMPNO ENAME SAL DEPTNO
7782 CLARK 2450 10
7839 KING 5000
7934 MILLER 1300
7566 JONES 2975 20
7902 FORD 3000
7876 ADAMS 1100
7369 SMITH 800
7788 SCOTT 3000
7521 WARD 1250 30
7844 TURNER 1500
7499 ALLEN 1600
EMPNO ENAME SAL DEPTNO
7900 JAMES 950 30
7698 BLAKE 2850
7654 MARTIN 1250
14 rows selected.
Elapsed: 00:00:00.04
satyaki>
satyaki>Regards.
Satyaki De. -
Web Dynpro for ABAP:How to insert and delete a row in a table
I have a table.
My requirement is to insert a row into the table and i want to delete a particular row also.
How can i do it.
Plz reply me..Try the Web Dynpro for ABAP forum:
Web Dynpro ABAP
Kind Regards
Stefanie -
How to set max. number of rows in a table?
Hi,
I'm working on a SCADA interface. In this application there are different tables with vertical scroll bar.
I prefer to make visible only the initialized rows (I've initialized 40 blank rows of a table with a string array). Since the window not contain all 40 rows but only 20 rows, I set the rows number of "table properties window" to 20; so I added a vertical scroll bar.
Now, when a user scroll the scroll-bar, he can view not only the 40 rows initializated, but an undefined number of rows.
There's a way to visualize only a limited number of rows?
Thanks in advance!duplicate
LabVIEW Champion . Do more with less code and in less time . -
Exaprom PDF: how may cells span multiple rows in the table body?
I'm using Exaprom PDF but I have a case I just can't get to work.
I would like to generate a table where a cell spans on an entire row in the table body, the table should result as:
|__|__|__|__|
|__|__|__|__|
|___________|
|__|__|__|__|
Dear Jean-Marc,
could you post an example how to span a cell on an entire row in the table body with the function "Append Customized Table.vi."
For the example, please use the 2009 version.
Thanks,
Asper
This post refers to the Exaprom PDF report generation toolkit:
https://decibel.ni.com/content/docs/DOC-10952
Solved!
Go to Solution.Maybe this.
Jean-Marc
LV2009 and LV2013
Free PDF Report with iTextSharp
Attachments:
Test Table Merge LV2009.vi 113 KB -
The AIR SDK we used is 1/14/2014 Release - AIR 4.
The device we have tested on is Samsung Galaxy Note 3/Android 4.4.
We found that it's quite similar with Bug 3681788 which has been fixed in Beta version 4.0.0.1619.
We checked the issue again with this beta version, and the result is Chinese characters are shown correctly, but Korean's are still not.
Bug 3681788: The CCJ languages characters are displayed as blank box on the TextField.
Hope it can be fixed as soon as possible.Japanese Characteres have same issue.
We tested on ASUS Nexus 7/Android 4.4.2/AIR 4.0 and Japanese characters are displayed as blank box in the TextField.
The AIR SDK we used is February 20th 2014 Release - AIR 4.
The device we have tested on is ASUS Nexus 7/Android 4.4.2.
AIR SDK 3.6 worked fine.
AIR SDK 3.9 has same issue.
We tested Chinese on ASUS Nexus 7/Android 4.4.2/AIR 4.0, and Chinese Characters are displayed as blank box in the TextField.
I doubt that Korean Characters will also displayed as blank box.( Sorry we cannot read or write Korean so we couldn't test it)
I am guessing GalaxyNote 3(4.4) may also have same issue with Japanese.
Hope this helps
Kenta -
Chinese characters are displayed as blank box on the TextField in Taiwan Android 4.4.2/AIR4.0, such as Nexus7, HTC One, but in mainland China Nexus7(Android 4.4.2/AIR4.0) showed normal
AIR SDK is 4.0.0.1628.
Hope it can be fixed as soon as possible.
Here is test code:
package
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.text.Font;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormat;
public class TestFont extends Sprite
public function TestFont()
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
var sprite:Sprite = new Sprite();
var value1:String = "简体中文测试";
var value2:String = "繁體中文測試";
var txt11:TextField = createTextField(null, "11 "+value1);
txt11.x = 10;
txt11.y = 10;
sprite.addChild(txt11);
var txt12:TextField = createTextField(null, "12 "+value2);
txt12.x = txt11.x + txt11.width;
txt12.y = txt11.y;
sprite.addChild(txt12);
var txt21:TextField = createTextField("STHeitiTC-Medium","21 "+value1);
txt21.x = 10;
txt21.y = txt11.y + txt11.height;
sprite.addChild(txt21);
var txt22:TextField = createTextField("MSYH","22 "+value2);
txt22.x = txt21.x + txt21.width;
txt22.y = txt21.y;
sprite.addChild(txt22);
var lastY:int = txt22.y + txt22.height;
var fonts:Array = Font.enumerateFonts(true);
var index:int = 0;
for each (var font1:Font in fonts)
index++;
var txtF:TextField = createTextField(font1.fontName, index + "/" + fonts.length + " " + font1.fontName + " "+value1 +" " + value2);
txtF.x = 10;
txtF.y = lastY;
sprite.addChild(txtF);
lastY += txtF.height;
addChild(sprite);
public function createTextField(font:String, value:String):TextField{
var txt:TextField = new TextField();
txt.autoSize = TextFieldAutoSize.LEFT;
var format:TextFormat = new TextFormat();
if(font != null){
format.font = font;
txt.defaultTextFormat = format;
txt.setTextFormat(format);
txt.text = value;
var dformat:TextFormat = txt.defaultTextFormat;
if(dformat != null){
txt.text = value + " |" + dformat.font;
if(font != null){
txt.setTextFormat(format);
return txt;I am in mainland China, my Nexus7 can display chinese characters, but my friend in Taiwan, his android4.4.2 display chinese characters as blank.
I don't understand the reason.
By the way, TextFormat.font don't work, whatever I set any fonts, display are the same.
My screenshots:
Taiwan's screenshots:
Maybe you are looking for
-
How do I convert a document into a jpeg?
How do I convert a Word document into a jpeg?
-
Something is wrong with some of my PSD files when I save them?
I am working with Photoshop Cs5 extended, and I have had it for about a year, I work in Windows 7. I was working on a comic when my scanner broke so I took pieces of the skecthes I drew instead to paint them in photoshop with my cannon powershot came
-
Could you tell me the automatic clearing configuration
I want to know the automatic clearing configuration.i have seen f.13, in that i have executed , but i am unable to understand the importance and its configuration for GL,AP,AR AND ASSET ACCOUNTING. please help thank you for your valuable time
-
Bug in RichText fields default style
The Microsoft version of Adobe Reader crashes, if the default style (DS) attribute of the widget dictionary has a trailing semicolon. E.g. crashes if /DS(font-family:'Courier'; font-size:10pt; ) This will work: /DS(font-family:'Courier'; font-size:10
-
Can't connect to airport extreme after installing 10.10
After installing OS X 10.10 WiFi connection with Airport Extreme drops out a couple of different ways. Log in fails, Says Airport extreme is not there (2ft away), drops data connection with all WiFi bars showing. Drops data connection mid data trans