Get the row of a department in a popup using a radio button
I have a use case. A page will be displayed with a button. User will click on that button, and then a popup will be displayed showing the table of departments. User will select the desired radio button. After that, the popup will close and the list of employees should get displayed in the page.
I have written a method in the valuechangeevent property of the radio button (autosubmit is also set as true), but still I am not able to get the current row. I actually need the value of departmentid.
Can anyone guide me?
public void onClickRadio(ValueChangeEvent valueChangeEvent) {
// Add event code here...
System.out.println("onClickRadio Begins");
hidePopup("p1");
DCBindingContainer bc =
(DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
DCIteratorBinding iter =
bc.findIteratorBinding("DepartmentsView1Iterator");
Row row = iter.getCurrentRow();
Number departmentId = (Number)row.getAttribute("DepartmentId");
System.out.println("departmentId: " + departmentId);
OperationBinding method =
(OperationBinding)bc.get("displayEmployeeTable");
method.getParamsMap().put("departmentId", departmentId);
method.execute();
AdfFacesContext.getCurrentInstance().addPartialTarget(empTable);
System.out.println("onClickRadio Ends");
}JDev 11.1.1.6
This is the code of the popup.
<af:popup id="p1" contentDelivery="lazyUncached">
<af:dialog id="d2" type="none">
<af:table value="#{bindings.DepartmentsView1.collectionModel}"
var="row" rows="#{bindings.DepartmentsView1.rangeSize}"
emptyText="#{bindings.DepartmentsView1.viewable ? 'No data to display.' : 'Access Denied.'}"
fetchSize="#{bindings.DepartmentsView1.rangeSize}"
rowBandingInterval="0"
selectedRowKeys="#{bindings.DepartmentsView1.collectionModel.selectedRow}"
selectionListener="#{bindings.DepartmentsView1.collectionModel.makeCurrent}"
rowSelection="single" id="t1">
<af:column sortProperty="Radio" sortable="false" id="c1"
width="20">
<af:selectBooleanRadio value="#{row.Radio}" id="ot3"
valueChangeListener="#{myBean.onClickRadio}"/>
</af:column>
<af:column sortProperty="DepartmentId" sortable="false"
headerText="#{bindings.DepartmentsView1.hints.DepartmentId.label}"
id="c2">
<af:outputText value="#{row.DepartmentId}" id="ot2">
<af:convertNumber groupingUsed="false"
pattern="#{bindings.DepartmentsView1.hints.DepartmentId.format}"/>
</af:outputText>
</af:column>
<af:column sortProperty="DepartmentName" sortable="false"
headerText="#{bindings.DepartmentsView1.hints.DepartmentName.label}"
id="c3">
<af:outputText value="#{row.DepartmentName}" id="ot1"/>
</af:column>
</af:table>
</af:dialog>
</af:popup>I think that when I select the radio button, the value might be getting true of the column, but this isn't setting the current row.
Also in the log I am getting these messages:
<SimpleSelectBooleanRadioRenderer> <renderGroupAttribute> The selectBooleanRadio component's group attribute is null. It must be set to a non-null value for the selectBooleanRadio component to function properly. The selectBooleanRadio component is meant to be used with other selectBooleanRadio components with the same group value.
Similar Messages
-
How to get the Row and Column values in ALV (without using Objects)
Hi All,
I need to get the Row / Column when double click is used in ALV, I can use the double click event for this. However, I do not want to use the Object Oriented ALV. I want to implement the same functionality using general (using functions) ALV.
Is there any way to get the row / column values for a Generia (non-OOPs) ALV report.
Please help.
Thanks,
Vishal.Hello,
The only think you have to do is to get the index where the user clicked, and then read the internal table you sent to the alv
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = 'prg_name'
i_callback_pf_status_set = 'SET_PF_STATUS'
i_callback_user_command = 'USER_COMMAND' " this is to the click event!!
i_callback_top_of_page = 'TOP_OF_PAGE'
is_layout = alv_layout
it_fieldcat = alv_fieldcat
i_save = 'A'
it_events = alv_events[]
TABLES
t_outtab = i_totmez. ---> TOUR IT.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
" then....
FORM user_commandUSING r_ucomm TYPE sy-ucomm
ls_selfield TYPE slis_selfield.
" r_ucomm -> HAS THE STATUS
" ls_selfield-tabindex -> HAS THE SELECTED INDEX
" THEN READ THE INTERNAL TABLE
" HERE YOU WILL HAVE THE SELECTED ROW
READ TABLE i_totmez INDEX ls_selfield-tabindex.
ENDFORM.
cheers,
Gabriel P. -
How to get the rows from a table having some column has any letter
Hi All,
suppose i have a table having columns id(number), code(varchar).
code has alphanumeric characters (ex. ABC123, 67B56 etc).
some codes are only numbers (2344, 7898 etc).
how can i get the rows which have alphabets in the code.
ex:
id code
1 AB45
2 456
3 890
4 67B7
how can i write a query such that it should give me the ids 1 and 4 (as they have alphabets in code)
thanks in advance to allThanks to one and all.
i am gettig my required output.
But i have a doubt in the operator.
If i add or remove '[]' in the operator, i am getting different ouputs.
There is a count difference in the result of the operators used.
REGEXP_LIKE(<column>,'[[:lower:]]')
REGEXP_LIKE(<column>,'[[[:lower:]]]')
REGEXP_LIKE(<column>,'[:lower:]')
Can anybody please explain what is the difference in using '[]', in the operator?
What is the correct syntax, whether i have to use two '[]'s or one '[]'.
Also, can i use REGEXP_LIKE() in oracle 8i version.( I am unable to use the operator in 8i)?
Any query to get the required output in 8i version?
Thanks in advance to all. -
How to get the row Count of a ResultSet
How to get the row Count of a ResultSet
Hi
I'v tried rennie1's way ,but I only get zero,my code is:
rs.executeQuery("select count(*) from t_test");
if (rs.next()) int rowCount=rs.getInt(1);
I also tried barni's way ,but the method rs.last() and rs.beforeFirst() throw a same Exception
I tried another way,the code is:
while rs.next(){
// Do nothing ,just move the cursour to the last row
int rowCount=rs.getRow()
However,the rowCount still equal zero
Any help would be greatly apprecite!
note:
I get connection by DataSource's JNDI name from client, the Server is Weblogic Server 6, the DBMS is Oracle. -
Hi list,
does any one know how I can get the row number the same as what I have in column rowno?
thanks
Arvin
REATE TABLE dbo.temptable
( y int NOT NULL,
e int not null,
c int not null,
rowno int not null)
/* insert values */
INSERT INTO dbo.temptable(y,e,c,rowno ) VALUES
(1,1,1,1),
(1,1,2,1),
(1,1,3,1),
(1,20,1,2),
(1,20,2,2),
(1,20,3,2),
(1,3,1,3),
(1,3,1,3),
(2,1,1,1),
(2,1,1,1),
(2,2,1,2),
(2,2,1,2);You may update your rownumber column with Column "e".
But why do you duplicate your data? May be there is no particular reason, you may be wasting space for it
Try the below:
CREATE TABLE dbo.temptable
( y int NOT NULL,
e int not null,
c int not null,
ronum int null)
INSERT INTO dbo.temptable(y,e,c ) VALUES
(1,1,1),
(1,1,2),
(1,1,3),
(1,20,1),
(1,20,2)
select * from temptable
update dbo.temptable Set ronum=e
Select * From dbo.temptable
DRop table dbo.temptable -
Get the rows in the same order in which it has been inserted.
Hi,
I have a table with four columns(All varchars)...and there are no primary keys
i have inserted 15 rows where col1="xyz"
Now while retrieving the same...i dont get the same in the order i ahve inserted..
What is the way to get the rows in the same order in which it has been inserted..?
RegardsI have a table with four columns(All varchars)...and
there are no primary keys
i have inserted 15 rows where col1="xyz"
Now while retrieving the same...i dont get the same
in the order i ahve inserted..
What is the way to get the rows in the same order in
which it has been inserted..?
RegardsWhy? What is your business case behind this?
In my experience an "order by" is used way too much without any real need to do it. Are your users interested to know in what order a few records from two years ago have been inserted? What about updates since that time? -
TableView -- get the row number of the top most current visible row
Is there any way to get the row number of the top most visible row, and or bottom most visible row in TableView?
If you already know the document's name, the sheet's name and the table's name, the easy way is :
--Here you may replace the three values by the current ones
set dName to 1
set sName to 1
set tName to 1
tell application "Numbers" to tell document dName to tell sheet sName to tell table tName
tell first cell of the selection range to set {rowNum1, columnNum1} to {address of its row, address of its column}
tell last cell of the selection range to set {rowNum2, columnNum2} to {address of its row, address of its column}
end tell
Yvan KOENIG (VALLAURIS, France) mercredi 9 février 2011 17:22:21 -
I can't get the row number of the current selection
Hi all,
How can I get the row number of a selection if I don't know the range selected? I need it to store in variable.
I've tried in many ways, but unsuccesfully.
Thank's in advance.If you already know the document's name, the sheet's name and the table's name, the easy way is :
--Here you may replace the three values by the current ones
set dName to 1
set sName to 1
set tName to 1
tell application "Numbers" to tell document dName to tell sheet sName to tell table tName
tell first cell of the selection range to set {rowNum1, columnNum1} to {address of its row, address of its column}
tell last cell of the selection range to set {rowNum2, columnNum2} to {address of its row, address of its column}
end tell
Yvan KOENIG (VALLAURIS, France) mercredi 9 février 2011 17:22:21 -
RowDisclosureListener af:table - Getting the Row in the Listener Method
Hi,
I am bit new to the adf. I have a requirement and it is as below.
(1) I am using only ADF faces, Not with Business Components. All values/ list comes from a ManagedBean
(2) I am displaying List of Employees in an <af:table>
(3) I have something as detailStamp
(4) For Some reason I have do some business logic (set some flag in the EmployeeBean) whenever it is Disclosed / selected
(5) One portion of it is done and that is when the row is selected.
(6) I dont know how to get the Row bean (Employee Bean) when it is disclosed
Any Ideas how to do that?
The code which I wrote to get the Employee Bean when it is selected (selectionListener) is as below and I want to do that in my RowDisclosureListener
//This Works fine//
public void messageSelectionListener(SelectionEvent selectionEvent) {
System.out.println("Entering messageSelectionListener : " + selectionEvent.getComponent().getClientId());
// set the selected message flag
if (((Employee)getSearchResultTable().getSelectedRowData()).isSelectedForView()) {
((Employee)getSearchResultTable().getSelectedRowData()).setSelectedForView(false);
TableUtils.closeRow(selectionEvent);
} else {
((Employee)getSearchResultTable().getSelectedRowData()).setSelectedForView(true);
TableUtils.discloseRow(selectionEvent);
// update table in UI
refreshTable();
//How to do it in RowDisclosureListener
public void messageDisclosureListener(RowDisclosureEvent rowDisclosureEvent) {
System.out.println("Entering messageDisclosureListener: " + rowDisclosureEvent.getComponent().getClientId());
RichTable table = (RichTable)rowDisclosureEvent.getSource();
//How to get the Employee Bean here?
refreshTable();
Thanks in Advance.Krishna,
You code did the trick. But how does M_TABLES gets updated with the record count?
Wouldn't it be advisable to get the record count from the table itself rather than M_TABLES?
Thanks. -
Problem getting the row element
hi
i have a scenario where i have filtered data from
3 listboxes and populated the data in the table .
now the table contains about 10 rows .
now i need to select a particular row in the table
and catch the particular row data of the table .
n is size of the table .
for(int i=0;i<n;i++)
if(wdContext.nodeIt_Car_Data_t().isSelected(i) {
String model=wdContext.nodeIt_Car_Data_t().currentIt_Car_Data_tElement().getP_Model();
String trim=wdContext.nodeIt_Car_Data().currentIt_Car_DataElement().getP_Trim();
but iam not able get the row data in the string where i am catching in
it_car_data_t is the table node .
model and trim are table elements .
how can i solve this ?hi
thanks for the reply , but the same issue .
problem here is when i am filtering the data for the Itemlistbox
i am catching filtered data in the String
and then setting it to a Structue IT_CAR as
Z_CAR_DATA car= new Z_CAR_DATA()
car.setMake(make)
next adding this car to the RFC
wdcontext.currentRFC.modelobject.additcar(car).
not i will get the filtered ddata in table . along with some
extra data in the table .
now i need to catch the row data then again set it
IT_CAR (which i have done above )
data i am setting is not going to IT_CAR structure .
because after i get the data in the IT_CAR strucure i can
data this to the RFC .
can any one help me out with this issue .
i need to get the row of the table and then set it
to a structure which iam not able to . -
How can you get the Row at the mouse pointer??
I got a JTable displaying info. I want to get the Index of the Row I click on.
I can getX(), getY() with a MouseListener, but I am unable to get the row index related to these coordinates.
Thanks!
OlivierSorry.
That's ridiculous. I just found the rowAtPoint(Point point) method in JTable.
Solved!! -
Hi there,
if Im in the form "41" (Batch Setup) in the grid or matrix id "35" (Rows from documents) and let say I got 3 lines and I've highlighted the second one, how can get the row nr, tipically the value under the column 0 the one with column title "#"?
There is any method to retrive that value?
Thank you
Robertoyou want to get the selected row no
you can try this
for int i=1 to oMatrix.RowCount
if oMatrix.IsrowSelected(i)==true
messageBox.Show(i);
You can Write your code here -
Need to get the row selected in table control without ay action
Dear Team,
I have a requirement in which I need to pass the row selected of a table control to a variable.
Here I need to get the row selected with out any other action
then the action of selection of a row.
Is it possible to read table control values using FM DYNP_VALUES_READ.
thanks in advance,
regards,
SaiHI,
Sai Kumar Potluri
I tried in IDES it working.
Here is the code.
REPORT ZPRA_TC_D.
TABLES : SCARR.
CONTROLS TC TYPE TABLEVIEW USING SCREEN 1.
DATA : SELLINE TYPE I,
SELINDEX TYPE I.
DATA : ACT LIKE SCARR-CARRID,
ANT LIKE SCARR-CARRNAME.
DATA : ITAB LIKE SCARR OCCURS 0 WITH HEADER LINE.
CALL SCREEN 1.
*& Module STATUS_0001 OUTPUT
* text
MODULE STATUS_0001 OUTPUT.
SET PF-STATUS 'ME'.
* SET TITLEBAR 'xxx'.
SELECT * FROM SCARR INTO TABLE ITAB.
ENDMODULE. " STATUS_0001 OUTPUT
*& Module MOV OUTPUT
* text
MODULE MOV OUTPUT.
MOVE-CORRESPONDING ITAB TO SCARR.
ENDMODULE. " MOV OUTPUT
*& Module USER_COMMAND_0001 INPUT
* text
MODULE USER_COMMAND_0001 INPUT.
CASE SY-UCOMM.
WHEN 'BACK' OR 'UP' OR 'EXIT'.
LEAVE PROGRAM.
WHEN 'SEL'.
GET CURSOR FIELD SCARR-CARRID LINE SELLINE.
SELINDEX = TC-TOP_LINE + SELLINE - 1.
READ TABLE ITAB INDEX SELINDEX.
ACT = ITAB-CARRID.
ANT = ITAB-CARRNAME.
ENDCASE.
ENDMODULE. " USER_COMMAND_0001 INPUT
In Flow Logic.
PROCESS BEFORE OUTPUT.
MODULE STATUS_0001.
LOOP AT ITAB WITH CONTROL TC.
MODULE MOV.
ENDLOOP.
PROCESS AFTER INPUT.
LOOP AT ITAB.
ENDLOOP.
MODULE USER_COMMAND_0001. -
How to get the list of values for a dynamic parameter using Web Services SDK?
<p>I am struggling to get the list of values for a dynamic parameter of a report.</p><p>I am using Java Web Services SDK ... I tried to use PromptInfo.getLOV().getValues() method but it does not work.</p><p>First of all ... is this possible (to get the list of values for a dynamic param) using Web Services?</p><p>Second of all, if this is possible, how should I do it ... it seems it works fine when running the report from CMC. It asks for DB logon info and after that it provides a list of values.</p><p>Thx </p>
<p>Your assumption is correct. We are trying to get the LOVs from the Crystal Report. I was not aware that this is not supported by Web Services SDK.</p><p>We used Web Services SDK to integrated the Crystal Reports in our web application. We implemented some basic actions for reports: schedule, view instances, run ad-hoc reports.</p><p>We encountered this problem when trying to run/schedule reports with dynamic parameters (a list of values from DB). We were unable to get the LOVs.</p><p>Please let me know if you can think of an alternative to look at.</p><p>Thanks a lot,</p><p>Catalin </p>
-
I have an Apple ID and trying to sign in for the 1st time on iTunes. When I do, I get the message: "This Apple ID has not been used with the iTunes Store. Please review your account information." When I do, it brings me to the same AppleID login window, and I get stuck in the same loop. I never get to the following screen to enter my account info. What's going on?? This is MADDENING!
If you want to use it, click Review and check your account information. Or you could contact the store support staff if you are concerned at http://www.apple.com/emea/support/itunes/contact.html for further help.
Maybe you are looking for
-
Material Document- Serial Numbers
Hi All, I have a requirement where in I have to fetch the serial numbers of line items in a material document. Please help me in this regard either if any BAPIs available or at the table level. Your help is greatly appreciated. Thanks in advance. Mod
-
Is there a standard FM which handles csv file read? I am currently using a 'split at' to separate values but this fails when some strings ( within quotes) have commas. Eg: 333,khdfs, "Company name", 87348, " Name1, Name2" In this scenerio, the last f
-
Error: "Cannot access the web server" with BlazeDS Turnkey
Help! I'm new to Flex and BlazeDS and Eclipse. I was trying to setup a Flex Project using a BlazeDS/Tomcat server running from Eclipse on Windows XP per the example in flexbandit.com/archives/55#comment-269 and in (www.infoq.com/articles/blazeds-int
-
i am not seeing all of my icons in the top toolbar. i am using green kitties, there is only 1 kitty showing. i do not have a refresh button, nor do i have a drop down button to go back to previous pages. my address bar is extremely long and i can't s
-
Copy song to ipod without itunes
Hey guys... i have a qustion how can i put a song or plug a jack from music device like guitar or other stuff without itunes?