OAMessageRadioButtonBean - the selected value changes after a processFormRe
Hi,
I have a page with 3 OAMessageRadioButtonBean grouped together
When I do a search (processFormRequest) I read the value of my radiobutton group and
do different search depending on the value. It works fine, but when the page is displayed with the search result, the last radiobutton in the group is always selected.
Anyone how know how to keep the original value or to set it again. You are not allowed to do that in the processFormRequest.
Regards Martin
I had the same problem few months back.
Here is the code to handle the issue. In the processFormRequest code something like below to forward to the same page (i.e to call processRequest), with one parameter to indicate which radio button selected ( in this case, strEventName)
if((strEventName!=null) && (strEventName.endsWith("Filter")))
String strFilterCode = pageContext.getParameter("LineFilterGroup");
HashMap params2 = new HashMap(2);
params2.put("QotHdrId",qotHdrId);
params2.put("FilterCode",strFilterCode);
pageContext.setForwardURLToCurrentPage(params2
,true
,OAWebBeanConstants.ADD_BREAD_CRUMB_NO
,OAWebBeanConstants.IGNORE_MESSAGES);
// Serializable [] updParams = {qotHdrId,strFilterCode};
// am.invokeMethod("applyLinesFilter",updParams);
And in the processRequest, based on the value in the params, set the RB to be selected.
here is some code
String strFilterCode = pageContext.getParameter("FilterCode");
if (!("".equals(strFilterCode)) && strFilterCode!=null)
String qHdrId = pageContext.getParameter("QotHdrId");
if ("SALES".equals(strFilterCode))
salesBtn.setSelectedValue(strFilterCode);
tableBean.setText("Quote Lines - Sales Items Only");
else if ("ALL".equals(strFilterCode))
allBtn.setSelectedValue(strFilterCode);
tableBean.setText("Quote Lines - All");
else
invalidBtn.setSelectedValue(strFilterCode);
tableBean.setText("Quote Lines - Invalid Lines Only");
am.invokeMethod("setQotCtx",params);
Serializable [] modeParams = {strFilterCode};
am.invokeMethod("handleEditModeChangeEvent",modeParams);
Serializable [] filterParams = {qHdrId,strFilterCode};
am.invokeMethod("applyLinesFilter",filterParams);
// throw new OAException(strFilterCode,OAException.INFORMATION);
Hope this helps.
Similar Messages
-
Unable to set the selected value for a ADF LOV
Hi,
I am developing an application using jdeveloper 10.1.3 and Struts.
I have created a ADF LOV on my JSP Page as given below:
<html:select property="lob" onchange="javascript:selectLOB(this.form)">
<html:optionsCollection label="prompt" value="index" property="lob.displayData"/>
</html:select>
When i submit the form, i am able to get the value of the selected Value in the List.
JUCtrlListBinding listBinding = (JUCtrlListBinding) formBean.get("Lob");
Row r = (Row) listBinding.getSelectedValue();
String SoLob = (String) r.getAttribute("LobLob");
But i am unable to set the selected value back in the list when i return to the form again.
I tried the following:
int x = listBinding.getSelectedIndex();
listBinding.setSelectedIndex(x);
It would be really helpful if some one could let me know what needs to be done.
Thanks,
SubashiniGyan,
I tried with the code you suggest , its trying to set the value of a field, but my requirement is to change the property for
"Rendered" on the field so that based on search parameters we can hide result table column.
After searching online, I modified the controller code as follows
1.Created a new transient attribute (Testrender) with type "Boolean" and always updateable.
2.changed the "Rendered" property value on the field I want to hide as ${oa.PoSearchVO1.Testrender}.
3. Modified the controller code as follows :
OAApplicationModule am = pageContext.getApplicationModule(webBean);
OAViewObject testvo = (OAViewObject)am.findViewObject("PoSearchVO1");
OADBTransaction txn = am.getOADBTransaction();
if (testvo != null)
OARow row = (OARow)testvo.first();
if (a.equalsIgnoreCase("Approved"))
row.setAttribute("Testrender", Boolean.FALSE);
else
row.setAttribute("Testrender", Boolean.TRUE);
} But now when i run the page and populate the search field and click "Go" its hiding the field but throwing the following error and the search results are also bad.
Its using only the value of one search parameter but not the second one .
The search cannot be executed because the table has pending changes that would be lost. I think the vo is getting dirty when I update the transient attribute value. So I used txn.rollback ,then search is working fine but its not hiding the field.
So can you please let me know how to proceed from here ? -
Hi all,
I am making a vi where I have to save the selected value from listbox with its respective tab control dropdown selcted values in another listbox.Whenever I select Item1 then the heading change and respective tab will open for that item.But Now I just want to save the selection and put it in another ListBox.SO that I can renmove or add according to my wish. Plz help me.
Solved!
Go to Solution.
Attachments:
my_vi.png 83 KBHi, I successfully make the vi to insert itmes from listbox1 to listbox2.Whenever I select itmes 1 in listbox 1 it display same elected item in listbox2 , but it not appending the items in listbox2.Like If 1 is selected in listbox1 then 1 will display , next time after saving when I selct next item like 3 then in listbox 2, 1 is replaced by 3,it dont come in second row of listbox2.Hope I am able to explain.\
Plz help me to resolve this.
Attachments:
listbox_update.vi 11 KB -
I am using a table which contains a text field with a lookup. I want to use the selected value of this field in a form which is acting as a selection form. No editing of the field's value is permitted. How do I just display the value of the field (which
is considered a listbox on the form) without the reverse display and the up and down selection buttons.
I can provide an illustration of the condition I am trying to overcome, but this system doesn't accept it.
Thank you for any suggestions or clarification you can provide.
Marj WeirThank you. I'll try that approach.
I found, after much experimentation, on a similar problem involving a multiselect lookup field, that if I make the field invisible, and add a textbox that displays the fieldname plus .column(0), it displays all the selected entries.
E.g.: staff.Column(0)
Staff is the field containing the last names of selected staff members.
staff.Value only shows the first name in the lookup list whether it is checked or not, so this is useless.
staff.column(0), however, (inexplicably) shows all the selected names, e.g. Jones, Smith, Wiggins.
Marj Weir
-
Unable to get the selection value of OAMessageChoiceBean
Hi,
From our 11i to R12 upgrade, in Customer Advance Search page, we are unable to get the proper handle for OAMessageChoiceBean (in extendedCO).
The code snippet for handling the bean is as follows:
OAMessageChoiceBean PartyStatusFilter = (OAMessageChoiceBean)vOAPageContext.getRootWebBean().findChildRecursive("xxfeF426PartySearchStatus");
String xxTest= PartyStatusFilter.getSelectionValue(vOAPageContext);
The value for above xxTest (in R12 env.) is coming as null. Whereas, the same code is working in 11i enviroment and the output of xxTest="A".
Hence, we are unable to get the selection value of the messagechoicebean in our R12 environment. Moreover, I've already looked into similar previous posts of this forum, also tried using getSelectionText(vOAPageContext) or getSelectedValue(), but it didn’t worked too.
Any pointers please?
Many Thanks,
ZahidHi Keerthi,
I'm still unable to get the value using your provided code. The referenced snippet I used is as follows:
String messageChoiceValue = null;
vOAPageContext.writeDiagnostics(s, "Before the IF LOOP", 2);
if(vOAPageContext.getParameter("xxfeF426PartySearchStatus")!= null ) {
vOAPageContext.writeDiagnostics(s, "Inside the IF LOOP ", 2);
messageChoiceValue = vOAPageContext.getParameter("MessageChoiceID");
vOAPageContext.writeDiagnostics(s, "Value of MessageChoice... "+messageChoiceValue, 2);
if( messageChoiceValue != null ) {
l++;
saveFilterRow(SSLineVO, HeaderId, new oracle.jbo.domain.Number(l), "C", "Status", messageChoiceValue);
vOAPageContext.writeDiagnostics(s, "After the IF LOOP", 2);
The resultant output is as follows:
"Before the IF LOOP", "After the IF LOOP"
It doesn't goes inside the IF condition as the valuie is null. Any other alternative?
Regards,
Zahid -
How to read the selected value of a dropdown list box
Hello,
I have 2 custom fields which are of type dropdown list on Accounts(CRMM_ACCOUNT) PCUI application details tab.I need to read the selected value of first dropdown list item,based on that second dropdown list will be populated.
I know where to populate the dropdown list box,it is in FILL_DROPDOWN_LISTBOX.
I dont know how to trap the selection made on dropdown list.
PLease guide me on how to trap the dropdown list field selection value.
Thanks in advance.
Thirumala.Hello,
Check what is done in standard for the fielf REGION which is inked to the country.
Otherwise, you can do the following :
- in field group customizing, for field 1, flag the 'send request' flag. So, when you change the value in this field via the dropdown, the MAC methods are immediately called.
- Put the new value in a global variable (GV).
- in the fill_dropdown_listbox method, get the value from this GV and based on it, filter the values for the dropdown of field 2.
Hope this will help you,
Regards,
Frederic -
HTMLB Dropdownlist not retaining the selected value
Hello,
In my BSP application , in my Dropdownlist when i select an entry it doesnt get retained in the view.
Please suggest
I have implemeted DO_HANDLE_DATA AND DO HANDLEEVENT>
but still it doesnt retain the selected values.
Please help
thanks
swatiHi Swathi,
2things are important here:
1st : check in debugging where the dropdown event is getting triggered or not...
if yes then check whether you have taken the variable as a Global
2nd: your code should be after Dispatch_input()
hope this will help you out... still you face a problem let me know.
Cheers,
bhavana -
Error :Value of restricted LOV parameter not among the selectable values
Hi,
I am designing a report which has two layouts. I have a parameter :P_Reason_code which is applicable to only one layout.
There is a repeating frame in my first layout which should display only if :P_Reason_code value is 'Y'.
I have wriiten a format trigger for this repeating frame saying the repating frame should return true if :P_Reason_code value= 'Y'.
else, it should return false meaning it shouldnt display.
:P_Reason_code is an optional parameter when i run it at the oracle apps front end.
The problem that i am facing is that when i run the report for the second layout by not providing value for the parameter :P_Reason_code
, it errors out saying "REP-0788: Warning: The value of restricted LOV parameter P_REASON_CODE is not among the selectable values.'
I tried creating another user parameter P_REASON_CODE1 and putting a trigger in the After parameter form trigger saying
if P_REASON_CODE is null then
P_REASON_CODE1 :='Y';
P_REASON_CODE := P_REASON_CODE1;
ELSE
P_REASON_CODE1 := P_REASON_CODE;
P_REASON_CODE := P_REASON_CODE;
END IF;
But still it doesnt seem to work.
What could be the issue?
Can anyone help?try setting the default-value for the parameter to Y (or whatever value is in the LoV defined for the parameter).
Is there a parameterform used for the report. If not remove the LoV from the parameter. -
JComboBox : colors in the selected value field
I have a JComboBox with a custom ListCellRenderer. However the JComboBox seems to change the colors of the Component that my ListCellRenderer creates when the Component is in the Selected value field. Some code is below...
import javax.swing.*;
import java.awt.*;
import java.util.*;
public class ComboBoxTest {
public static final void main(String[] args) {
JComboBox cbox;
Vector elements;
elements = new Vector();
elements.add("One");
elements.add("Two");
elements.add("Three");
cbox = new JComboBox(elements);
cbox.setRenderer(new MyRenderer());
cbox.setEditable(false);
JFrame frame = new JFrame();
JPanel content = (JPanel) frame.getContentPane();
content.add(cbox);
frame.pack();
frame.setVisible(true);
class MyRenderer implements ListCellRenderer {
public Component getListCellRendererComponent(
JList list,
Object value,
int index,
boolean isSelected,
boolean cellHasFocus)
String strValue;
JLabel label;
strValue = (String) value;
label = new JLabel("<" + strValue + ">");
label.setOpaque(true);
if( isSelected ) {
label.setForeground(Color.black);
label.setBackground(Color.green);
} else {
label.setForeground(Color.white);
label.setBackground(Color.black);
return label;
}This code simply creates a JComboBox with 3 String values, "One", "Two", and "Three". The renderer creates a JLabel with the String value enclosed in triangle brackets. The renderer also sets the colors of the JLabel to white on black if unselected and black on green if selected.
When I run this program, the list portion of the JComboBox looks correct, but the entry in the edit field is wrong. It has the enclosing triangle brackets around the selected String, but the colors are still the default black on gray.
What do I need to do to get the colors in the edit field to display correctly?
- JamesA JComboBox is similar to a JSpinner in the sense that it has an associated editor that has an associated textfield....check out the link shown below
http://forum.java.sun.com/thread.jsp?forum=57&thread=385077
;o)
V.V. -
How to capture the selected values from module pool dialog list box !
Hi experts,
Can anyone help me out in capturing the values from the list box.
i am able to set the values in the list box.But i am not able to capture the selected value from the list box. Always the list box name is getting as "space"
I also tried in using the FM "VRM_GET_VALUES" but it is retireving all the values. Is there is any flag for filttering out the selected value.
Your inputs are appreciated.
Thanks,
Vijay.Along with the PBO and PAI event, add a POV event in the flow logic of the screen
DEMO_DROPDOWN_LIST_BOX -is a good demo example.
PROCESS ON VALUE-REQUEST.
FIELD structure_name-field_name MODULE create_dropdown_box.
In the report :
MODULE create_dropdown_box INPUT.
SELECT carrid carrname
FROM scarr
INTO CORRESPONDING FIELDS OF TABLE itab_carrid.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'CARRID'
value_org = 'S'
TABLES
value_tab = itab_carrid
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
ENDIF.
ENDMODULE.
In the layout, assign a Function Code , for eg : 'SELECTED' to the listbox and lets say name of the field is SDYN_CONN-CARRID. So in the PAI module,
MODULE user_command_0100 INPUT.
CASE ok_code.
WHEN 'SELECTED'.
MESSAGE i888(sabapdocu) WITH sdyn_conn-carrid.
ENDCASE.
ENDMODULE.
sdyb_conn-carrid will contain your selected field -
Need to get the selected values from the selectManyShuttle
Hi,
I am using ADF11g newer version.
I have a selectManyShuttle and a command button. Need to insert all the selected values on the right hand side of the selectManyShuttle into a database table.
I created the selectManyShuttle with the values. Need help in getting the values on the right hand side.
<af:selectManyShuttle value="#{bindings.UserMgmtVO1.inputValue}"
id="sms2">
<f:selectItems value="#{bindings.UserMgmtVO1.items}"
id="si6"/>
</af:selectManyShuttle>
Any sample code or link is really appreicated.
ThanksThanks for the reply.
I am using a View Object and I dropped it as SelectManyShuttle
<af:selectManyShuttle value="#{bindings.UserMgmtVO1.inputValue}"
id="sms2"
valueChangeListener="#{POBacking.getSelectedValues}"
valuePassThru="true"
autoSubmit="true">
<f:selectItems value="#{bindings.UserMgmtVO1.items}"
id="si6"/>
</af:selectManyShuttle>
public void getSelectedValues(ValueChangeEvent valueChangeEvent) {
System.out.println("Testing Shuttle");
ArrayList list = new ArrayList(Arrays.asList(valueChangeEvent.getNewValue()));
String val = "";
String sqlStmt = "";
try {
if (list != null) {
for (int i = 0; i < list.size(); i++) {
int l = list.size() - 1;
val = list.get(l).toString(); //returns , delimited string
System.out.println(" value:" + val);
if (val != null) {
val = val.replaceAll("[\\[\\]]", ""); //remove []
StringTokenizer st = new StringTokenizer(val, ",");
int nto = st.countTokens();
for (int j = 0; j < nto; j++) {
String users = st.nextToken().trim();
System.out.println("Users:" + users);
//sqlStmt = " update xxpp_project_clip set clip_status='true', clip_seq = "+j * 10+
// " where project_id = "+rHdr.getAttribute("ProjectId") +
// " and clip_name ='"+ clip_Name +"'";
//System.out.println("sqlStmt:" + sqlStmt);
//stmt.executeUpdate(sqlStmt);
//am.getDBTransaction().commit();
//if (stmt != null)
// stmt.close();
// am.getDBTransaction().commit();
} catch (Exception ex) {
ex.printStackTrace();
I don't see the values in the list.
I gets printed as
value:[Ljava.lang.Integer;@1b10691
Users:Ljava.lang.Integer;@1b10691
how to get the individual values in the list?
Thanks
Saru -
How to get the selected values from multiselected list
Hi,
I have a multiselect list displaying all the years from 2003 to 2008 (used dynamic LOV). The user can choose one or more years as per his needs, and then when user clicks on the link the selected values of the list are to be captured and a pop up page of a Discoveror report needs to be opened where these years get passed as a parameter. I tried several methods to capture the value, but either one or all are getting passed but not exactly what the user has chosen.
This is how it looks:
P2_FISCAL_YEAR is a multiselect list containing values from 2003,2004... 2008
If user chooses 2004 and 2007
then I want the url to capture these values and pass as parameters for my discoveror reports. as '&qp_fiscal_year=2004,2007'
Any help is appreciated!
Thanks in advance,
Sapna.Hi,
I have a multiselect list displaying all the years from 2003 to 2008 (used dynamic LOV). The user can choose one or more years as per his needs, and then when user clicks on the link the selected values of the list are to be captured and a pop up page of a Discoveror report needs to be opened where these years get passed as a parameter. I tried several methods to capture the value, but either one or all are getting passed but not exactly what the user has chosen.
This is how it looks:
P2_FISCAL_YEAR is a multiselect list containing values from 2003,2004... 2008
If user chooses 2004 and 2007
then I want the url to capture these values and pass as parameters for my discoveror reports. as '&qp_fiscal_year=2004,2007'
Any help is appreciated!
Thanks in advance,
Sapna. -
How to get the selected values from a selectmanylistbox?
Hi ADF Experts,
<af:selectManyListbox label="Label 1" id="sml1" partialTriggers="cb2"
value="#{viewScope.TestBean.lovValue}"
autoSubmit="true" valuePassThru="true">
<f:selectItems value="#{viewScope.TestBean.actualList}" id="si1"
binding="#{viewScope.TestBean.selectedItems}"/>
</af:selectManyListbox>
<af:commandButton text="get selected values" id="cb3"
actionListener="#{viewScope.TestBean.getSelectedValues}"
partialSubmit="true"/>
private List<String> lovValue;
private List<SelectItem> actualList;
//getters and setters
public void getSelectedValues(ActionEvent actionEvent) {
// Add event code here...
for (String selectedItem : lovValue) {
System.out.println("Selected item: " +selectedItem.); // this is giving 1 and 3 like this. how to get the checked values as I'm getting only the indexes. In this scenario I am populating the list programmatically.Just I wanted to know how can we get the selected values(not indexes). Please suggest.
Thanks-
AbhijitHi Timo,
As I am sharing the page fragment and the Java class. So its my usecase I have mentioned below
I am sharing the jsff page fragment and java class. So that it wud be of help to others.
jsff page fragment
<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
xmlns:f="http://java.sun.com/jsf/core">
<af:panelGroupLayout id="pgl1">
<af:commandButton text="Search" id="cb1"
actionListener="#{viewScope.TestBean.searchSupplier}"/>
</af:panelGroupLayout>
<af:popup id="p1" binding="#{viewScope.TestBean.searchSupplierPopup}">
<af:dialog id="d2"
type="none">
<af:table value="#{bindings.Contacts.collectionModel}" var="row"
rows="#{bindings.Contacts.rangeSize}"
emptyText="#{bindings.Contacts.viewable ? 'No data to display.' : 'Access Denied.'}"
fetchSize="#{bindings.Contacts.rangeSize}"
rowBandingInterval="0"
binding="#{viewScope.TestBean.tsupportIssues}"
filterModel="#{bindings.ContactsQuery.queryDescriptor}"
queryListener="#{bindings.ContactsQuery.processQuery}"
filterVisible="true" varStatus="vs"
selectionListener="#{bindings.Contacts.collectionModel.makeCurrent}"
rowSelection="multiple" id="t1">
<af:column sortProperty="name" filterable="true" sortable="true"
headerText="#{bindings.Contacts.hints.name.label}" id="c2">
<af:outputText value="#{row.name}" id="ot1"/>
</af:column>
<af:column sortProperty="email" filterable="true" sortable="true"
headerText="#{bindings.Contacts.hints.email.label}"
id="c1">
<af:outputText value="#{row.email}" id="ot2"/>
</af:column>
</af:table>
<af:commandButton text="OK" id="cb5" partialSubmit="true" actionListener="#{viewScope.TestBean.testMethod}"/>
<af:commandButton text="Cancel" id="cb6"
actionListener="#{viewScope.TestBean.cancelPopupSearch}"/>
</af:dialog>
</af:popup>
<af:selectManyListbox label="Label 1" id="sml1" partialTriggers="cb5"
value="#{viewScope.TestBean.lovValue}"
autoSubmit="true" valuePassThru="true"
binding="#{viewScope.TestBean.prp1}">
<f:selectItems value="#{viewScope.TestBean.actualList}" id="si1"
binding="#{viewScope.TestBean.selectedItems}"/>
</af:selectManyListbox>
<af:commandButton text="get selected values" id="cb3"
actionListener="#{viewScope.TestBean.getSelectedValues}"
partialSubmit="true"/>
<af:commandButton text="remove selected" id="cb4"
partialSubmit="true" actionListener="#{viewScope.TestBean.removeSelectedValues}"/>
</jsp:root>
TestBean.java
package com.demo.view;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import javax.faces.component.UISelectItems;
import javax.faces.event.ActionEvent;
import javax.faces.model.SelectItem;
import oracle.adf.model.BindingContext;
import oracle.adf.model.binding.DCBindingContainer;
import oracle.adf.model.binding.DCIteratorBinding;
import oracle.adf.view.rich.component.rich.RichPopup;
import oracle.adf.view.rich.component.rich.data.RichTable;
import oracle.adf.view.rich.component.rich.input.RichSelectManyListbox;
import oracle.adf.view.rich.context.AdfFacesContext;
import oracle.adf.view.rich.event.DialogEvent;
import oracle.jbo.Key;
import oracle.jbo.Row;
import oracle.jbo.RowSetIterator;
import org.apache.myfaces.trinidad.model.RowKeySet;
public class TestBean {
private RichTable tsupportIssues;
private List<SelectItem> lovValue;
private List<SelectItem> actualList;
private RichSelectManyListbox prp1;
private List valuesChoosed = new ArrayList();
private UISelectItems selectedItems;
private RichPopup searchSupplierPopup;
public TestBean() {
super();
public void setTsupportIssues(RichTable tsupportIssues) {
this.tsupportIssues = tsupportIssues;
public RichTable getTsupportIssues() {
return tsupportIssues;
public void testMethod(ActionEvent actionEvent) {
// Add event code here...
// For learning purposes - show Select Many Button clicked
System.out.println("Select Many Button has been Clicked");
// // RowKeySet Object can hold the selected rows from a user as follows
RowKeySet rksSelectedRows = this.getTsupportIssues().getSelectedRowKeys();
// Iterator object provides the ability to use hasNext(), next() and remove() against the selected rows
Iterator itrSelectedRows = rksSelectedRows.iterator();
// Get the data control that is bound to the table - e.g.
// OpenSupportItemsIterator
DCBindingContainer bindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
DCIteratorBinding dcIteratorBindings = bindings.findIteratorBinding("findAllContactsIterator");
// Information from binding that is specific to the rows
RowSetIterator rsiSelectedRows = dcIteratorBindings.getRowSetIterator();
// Loop through selected rows
int i=1;
while (itrSelectedRows.hasNext()) {
// Get key for selected row
Key key = (Key)((List)itrSelectedRows.next()).get(0);
// Use the key to get the data from the above binding that is related to the row
Row myRow = rsiSelectedRows.getRow(key);
// Display attribute of row in console output - would generally be bound to a UI component like a Label and or used to call another proces
System.out.println(myRow.getAttribute("name"));
valuesChoosed.add(myRow.getAttribute("name"));
// actualList = new ArrayList<SelectItem>();
// String j = Integer.toString(i);
// actualList.add(new SelectItem(j, (String)myRow.getAttribute("name")));
// i++;
searchSupplierPopup.hide();
AdfFacesContext.getCurrentInstance().addPartialTarget(prp1);
public void setLovValue(List<SelectItem> lovValue) {
this.lovValue = lovValue;
public List<SelectItem> getLovValue() {
return lovValue;
public void setActualList(List<SelectItem> actualList) {
this.actualList = actualList;
public List<SelectItem> getActualList() {
actualList = new ArrayList<SelectItem>();
if(valuesChoosed.size()!=0){
for(int i=0;i<valuesChoosed.size();i++){
actualList.add(new SelectItem(valuesChoosed.get(i), (String)valuesChoosed.get(i)));
else{
actualList.add(new SelectItem("1","Select One"));
return actualList;
public void setPrp1(RichSelectManyListbox prp1) {
this.prp1 = prp1;
public RichSelectManyListbox getPrp1() {
return prp1;
public void setValuesChoosed(List valuesChoosed) {
this.valuesChoosed = valuesChoosed;
public List getValuesChoosed() {
return valuesChoosed;
public void getValues(ActionEvent actionEvent) {
// Add event code here...
for(int i=0;i<valuesChoosed.size();i++){
System.out.println(valuesChoosed.get(i));
public void getSelectedValues(ActionEvent actionEvent) {
// Add event code here...
for(int i=0;i<this.getLovValue().size();i++){
System.out.println("Selected Value:"+this.getLovValue().get(i));
public void removeSelectedValues(ActionEvent actionEvent) {
// Add event code here...
public void setSelectedItems(UISelectItems selectedItems) {
this.selectedItems = selectedItems;
public UISelectItems getSelectedItems() {
return selectedItems;
public void setSearchSupplierPopup(RichPopup searchSupplierPopup) {
this.searchSupplierPopup = searchSupplierPopup;
public RichPopup getSearchSupplierPopup() {
return searchSupplierPopup;
public void cancelPopupSearch(ActionEvent actionEvent) {
// Add event code here...
searchSupplierPopup.hide();
public void searchSupplier(ActionEvent actionEvent) {
// Add event code here...
RichPopup.PopupHints hints = new RichPopup.PopupHints();
searchSupplierPopup.show(hints);
package com.demo.view;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import javax.faces.component.UISelectItems;
import javax.faces.event.ActionEvent;
import javax.faces.model.SelectItem;
import oracle.adf.model.BindingContext;
import oracle.adf.model.binding.DCBindingContainer;
import oracle.adf.model.binding.DCIteratorBinding;
import oracle.adf.view.rich.component.rich.RichPopup;
import oracle.adf.view.rich.component.rich.data.RichTable;
import oracle.adf.view.rich.component.rich.input.RichSelectManyListbox;
import oracle.adf.view.rich.context.AdfFacesContext;
import oracle.adf.view.rich.event.DialogEvent;
import oracle.jbo.Key;
import oracle.jbo.Row;
import oracle.jbo.RowSetIterator;
import org.apache.myfaces.trinidad.model.RowKeySet;
public class TestBean {
private RichTable tsupportIssues;
private List<SelectItem> lovValue;
private List<SelectItem> actualList;
private RichSelectManyListbox prp1;
private List valuesChoosed = new ArrayList();
private UISelectItems selectedItems;
private RichPopup searchSupplierPopup;
public TestBean() {
super();
public void setTsupportIssues(RichTable tsupportIssues) {
this.tsupportIssues = tsupportIssues;
public RichTable getTsupportIssues() {
return tsupportIssues;
public void testMethod(ActionEvent actionEvent) {
// Add event code here...
// For learning purposes - show Select Many Button clicked
System.out.println("Select Many Button has been Clicked");
// // RowKeySet Object can hold the selected rows from a user as follows
RowKeySet rksSelectedRows = this.getTsupportIssues().getSelectedRowKeys();
// Iterator object provides the ability to use hasNext(), next() and remove() against the selected rows
Iterator itrSelectedRows = rksSelectedRows.iterator();
// Get the data control that is bound to the table - e.g.
// OpenSupportItemsIterator
DCBindingContainer bindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
DCIteratorBinding dcIteratorBindings = bindings.findIteratorBinding("findAllContactsIterator");
// Information from binding that is specific to the rows
RowSetIterator rsiSelectedRows = dcIteratorBindings.getRowSetIterator();
// Loop through selected rows
int i=1;
while (itrSelectedRows.hasNext()) {
// Get key for selected row
Key key = (Key)((List)itrSelectedRows.next()).get(0);
// Use the key to get the data from the above binding that is related to the row
Row myRow = rsiSelectedRows.getRow(key);
// Display attribute of row in console output - would generally be bound to a UI component like a Label and or used to call another proces
System.out.println(myRow.getAttribute("name"));
valuesChoosed.add(myRow.getAttribute("name"));
// actualList = new ArrayList<SelectItem>();
// String j = Integer.toString(i);
// actualList.add(new SelectItem(j, (String)myRow.getAttribute("name")));
// i++;
searchSupplierPopup.hide();
AdfFacesContext.getCurrentInstance().addPartialTarget(prp1);
public void setLovValue(List<SelectItem> lovValue) {
this.lovValue = lovValue;
public List<SelectItem> getLovValue() {
return lovValue;
public void setActualList(List<SelectItem> actualList) {
this.actualList = actualList;
public List<SelectItem> getActualList() {
actualList = new ArrayList<SelectItem>();
if(valuesChoosed.size()!=0){
for(int i=0;i<valuesChoosed.size();i++){
actualList.add(new SelectItem(valuesChoosed.get(i), (String)valuesChoosed.get(i)));
else{
actualList.add(new SelectItem("1","Select One"));
return actualList;
public void setPrp1(RichSelectManyListbox prp1) {
this.prp1 = prp1;
public RichSelectManyListbox getPrp1() {
return prp1;
public void setValuesChoosed(List valuesChoosed) {
this.valuesChoosed = valuesChoosed;
public List getValuesChoosed() {
return valuesChoosed;
public void getValues(ActionEvent actionEvent) {
// Add event code here...
for(int i=0;i<valuesChoosed.size();i++){
System.out.println(valuesChoosed.get(i));
public void getSelectedValues(ActionEvent actionEvent) {
// Add event code here...
for(int i=0;i<this.getLovValue().size();i++){
System.out.println("Selected Value:"+this.getLovValue().get(i));
public void removeSelectedValues(ActionEvent actionEvent) {
// Add event code here...
for(int i=0;i<this.getLovValue().size();i++){
System.out.println("Selected Value:"+this.getLovValue().get(i));
System.out.println(this.getLovValue().remove(i));
AdfFacesContext.getCurrentInstance().addPartialTarget(prp1);
public void setSelectedItems(UISelectItems selectedItems) {
this.selectedItems = selectedItems;
public UISelectItems getSelectedItems() {
return selectedItems;
public void setSearchSupplierPopup(RichPopup searchSupplierPopup) {
this.searchSupplierPopup = searchSupplierPopup;
public RichPopup getSearchSupplierPopup() {
return searchSupplierPopup;
public void cancelPopupSearch(ActionEvent actionEvent) {
// Add event code here...
searchSupplierPopup.hide();
public void searchSupplier(ActionEvent actionEvent) {
// Add event code here...
RichPopup.PopupHints hints = new RichPopup.PopupHints();
searchSupplierPopup.show(hints);
Thanks,
A. Abhijit -
Is there a way to hide some reports based on the selected values in prompt.
Hi Experts,
Is there a way to hide some reports based on the selected values in prompt.
For ex. if a year is selected in the prompt then the report should display year wise report.
If a year and half year both are selected in the drop down from prompt section then 2 reports should come.. One for year wise and another for half year wise.Kindly look into this.
Regards
AshishHi,
Use presentation values in prompts for year,half,qtr and month.Example- For year-y is presentation variable in the same way for halfyear-h,qtr-q and month-m.
create four intermediate reports.Example-Report r1 with only year column,r2 with only halfyear column,r3 with qtr column and r4 with month column.
Make column in each report(r1,r2,r3,r4) is equal to their presentation variables(y,h,q,m).
Use four sections.
Section1-Place report that should come when only year.
section2-Place report that should come for year and halfyear.
Section3-Place report that should come for year,halfyear and qtr.
Section4-Place report that should come for year,halfyear,qtr and month.
Apply guided navigation for each section selecting guided navigation-
For section1-
properties->Guided navigation->check this Reference Source Request(Yes)->select report r1(year)->check this Show Section(if request returns row)
In the same way do for remaining section2(select r2),section3(select r3) and section4(select r4)
Thanks,
Srikanth
http://bintelligencegroup.wordpress.com/ -
Prompts visible on the basis of the selected value of initial prompt
I have some reports in which multiple queries option is provided at UI by using no of prompts.. Now some of the prompts are visible on basis of the selected value of initial prompt. That means If value of prompt A is x than prompt B is displayed and if value of prompt A is y than Prompt C is displayed, which of the prompt(B or C) is displayed depends on value of prompt A.
how can we achieve this.Kindly help
prompts visible on basis of the selected value of initial promptHi,
This isn't possible at report level. If you mounted your reports on a dashboard, your dashboard prompt could contain prompt a, b and c. Users can then choose to populate any of the prompts they require rather than having to hit "next prompt" all the time.
Thanks
Oli @ Innoveer
Maybe you are looking for
-
Help! Safari not working after upgrade to version 2.0
After i have upgraded to version 2.0, dispite all the problems i have read it has worked fine for 24hrs, but all of a sudden the wifi link has stopped. If i try using it the message reads " Safari can't open the page because it is not connected to th
-
Group By in sql statement....
I have the following sql statement: SELECT ROWNUM AA, EPONYMO||' '||ONOMA FNAME ,CODE_ERGAZOMENOY_TYPE_ID,MV_SIGK_KATAST_MINA.SUM_ODOIP_EXODA, MV_SIGK_KATAST_MINA.SUM_HMERISIA_APOZIMIOSI, MV_SIGK_KATAST_MINA.SUM_SINOLO, MV_SIGK_KATAST_MINA.SUM_KRATIS
-
Where are my Audio/MIDI Setup custom icons hiding?
I was attempting to add a custom icon to my Audio/MIDI Setup collection when I realized they're nowhere to be found. My custom icons are currently being used, so they are somewhere. I can readily locate "/Library/Audio/MIDI Devices/Generic/Images/" b
-
I was so excited about apple pay and now setting it up and boom 8 cards and you are done is that the wallet replacement they thought they'll do? really? I mean most people have 10-15 cards at least and I am, well because of my side business I have lo
-
I am looking for a hard shell that can hold my seagate 1 TB drive on the back of my Macbook Pro 13in 2012 (not retina, regular), while its pluged in. Kinnda like the rack thing for the back of an iMac, just this one would hold it tight to the back of