Portal devt - getting the bean value
hi,
i am trying to send my bean value as url but some how i am not able to get that value. can somebody help me plese.
my statement:
srcUrl="http://multirater.standardbank.co.za/reportsdev/showlist.asp?per=<%=bwReportsBean.getGuid()%>"
here I wanted to use bwReportsBean.getGuid() as value. but it is giving error if i use per=. your help will be highly appreicated.
my full statement is:
<hbj:isolatedHtmlContainer
id="isohtmlCont"
width="100%"
height="600"
scrolling="AUTO"
bordered="false" srcUrl="http://multirater.standardbank.co.za/reportsdev/showlist.asp? per=<%=bwReportsBean.getGuid()%>" />
thanks a lot.
Hello kata,
Why dont you declare a variable and then pouplate the bean's value into the variable and then use the varialbe in the url.
Pradeep
Similar Messages
-
Get the current value of a managed bean.
Hi guys
I have a register page which takes the Login ID and the password and retype password whose values are stored in the "Managed Beans" in registerServer.java.
I have a (PwdValidator.java) Custom validator for Re-type Password which validates itself against the password.
Now my problem is from the PwdValidator.java how can I access the value of the password which is stored in the managed bean in registerServer.java.
here is a copy of my faces-config.xml
<managed-bean>
<managed-bean-name>registerServer</managed-bean-name>
<managed-bean-class>com.sun.registerServer</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
Help is really appreciated,
Thanks,
Chaprasi BabaThanks for the reply but my question is how do I get
the password value from the managed bean
FacesContext context =
FacesContext.getCurrentInstance();
Application application = context.getApplication();
CountryValueObject registerServer =
(CountryValueObject)application.getVariableResolver().r
solveVariable(context, "registerServer");
String pwd = registerServer.password // So will this
give me the current value for that session.You didn't go far enough in replacing the example code . Try this:
FacesContext context = FacesContext.getCurrentInstance();
Application application = context.getApplication();
RegisterServer registerServer = (RegisterServer)application.getVariableResolver().resolveVariable(context, "registerServer");
String pwd = registerServer.password // So will this give me the current value for that session. -
How to get the selected value in SelectOneMenu in backing bean
Hello all,
I need your help. I want to have 2 select menus with the second menu's items list are populated based on the selection in the first menu. I don't know how to get the selected value in the backing bean so that I can based on that select menu to populate the second menu's item list. Basically I need to access to the UI Component of the first select Menu and retrieve its selected value.
Could you help me out?
Thank you very much in advance,
LngoHi Lingo,
There r two ways of getting the values into the list. First one is hardcoding the values and the second one is use the list and get the values into the list by firing a query in the database.
Inorder to display the values in the second menu based on the first onces selection we need to add an attribute to the first selectonemenu known as valueChangeListener and we need to sumit the page.
Here is the sample code
<h:selectOneMenu id="catalogue"
binding="#{urbean.catalogue}" onchange="submit()"
valueChangeListener="#{urbean.categoryValueChange}"
<f:selectItem itemLabel="Select Catalogue" itemValue="" />
<f:selectItems value="#{urbean.catalogueList}" />
</h:selectOneMenu>
<h:selectOneMenu id="category"
binding="#{urbean.category}"> <f:selectItem itemLabel="Select Category" itemValue="" />
<f:selectItems value="#{urbean.categoryList}" />
< </h:selectOneMenu>
now in method called by valuechangelistener we need to write the similar code
public void categoryValueChange(ValueChangeEvent event) {
String rfnum = (String) event.getNewValue();
List categoryList = new ArrayList();
List tempList = new TablenameDAO().getActiveCatByCatalogueID(rfnum);
for (int i = 0; i < tempList.size(); i++) {
Tablename tablename = (Tablename ) tempList.get(i);
String value = "" + tablename .getrfnum();
String label = tablename .getname();
if (label == null) {
label = "";
SelectItem item = new SelectItem(value, label);
categoryList.add(item);
bean.setCategoryList(categoryList);
///getActiveCatByCatalogueID (rfnum) should bring the records which r based on the rfnum
if u follow this process i am damsure that u will get the values in to the secondlist based upon the first list
Thanks & Regards
Manidhar -
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 get the old value of the ValueChangeEvent
I'm using the JSF component selectManyListbox. I have assigned a value change listener to it. When I try get the old value using getOldValue() of the ValueChangeEvent Im always getting a null value. The only value Im getting is from the method getNewValue(), which is the last item I clicked in the selectManyListbox items before submitting the whole form. Is there a way to get the old value of this component or Im doing something wrong?
Here is the partial bean code
public class TestUI extends PageCodeBase {
private static Logger logger = Logger.getLogger(pagecode.protected1.TestUI.class);
protected Object [] menuValue;
protected Object [] listBoxValue;
protected List allTaskCodes;
* @return Returns the listBoxValue.
public Object[] getListBoxValue() {
return listBoxValue;
* @param listBoxValue The listBoxValue to set.
public void setListBoxValue(Object[] listBoxValue) {
this.listBoxValue = listBoxValue;
public void handleSelectManyListboxValueChange(
ValueChangeEvent vce) {
logger.debug(".. first component was heard..");
String[] s1 = (String[]) vce.getOldValue();
String[] s2 = (String[]) vce.getNewValue();
//vce.getComponent().
if (s1!=null&&s1.length!=0) {
logger.debug("length of first array is " + s1.length );
//for(int i=0; i<s1.length; i++)
logger.debug("value of old is " + s1[0] );
if (s2!=null&&s2.length!=0) {
logger.debug("length of second array is " + s2.length );
//for(int i=0; i<s1.length; i++)
logger.debug("value of new is " + s2[0]);
Here is the jsf code
<h:selectManyListbox styleClass="selectManyListbox" id="listbox1"
size="3" valueChangeListener="#{pc_TestUI.handleSelectManyListboxValueChange}"
onchange="submit()" value="#{pc_TestUI.listBoxValue}">
<f:selectItem itemValue="value1" itemLabel="select1" />
<f:selectItem itemValue="Value2" itemLabel="select2" />
<f:selectItem itemValue="Value3" itemLabel="select3" />
<f:selectItem itemValue="value4" itemLabel="select1" />
<f:selectItem itemValue="Value5" itemLabel="select2" />
</h:selectManyListbox> -
Is it possible to get the total value for column and assign to other field
hi,
Is it possible to get the total value of particular column and assign that value to another field?
How to do this?
Thanks in advance,
SANAfridi,
My extended controller class code:
package xxhr.oracle.apps.per.selfservice.appraisals.webui;
import oracle.apps.fnd.framework.OAApplicationModule;
import oracle.apps.fnd.framework.OAException;
import oracle.apps.fnd.framework.OAViewObject;
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;
import oracle.apps.fnd.framework.webui.beans.message.OAMessageStyledTextBean;
import oracle.apps.per.selfservice.appraisals.webui.OverviewPageCO;
import oracle.jbo.Row;
public class XXOverviewPageCO extends OverviewPageCO {
public XXOverviewPageCO() {
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
super.processFormRequest(pageContext, webBean);
if(pageContext.getParameter("XXCalcAvgButton")!=null){
throw new OAException("welcome",OAException.INFORMATION);
//getSum(pageContext, webBean);
private String getSum(OAPageContext pageContext, OAWebBean webBean) {
OAApplicationModule am = pageContext.getApplicationModule(webBean);
OAViewObject ratvo = (OAViewObject)am.findViewObject("CompetenceElementsVO");
OAViewObject valuevo = (OAViewObject)am.findViewObject("PerRatingLevelsVO");
Integer Sum = new Integer("0");
int numofRows = ratvo.getRowCount();
for (int x = 0; x < numofRows; x++) {
Object Rating =
ratvo.getRowAtRangeIndex(x).getAttribute("ProficiencyLevelId");
if(Rating!=null) {
int numofRowsforvalue = valuevo.getRowCount();
for(int i=0;i<numofRowsforvalue;i++){
if(valuevo.getRowAtRangeIndex(i).getAttribute("RatingLevelId").equals(Rating)){
Object StepValue=valuevo.getRowAtRangeIndex(i).getAttribute("StepValue");
Sum = new Integer(StepValue.toString()) + Sum;
OAMessageStyledTextBean displayCompAvg=(OAMessageStyledTextBean)webBean.findChildRecursive("XXCompAvgText");
displayCompAvg.setValue(pageContext,Sum);
return null;
But it is not affecting in the page.
Can you please tell me what is the problem. -
How can i get the all values from the Property file to Hashtable?
how can i get the all values from the Property file to Hashtable?
ok,consider my property file name is pro.PROPERTIES
and it contain
8326=sun developer
4306=sun java developer
3943=java developer
how can i get the all keys & values from the pro.PROPERTIES to hashtable
plz help guys..............The Properties class is already a subclass of Hashtable. So if you have a Properties object, you already have a Hashtable. So all you need to do is the first part of that:Properties props = new Properties();
InputStream is = new FileInputStream("tivoli.properties");
props.load(is); -
How to get the column values from a BC4J View Table in UIXML?
I am using a default UiXML Application for Order Entry system with Orders & Order Lines & Customers. I have a uix file OrdersView1_View.uix which displays (no updateable columns) all the Orders. How do I get the column value of a selected row in a BC4J Table (example:OrdersId) when a Submit button is pressed using UIXML or Java Classes?
I appreciate any help on this.Hi,
You need to use keyStamp, an example:
<bc4j table name="orders">
<bc4j:keyStamp>
<bc4j:rowKey name="key" />
</bc4j:keyStamp>
Furthermore, you can automatically send the selected row key using the go event handler, so in the handlers section you could send the key to an orderInfo page:
<event name="show">
<!-- forward to the update page, passing
the selected key as a page property -->
<ctrl:go name="orderInfo" redirect="true">
<ctrl:property name="key">
<ctrl:selection name="orders" key="key" />
</ctrl:property>
</ctrl:go>
</event> -
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 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 -
How to get the return values from a web page
Hi all :
how to get the return values from a web page ? I mean how pass values betwen webflow and web page ?
thank you very much
Edited by: jingying Sony on Apr 15, 2010 6:15 AM
Edited by: jingying Sony on Apr 15, 2010 6:18 AMHi,
What kind of web page do you have? Do you have possibility to for example make RFCs? Then you could trigger events (with parameters that could "return" the values) and the workflow could react to those events. For example your task can have terminating events.
Regards,
Karri -
ADF: How to get the attributes' values of one single row from a table?
Currently I have a table with 3 attributes, suppose A,B and C respectively. And I've added an selectionListener to this table. That means when I select one single row of this table, I wish to get the respective value of A, B and C for that particular row. How do I achieve this?
suppose the method is like:
public void selectionRow(SelectionEvent se) { //se is the mouse selection event
.......??? //what should I do to get the values of A\B\C for one single row?
Edited by: user12635428 on Mar 23, 2010 1:40 AMHi
Assuming you are using Jdev 11g.
Try with this
public void selectionRow(SelectionEvent se) {
String val = getManagedBeanValue("bindings.AttributeName.inputValue");
public static Object getManagedBeanValue(String beanName) {
StringBuffer buff = new StringBuffer("#{");
buff.append(beanName);
buff.append("}");
return resolveExpression(buff.toString());
public static Object resolveExpression(String expression) {
FacesContext facesContext = getFacesContext();
Application app = facesContext.getApplication();
ExpressionFactory elFactory = app.getExpressionFactory();
ELContext elContext = facesContext.getELContext();
ValueExpression valueExp =
elFactory.createValueExpression(elContext, expression,
Object.class);
return valueExp.getValue(elContext);
Vikram -
How can I get the total "values" in a hashtable ?
i know that i can get the total values in a hashtable by hash.elements() method. It returns an
enumeration with all the values present in this hashtable. this is fine upto here.
Now the preoblem is:
According to what rule this enumeration will be returned. I mean..
If i added in key A with value a,
then key B with value b;
then key C with value c;
then key D with value d;
(They all are objects of type String)
now i call ... hash.elements(); Suppose it returns Enumeration enum;.
Now in what order they all are present in this hashtable.
Meaning is that if i move arond this enum in what sequence they all will be returned.
option A ) In the same order as they were inserted in hashtable.
option B ) According to LIFO;
option C) There is no fix rules , simply it return all the elements and u cannot judge that the first element in enum was really the first element inserted in the hashtable and the second element of enum was really the second element inserted in the hashtable.
What do u think..which option is correct ?
Ny idea will highly appreciated.
Thanks in advance.
Sanjeev Dhimanhi, i am again..
boss ! this is not true..u just change the order and or change the keys and something like ...
"Sanjeev", "hello"
"Dhiman", "hi"
"Technosys" ,"Services"
u will find that its not LIFO..really i was thinking before coding my project that option A is correct and with knowledge i wrote 3 - 4 classes but when i run the programm its starts throwing errors.
so, i posted this question. I think "apppu" is right.
I think , firstly hash is calculated for each value and that value is returned which can be received in a fastest way and hence not necessarily in LIFO and FIFO..
Thanks to u also as u gave ur precious time for me.
Once again.
Thank you very much.
Sanjeev Dhiman -
Not able to get the profile value set at Responsibility level
Hi,
I had set the value of a custom profile at Responsibility level and in CO i used the
following code,
String rLocation = pageContext.getProfile("XXTMG_PR_SCP_LOCATION");
The above call returns NULL. But if i set the value of the profile at Site Level then the above code returns the correct value of the profile. I bounced the apache after the profile option was changed but no avail.
I even tried using getOADBTransaction().getSpecificProfile() in the AM (which was
called from CO) as below but could not get the value of the profile,
Number lRespID = new Number(getOADBTransaction().getResponsibilityId());
String retLoc1 = getOADBTransaction().getSpecificProfile("XXTMG_PR_SCP_LOCATION","","",
lRespID.toString());
Could any of you please let me know whether i have missed something in the code which results in not getting the correct value for the profile at the Responsibility level.
Thanks, Suresh.Instead of passing null for the other parameters in call to getSpecificProfile, can you please set these params and try ?
Also, please note that if a value is defined at site level, then even if a value is present at the resp level, the value at site will be returned when you use getProfile method.
Thanks
Tapash -
Remote Object - not able to get the returned value from java method
Hi ,
I am developing one sample flex aplication that connects to the java code and displays the returned value from the
java method in flex client. Here I am able to invoke the java method but not able to collect the returned value.
lastResult is giving null . I am able to see the sysout messages in server console.
I am using flex 3.2 and blazeds server and java 1.5
Here is the code what I have written.
<?xml version="1.0" encoding="utf-8"?><mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" backgroundColor="#FFFFFF" initialize="initApp()">
<mx:Script><![CDATA[
import mx.controls.Alert;
import mx.binding.utils.ChangeWatcher;
import mx.rpc.events.ResultEvent;
import mx.messaging.*;
import mx.messaging.channels.*
public function initApp():void {
var cs:ChannelSet = new ChannelSet();
var customChannel:Channel = new AMFChannel("my-amf", "http://localhost:8400/blazeds/messagebroker/amf"); cs.addChannel(customChannel);
remoteObj.channelSet = cs;
public function writeToConsole():void { remoteObj.writeToConsole(
"hello from Flash client");
var returnedVal:String = remoteObj.setName().lastResult; Alert.show(returnedVal);
//[Bindable]
// private var returnedVal:String;
]]>
</mx:Script>
<mx:RemoteObject id="remoteObj" destination="sro" />
<mx:Form width="437" height="281">
<mx:FormItem>
</mx:FormItem>
<mx:Button label="Write To Server Console" click="writeToConsole()"/>
</mx:Form>
</mx:WindowedApplication>
Java code
public
public SimpleRemoteObject(){
super(); }
class SimpleRemoteObject {
public void writeToConsole(String msg) { System.out.println("SimpleRemoteObject.write: " + msg); }
public String setName(){ System.
out.println("Name changed in Java");
return "Name changed in Java";
And I have configured destination in remote-config.xml
<destination id="sro">
<properties>
<source>SimpleRemoteObject</source>
<scope>application</scope>
</properties>
</destination>
Please help me .You are not able to get the returned value because if you see the Remote object help you will realise you have to use result="resultfn()" and fault = "faultfn()"
In this you define what you wish to do.
More importantly in the remote object you need to define which method you wish to call using the method class like this
<mx:RemoteObject id="remoteObj" destination="sro" result="r1" fault="f1" >
<Method name="javaMethodName" result="r2" fault="f2"/>
<mx:RemoteObject>
r2 is the function where you get the result back from java and can use it to send the alert.
Maybe you are looking for
-
Some web sites allow files and free mp3 tracks to be downloaded by right clicking on an icon and selecting "save target as ...". But Firefox does not have this option. How do others handle this? I have had to go back to Internet Explorer to use this
-
Multiple libraries on one Mac recognised by iPods?
I would like to have all my music in one location but have multiple libraries for different members of my family. When I plug in an iPod, say my daughter's, I want it to know whose iPod it is, and open the relevant library (my daughter's) so that I c
-
I got a new computer, Win 7, 64 bit OS, bought an external drive housing where my old hard drive now exists as an external drive. I downloaded a new copy of Firefox, 3.6.3, and would like to get my bookmarks from the old hard drive into the new one b
-
Problems opening some PDF's with new version of Adobe Reader X
Ever since the latest update for adobe reader has come out I have been unable to open some PDF's. This was never an issue with the older version. When I try to open certain PDF's the reader says "Not Responding" and nothing happens. This does not hap
-
Certain websites are not running on my Macbook Air how can I fix that?
I was trying to get on LouisVuitton.com and it would not load, the page would just be black.