How to resolve #{row} of af:table in custom tag class?
Hi all,
My customer creates custom converter tag with some attributes. When they use it outside af:table, it works as expected.
However when they use it in af:table and set "#{row.value}" into the tag's attribute, it doesn't work because it can't resolve #{row} EL expression.
The method they wrote is like below.
private Object getExpressionValue(ValueExpression expression) {
if (expression == null) {
return null;
final ELContext elContext =
FacesContext.getCurrentInstance().getELContext();
return expression.getValue(elContext);
Does anyone know the way to do resolve #{row} expresison in custom tag class?
If you share sample codes, it will be much appreciated.
Regards,
Atsushi
Hi,
the row variable is a temporary variables, which means that #{row} may work when the table renders but not when users edit fields in a table and then submit the change. You don't really mention what doesn't work for your customer (and wouldn't it be better your customer could post here on OTN to avoid you becoming a dispatcher?) . An expression #{row.value} for example doesn't exist unless your customer uses a POJO model that has a property "value" in which case the entity has a setValue/getValue.
Frank
Similar Messages
-
How to insert row in usercreat table(useing HTML tags)in jtextPane
hi all
i creat userdefined table in JTextPane like this
tableBody.toString() -- iam passeing table tags
htmlKit.insertHTML(htmlDoc, caretPos, tableBody.toString(), 0, 0, HTML.Tag.TABLE);
i want to insert a row in table.. i did like this
htmlKit.insertHTML(htmlDoc, caretPos, sRow.toString(), 0, 0, HTML.Tag.TR); it working..
but it inserting in current location.. i want to insert ending of table...
pls help meHi,
Follow the below logic,
PROCESS BEFORE OUTPUT.
MODULE STATUS_0001.
MODULE POPULATE_TABLE_CONTROL. --> Get the data from table store in
ITAB
LOOP AT GT_CTRL_LP_D516 INTO GS_WA_CTRL_LP_D516
WITH CONTROL CTRL_LP_D516
CURSOR CTRL_LP_D516-CURRENT_LINE.
The following module moves data to control
MODULE MOVE_TO_CONTROL.--> Move data from ITAB to table control
ENDLOOP.
PROCESS AFTER INPUT.
LOOP AT GT_CTRL_LP_D516.
ENDLOOP.
MODULE EXIT AT EXIT-COMMAND.
MODULE USER_COMMAND_0001. --> Here you have to take out the values from table control and update database table
Reward points if helpful.
Thanks and regards,
Mallareddy Rayapureddy,
Munich, Germany. -
How to call a method repeatedly with JSP custom tag?
This senerio is very similar to the usage of StringBuffer.
I have a problem which can be solved easily with scriptlets:
<% NameValuePair nvp = new NameValuePair(request.getQueryString()); %>
<a href="foo.html?<%=nvp.add(name1", "value1").add("name2", "value2").toString();%">">Foo</a>
<a href="bar.html?<%=new NameValuePair(request.getQueryString()).add("x", 1).add("y", 2).toString()%>">Bar</a>
But I cannot use scriplets because it's turned off. I can only use jsp custom tag / jstl. How would I implement this functionality with a custom tag? How would the JSP code look like? Our container supports JSP 2.0.
Thanks.</a>hi,
you can do within 2 step-
1) use <%@page import="your_java_class"%>
2)use scriptlet code <%...%> and write coding in this tag.
means create instance of your java class .
<% your_java_class obj1=new your_java_class();
obj1.method_of_your_java_class();
%>or
3) you can make javabean to use method of java class.[Best option]
Thanx
Ranvijay -
How get all rows of a table with a BAPI
Hi,
how is it possible to get more then one row by calling a BAPI from the WD. In my Application I need the rows of a Table coming from the r/3 System. How is it possible to get all the rows after the first call? What is the logic behind it? My purpose is also to create an own BAPI.
regards,
Sharam
nullHi,
If I understand, you don't want display the result into a Web Dynpro Table. If so, after the execution, the result of your request is stored into the context. Then you don't really need to transfert the data from your context to an Java Array.
But if you want to do it, here is the code :
guess your result node called
nodeResult
Vector myVector = new Vector();
for (int i = 0; i < wdContext.nodeResult().size(); i++){
myVector.put(wdContext.nodeResult().getElementAt(i));
I hope this will answer to your question.
Regards -
How to increase row height in table control?
Hi experts,
We have a push button in table control created using screen painter. Since this is a touch screen transaction, the default height is very small for the worker in the plant to click on a specific row, i would like to know if there is any way to increase the row height in the table control. There is no attribute in Screen painter for increasing row height in table control. I did try "import dynpro", hoping to increase the row height and export the dynpro, but that doesn't seem to have row height attributes. Any help in this regard is highly appreciated. Thanks,
RajUsing a new technology means you have to recreate your screen: you may create an HTML using CL_DD_* classes (that's called "Dynamic Documents"). See [SAP Library - DD programming guide|http://help.sap.com/saphelp_nw2004s/helpdata/en/13/12284b019511d4a73e0000e83dd863/frameset.htm]. Demos are provided in SDYNAMICDOCUMENTS package. Or I think you may create web dynpro and define a CSS style to enlarge objects.
If you don't want to create everything, maybe you can find out a workaround with GuiXT, for example creating a big button in each row (for example, with BUTTONSIZE, but don't know if it changes the height of rows but that's worth trying).
Well, [Synactive documentation about table controls|http://www.synactive.com/docu_e/specials/tables.html] does not seem to allow that.
Maybe you can move your question to the "scripting" forum and ask about how to do it with GuiXT... -
How to find row changes in table
How can we find row changes in table and i want o find out any significant change in the row information in 11g db.
hi thanks for ur help
but i had one more problem
already i tried this one
at particular time i am getting that record
........................ col1 col2 col3 col4 col5
3/17/2012 11:55 AM 10 20 30 40 50
3/17/2012 12:00 PM 0 0 0 0 0
3/17/2012 12:05 PM 12 22 32 42 52
see here at 12:00 PM i got the null or zero values.so instead of null values i need consecutive record means below row like 12:05 row values i need
output is:
.......................... col1 col2 col3 col4 col5
3/17/2012 11:55 AM 10 20 30 40 50
3/17/2012 12:00 PM 12 22 32 42 52
3/17/2012 12:05 PM 12 22 32 42 52
its very urgent plz help to me.
Edited by: 913672 on Mar 17, 2012 6:35 AM
Edited by: 913672 on Mar 17, 2012 6:36 AM
Edited by: 913672 on Mar 17, 2012 6:36 AM -
How to get row index in table?
I will show row no in table.
In help,I find a example and follow it,I test:
<bc4j:column attrName="Fdesc">
<columnHeader>
<bc4j:sortableHeader text="rowSetProperty"/>
</columnHeader>
<contents>
<bc4j:input readOnly="true">
<boundAttribute name="text">
<bc4j:rowSetProperty name="estimatedRowCount"/>
</boundAttribute>
</bc4j:input>
</contents>
</bc4j:column>
It's OK! But I couldn't get current row index.
I test:
<bc4j:column attrName="Fdesc">
<columnHeader>
<bc4j:sortableHeader text="rowSetProperty"/>
</columnHeader>
<contents>
<bc4j:input readOnly="true">
<boundAttribute name="text">
<bc4j:rowSetProperty name="currentRowIndex"/>
</boundAttribute>
</bc4j:input>
</contents>
</bc4j:column>
It's error! How can I do?Thanks
I try:
<bc4j:column attrName="Fdesc">
<columnHeader>
<bc4j:sortableHeader text="Seq No"/>
</columnHeader>
<contents>
<textInput readOnly="true">
<boundAttribute name="text">
<bc4j:rowSetIteratorProperty name="currentRowIndex"/>
</boundAttribute>
</textInput>
</contents>
</bc4j:column>
Nothing be showed in the table cells.
Here, I finished using Javabean:
public class ClsRowIndexBean
private int _counter=0;
public ClsRowIndexBean()
public int getCounter()
return _counter++;
public int getCurrentCounter()
return _counter;
public void setCounter(int counter)
_counter = counter;
} -
How to limit rows for a table?
Hi,
does anyone knows a good way to limit the number of rows for a table?
thanks
aldoYou can limit the number of rows using a trigger. Below is quick and dirty example that has not been fully tested.
test@ORCL> create table rowlimit (col1 number);
Table created.
Elapsed: 00:00:00.34
test@ORCL> create or replace trigger limit_rows
2 before insert
3 on rowlimit
4 declare
5 v_count number;
6 begin
7 select count(*)
8 into v_count
9 from rowlimit;
10
11 if v_count >= 4 then
12 raise_application_error(-20000, 'Table can have no more then 4 rows');
13 end if;
14 end;
15 /
Trigger created.
Elapsed: 00:00:00.09
test@ORCL> insert into rowlimit values(1);
1 row created.
Elapsed: 00:00:00.03
test@ORCL> insert into rowlimit values(2);
1 row created.
Elapsed: 00:00:00.00
test@ORCL> insert into rowlimit values(3);
1 row created.
Elapsed: 00:00:00.00
test@ORCL> insert into rowlimit values(4);
1 row created.
Elapsed: 00:00:00.00
test@ORCL> insert into rowlimit values(5);
insert into rowlimit values(5)
ERROR at line 1:
ORA-20000: Table can have no more then 4 rows
ORA-06512: at "TEST.LIMIT_ROWS", line 9
ORA-04088: error during execution of trigger 'TEST.LIMIT_ROWS'
Elapsed: 00:00:00.04
test@ORCL> commit;
Commit complete.
Elapsed: 00:00:00.00
test@ORCL> select count(*) from rowlimit;
COUNT(*)
4
Elapsed: 00:00:00.00
test@ORCL> -
How to fetch rows from a table like search engines do?
Is it possible to fetch rows from a table like Google does? I want to fetch row number 20-40 after the select has ordered the rows.
Pseudo code: select * from log where rownum > 20 and rownum < 40 order by date;
Rownum doesn't work with ordering so I tried:
select * from log where (select * from log order by date) and rownum <20;
But that still doesn't do what I want. I get the "top 20" rows but I can't get rows 20-40.
My real table has 70000 rows and I want to select 69000-70000 so I really need a SQL do fetch only the rows I need.
Any help would be very appreciated!
Best regards,
Christer NordvikSELECT alias_for_rownum, column_names
FROM (SELECT ROWNUM AS alias_for_rownum, column_names
FROM (SELECT column_names
FROM table_name
ORDER BY columns_to_order_by)
WHERE ROWNUM <= last_row_you_want)
WHERE alias_for_rownum >= first_row_you_want
Example:
-- (This example uses the Oracle dept demo table.
SET AUTOTRACE ON EXPLAIN
SELECT rn, deptno, dname, loc
FROM (SELECT ROWNUM AS rn, deptno, dname, loc
FROM (SELECT deptno, dname, loc
FROM dept
ORDER BY deptno)
WHERE ROWNUM <= 3)
WHERE rn >= 2
RN DEPTNO DNAME LOC
2 20 RESEARCH DALLAS
3 30 SALES CHICAGO -
How to delete the committed row from a table from its VOImpl class ??
I am new to ADF and I have problem to solve. To perform roll back I am using fetching key before roll back and setting it after undo operation, so that I can stay back in the currently selected row. But in my case I am using application model commit for one LOV attribute selection in the row. So when ever I am performing roll back operation after inserting a row, the values other than this committed LOV attribute gets roll backed, but I need remove the entire row from table. Does there any option to remove a row based on the attribute values of a row from VO's row implementation or from bean class in a performance optimized way ?
Thanks in advance..........http://java.sun.com/javase/6/docs/api/javax/swing/table/DefaultTableModel.html#removeRow(int)
Why did you mark it answered but gave no dukes to finalight? That's not how it works.
You should mark his answer as correct and give him at least one duke, for the effort! -
How to Transfer Rows from one table to another in a different Page
Hi Friends,
My problem is; I need to call a custom page as a popup using Java-Script. ( This is because our business users want the multi-select LOV to look and function differently ).
I have a table in the popped-up page from where; upon a button action I need to close the pop-up and transfer the selected rows , back to the base-page's table.
( Both the Base Page and the Pop-Up are Custom Pages.)
Please find below the AM code that I call before closing the window using Java Script.
But the Base-Page table remains un-disturbed. Can you please show me how to do the transfer of records if possible ?
OAViewObjectImpl main_vo = getBasePageTableVO1();
OAViewObjectImpl sel_vo = getPopupPageTableVO1();
int fetchedRowCount = sel_vo.getFetchedRowCount();
RowSetIterator iterator = sel_vo.createRowSetIterator("SelectedRows_Iterator");
if (fetchedRowCount > 0)
iterator.setRangeStart(0);
iterator.setRangeSize(fetchedRowCount);
for (int i = 0; i < fetchedRowCount; i++)
PopupPageTableVORowImpl row = (PopupPageTable)iterator.getRowAtRangeIndex(i);
BasePageTableVORowImpl main_row = (BasePageTableVORowImpl)main_vo.createRow();
if (main_vo.getFetchedRowCount() == 0)
main_vo.setMaxFetchSize(0);
main_vo.setWhereClause(" 1 = 0 ");
main_vo.executeQuery();
main_vo.setCurrentRow(main_vo.last());
main_vo.next();
main_vo.insertRow(main_row);
main_row.setNewRowState(main_row.STATUS_INITIALIZED);
main_vo.setCurrentRow(main_row);
try
main_row.setField1(row.getField1());
main_row.setField2(row.getField2());
main_row.setField3(row.getField3());
catch(JboException _ex)
iterator.closeRowSetIterator();Thanks Ramkumar. I am able to catch the action after I used formSubmit .
The below lines in processRequest declares the function cszRefreshBase and later; on attaching the function name in the open window java script call, I get my desired functionality.
StringBuffer stringbuffer = new StringBuffer();
stringbuffer.append("function cszRrefreshBase(lovwin, event) ");
stringbuffer.append("{ ");
stringbuffer.append(" if (!lovwin.PopupSL) ");
stringbuffer.append(" return false; ");
stringbuffer.append(" submitForm('DefaultFormName', 0, {'cmePopupEvent':'popupUpdate'}); ");
stringbuffer.append("}");
oapagecontext.putJavaScriptFunction("cszRefreshBaseJS", stringbuffer.toString()); -
How to convert rows of internal table to columns of another internal table?
Hi,
Experts,
test_data.xls:
one two three four five
one two three four
one two three
one two
one
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
FILENAME = 'c:/test_data.xls'
I_BEGIN_COL = '1'
I_BEGIN_ROW = '1'
I_END_COL = '10'
I_END_ROW = '10'
TABLES
INTERN = it_tab
EXCEPTIONS
INCONSISTENT_PARAMETERS = 1
UPLOAD_OLE = 2
OTHERS = 3
output:
0001 0001 one
0001 0002 two
0001 0003 three
0001 0004 four
0001 0005 five
0002 0001 one
0002 0002 two
0002 0003 three
0002 0004 four
0003 0001 one
0003 0002 two
0003 0003 three
0004 0001 one
0004 0002 two
0005 0001 one
but i want this format:
one two three four five
one two three four
one two three
one two
one
i don't want this type of output display i want to display in ABAP report as in file format how can i achieve this post some ideas on it.
Thank U,
Shabeer ahmed.Hi,
Use this piece of code :
parameters: p_flname type rlgrap-filename.
data:
li_filecontent type standard table of alsmex_tabline ,
lwa_filecontent type alsmex_tabline ,
lv_begin_col type i value 1,
lv_begin_row type i value 1,
lv_end_col type i value 17,
lv_end_row type i value 65000,
li_fieldlist type lvc_t_fcat,
li_data type ref to data,
dy_line type ref to data.
field-symbols:<dyntable> type standard table,
<fs_data> type ref to data,
<fs_1>,
<dyn_wa>,
<dyn_field>.
*Transfer excel file contents to internal table
call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
exporting
filename = p_flname
i_begin_col = lv_begin_col
i_begin_row = lv_begin_row
i_end_col = lv_end_col
i_end_row = lv_end_row
tables
intern = li_filecontent
exceptions
inconsistent_parameters = 1
upload_ole = 2
error_message = 3
others = 4.
if sy-subrc = 0.
*Creating the list of fields in the table
perform f_create_tab_field tables li_fieldlist using 'BUKRS' 4 .
perform f_create_tab_field tables li_fieldlist using 'ZPOC_KUNNR' 10 .
perform f_create_tab_field tables li_fieldlist using 'RANL' 13.
perform f_create_tab_field tables li_fieldlist using 'ZPEDAT' 10 .
perform f_create_tab_field tables li_fieldlist using 'KWERT' 15 .
perform f_create_tab_field tables li_fieldlist using 'BONUS' 2 .
perform f_create_tab_field tables li_fieldlist using 'WAERS' 5 .
perform f_create_tab_field tables li_fieldlist using 'ZVAL' 15 .
perform f_create_tab_field tables li_fieldlist using 'ZQTY' 15 .
perform f_create_tab_field tables li_fieldlist using 'KMEIN' 3 .
assign li_data to <fs_data>.
*CREATING INTERNAL TABLE TO store data
call method cl_alv_table_create=>create_dynamic_table
exporting
it_fieldcatalog = li_fieldlist
importing
ep_table = <fs_data>
exceptions
generate_subpool_dir_full = 1
others = 2.
if sy-subrc = 0.
assign <fs_data>->* to <fs_1>.
assign <fs_1> to <dyntable>.
Create dynamic work area and assign to FS
create data dy_line like line of <dyntable>. " creating a line type of the table just created above
assign dy_line->* to <dyn_wa>. " creating the work area with reference to the line type
loop at li_filecontent into lwa_filecontent.
assign component lwa_filecontent-col "accessing corresponding field in the field catalog
of structure <dyn_wa> to <dyn_field>. "and assigning this field to a field symbol
if sy-subrc = 0.
<dyn_field> = lwa_filecontent-value. " filling value for this field
endif.
at end of row.
append <dyn_wa> to <dyntable>.
clear <dyn_wa>.
endat.
clear lwa_filecontent.
endloop.
i_input_file[] = <dyntable>.
endif.
elseif sy-subrc <> 0.
message s027 display like c_error with text-001.
stop.
endif.
form f_create_tab_field tables p_li_fieldlist structure lvc_s_fcat
using p_fname
p_lenght.
data:lwa_fieldlist type lvc_s_fcat.
lwa_fieldlist-fieldname = p_fname.
lwa_fieldlist-intlen = p_lenght.
append lwa_fieldlist to p_li_fieldlist.
clear lwa_fieldlist.
endform. " F_CREATE_TAB_FIELD
Regards,
Dev. -
How to expand rows in a table by calculated value of a field
Hi,
I'm trying to set the rows of an expandable table to follow the calculated value of a field.
The calculated field comes from two date fields that calculate the number of days and I want my table/row to expand based on that number..
Is is possible? Right now I have a button that does add an instance "Admin_Use.Table3._Row1.addInstance(1);" but I want it to be triggered by the calculated field instead...
Thank you so much!!!!Hi Niall,
Thank you for your reply. I'm still a bit puzzled as right now I have this code in my calculate field (see below) under the calculated event and I'm not sure how to insert the code you sent me as I keep getting syntax errors. Any help will be greatly appreciated!!!
if (HasValue(Nights.FirstNight) & HasValue(Nights.LastNight) ) then
if (Date2Num(Nights.LastNight, "YYYY-MM-DD", "en_IE") >= Date2Num(Nights.FirstNight, "YYYY-MM-DD", "en_IE")) then
$ = Date2Num(Nights.LastNight, "YYYY-MM-DD", "en_IE") - Date2Num(Nights.FirstNight, "YYYY-MM-DD", "en_IE") + 1
else
xfa.host.messageBox ("The first night cannot be after the last night", "Nights Covered", 0)
Nights.LastNight.rawValue = null
endif
else
endif -
How to find rows in F table of a cube for a given request ID
Can someone tell me how to find the rows in the F table of a cube for a given request id?
Hi,
Copy the Request ID number of that cube and go to manage of the cube and select contents tab, select Infocube content,
select list of objects to be displayed with results and in that screen give Request ID at Request ID row and at bottom Max no. of Hits keep blank and execute at the top.
this will display all the data rows loaded with that request. this is records from cube.
from Fact table, go to SE11, give /BIC/FXXXX "XXXX" is cube name for custom cube.
get the SID of that cube from the Cube contents as mentioned above, for field select for output along with Request ID select Request SID also.
from SE11 give table /BIC/DXXXXXP "XXXX" is cube name for custom cube. P for Packet Dimension. here pass reqest SID in 'SID_0REQUID' and get value for DIMID.
pass this DIMID into KEY_XXXXP, this give the fact table rows for that request DIM ID.
hope this helps
Regards
Daya Sagar -
How to populate rows from another table in new blank rows of other table
I have to convert an oracle form 6i to Jdeveloper application. In forms 6i we use create a cursor for other table and then populate the current table data block row using create record and assigning its values from cursor and then issuing next record until all cursor records are written in data block. After some manual editing we save the whole form and then all block records are saved as new rows in table.
Now how to create this functionality in jdeveloper application.
Kindly help.two steps-
1. get row from first VO.iterate them - like below -
DCBindingContainer bindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
DCIteratorBinding dcIteratorBindings = bindings.findIteratorBinding("ViewObj1Iterator");
HSSFRow excelrow = null;
// Get all the rows of a iterator
oracle.jbo.Row[] rows = dcIteratorBindings.getAllRowsInRange();
int i = 0;
for (oracle.jbo.Row row : rows) {
row.getAttribute(colName).toString()); // by this you can get row attribute value..
2. inside iteration create row for VO 2 for example-
ViewObject employee= findViewObject("EmployeeVO");
// Create a row and fill in the columns.
Row row = employee.createRow();
row.setAttribute("Name", "Vinay");
row.setAttribute("EmpId", 1);
//Insert row in to the default row set
employee.insertRow(row);
Read more: http://www.techartifact.com/blogs/2012/12/creating-new-row-of-view-object-in-adf-techartifact.html#ixzz2iL978UOD
http://www.techartifact.com/blogs/2012/12/creating-new-row-of-view-object-in-adf-techartifact.html
Maybe you are looking for
-
How do I reformat the size of images and text on page to fit in normal full screen?
Recently my computer crashed due to age. I can reboot the system and have done so reinstalling all programs using Windows. I have Firefox that I use but my homepage is set to aol as this is my email address. IT was on Sunday evening Dec. 26th that my
-
Hard drive on Mac Book was changed to a SSD, reinstall from time machine backup and this is the message I get when I try to run Illustrator. Any ideas?
-
The iphone cannot be synced. you do not have enough access privileges for this operation
The iPhone"Kyle's iPhone" cannot be synced. You do not have enought access privileges for this opperation. what do i do?
-
I lost allmost all my photos from icloud how i can get them back?
I had ipad 2 and i backed up to icloud.then i bought ipad3 tryed to get all the photos (around 1000)and only 65 came to my ipad3 and to my iphone 5 am i doing something wrong?
-
Hi All, While implementing an Oss note using SNOTE it is giving a popup asking to implement a prerequisite note, but this prerequisite note is already in status "Implemented completely" and processing status was set to "Completed" earlier. What could