Access the UI components in the managed bean
I am newbie in Jdeveloper and just read the book of "Quick start guide to oracle developer"
I am confused of the steps of accessing the UI component of the page
e.g.
public void salesman_valueChanged(ValueChangeEvent valueChangeEvent) {
// Add event code here...
getCommission().setDisabled(true);
if (valueChangeEvent.getNewValue().equals("SA_REP")) {
getCommission().setDisabled(false);
getCommission is supposed to return the UI Component instance of text box commission.
How can I implement this?
Thanks.
getCommission is supposed to return the UI Component instance of text box commission.Bind your UIComponent to your managedBean (you would need to register this in teh taskflow or adfc-config.xml) . This can be done using the Binding attribute in the Advanced tax for the inputText component.
"binding=<MemoryScope_onlyIfOtherThanRequestScope.BeanName>.commission" .. this will generate a getCommission() & setCommission() method which can be used.
Also please modify the code below to have a PPR on the component else it will not refresh on the UI-
+public void salesman_valueChanged(ValueChangeEvent valueChangeEvent) {+
+// Add event code here...+
getCommission().setDisabled(true);
+if (valueChangeEvent.getNewValue().equals("SA_REP")) {+
getCommission().setDisabled(false);
+}+
AdfFacesContext.getCurrentInstance().addPartialTarget(getCommission());
+}+
Similar Messages
-
Lost the CNi components on the Controls toolbar
I am using Componentworks++ with Visual C++. My CNi components went away on
my controls toolbar. If I try to add them from the Components and Controls
gallery, the non-CW++ controls are added instead (they have class names that
start with CW instead of CNi). Does anyone know how to re-attach the CW++
components? If not, are their differences/problems in using the CW
components from the Component gallery instead?
Thanks,
MarkWe haven't seen this happen before with an existing project created from the
wizard. I'm not sure what happened, but the GUID must be added back to the
DSP file manually. There is a KB document that explains how to add support
to an existing project that should help you: http://digital.ni.com/public.nsf/72899cb3b87fba9f862567f20062b775/0cb6707522e92c958625689e0052bb77?OpenDocument&Highlight=2,toolsadditionalinfo
Best Regards,
Chris Matthews
Measurement Studio Support Manager
"Mark Greenman" wrote:
>I am using Componentworks++ with Visual C++. My CNi components went away
on>my controls toolbar. If I try to add them from the Components and Controls>gallery,
the non-CW++ controls are added instead (they have class names that>start
with CW
instead of CNi). Does anyone know how to re-attach the CW++>components?
If not, are their differences/problems in using the CW>components from the
Component gallery instead?>>Thanks,>Mark>> -
Ideas to display which component drives the other components in the canvas
I have 4 components in my canvas and I would like to learn some ideas from gurus on what are the best ways to display which component drives (drills down) the other components in the dashboard. Any info would be appreciated.
Hi,
There is no such rule on which component should drive other in Xcelsius. It all depends upon the data that you are using. Always a component with summarized data should drive a component with granular data. For eg: If you are showing Total sales in a country using Column chart and want to drilldown to the percentage of sales in each region of a particular country , you can use pie chart to show it. Here Column chart drives Pie chart and u can show this in other way also.
Hope it helps!
Thanks,
Arun US -
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. -
ADF Faces: How to get the ADF BindingContainer in a managed bean?
Hi,
I not sure how to get the BindingContainer instance from inside of a managed bean method. I have tried the following config, but it does not work in all situations.
<managed-bean>
<managed-bean-name>backing_showBooks</managed-bean-name>
<managed-bean-class>view.backing.ShowBooks</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
<managed-property>
<property-name>bindingContainer</property-name>
<property-class>oracle.adf.model.binding.DCBindingContainer</property-class>
<value>#{bindings}</value>
</managed-property>
<!--oracle-jdev-comment:managed-bean-jsp-link:1showBooks.jsp-->
</managed-bean>When an ActionListener- method of my ShowBooks bean is called the property bindingContainer is NULL!!
Is there a save way to get the BindingContainer in my bean??
Any hints are welcome.
Thanks,
MarkusMaybe I just need another pair of eyes but when I set this up as explained and watch it in the debugger my method public void setBindingContainer(DCBindingContainer bc) gets called but bc is null. Can anyone help?
Thanks
Backing Bean-
private DCBindingContainer bindingContainer;
public void setBindingContainer(DCBindingContainer bc) {
this.bindingContainer = bc;
public DCBindingContainer getBindings() {
return bindingContainer;
//I just threw this method on there in case I was missing something & I also
//tried using a getBindingContainer method above but that didn;t work.
public void setBindings(DCBindingContainer bindings) {
this.bindingContainer = bindings;
adf-faces.conf entry
<managed-bean>
<managed-bean-name>backing_VunerabilityDetail</managed-bean-name>
<managed-bean-class>viewcontroller.backing.VunerabilityDetail</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
<managed-property>
<property-name>bindingContainer</property-name>
<property-class>oracle.adf.model.binding.DCBindingContainer</property-class>
<value>#{bindings}</value>
</managed-property>
<!--oracle-jdev-comment:managed-bean-jsp-link:1VunerabilityDetail.jsp-->
</managed-bean> -
ADF Faces : How to set the selection button in a managed bean
I am looking for a way to select the selection radio button of a specific row in a Table when using af:tableSelectOne.
I am using the tableModel to manage row but I did not find a way to select the row.Have you implemented a CollectionModel?
If so, then you must know the rowKey of the item you want to select in the table.
simply bind the "selectionState" attribute of the <af:table> to point to your RowKeySet instance that has the rowKey of the item you want selected. -
Getting the last action from a managed bean
Is it possible to get the last action that was submitted from within a backing bean.
I have an application that has a context specific menu at the top of the page. The context menu is generated using a backing bean which is called from a tiled jsp, called contextmenu.jsp.
The context menu backing bean needs to know what page it is on so that it can generate the correct menu, so is it possible to get hold of the last action submitted, or the current page from within the backing bean?
Any help would be much apprecieated.
Jamie CashThanks for your help,
but ...
We will be developing over 200 jsps and don't want to load the development effort with a backing bean for each jsp.
The solution that I finally arrived at is using the following code in the menubean to get the view id, and make the decision based on that.
public NavigationMenuItem[] getContextMenu()
//Get view id
String viewId = FacesContext.getCurrentInstance().getViewRoot().getViewId();
logger.debug("view id: " + viewId);
//Menu
NavigationMenuItem[] contextMenu = null;
if(viewId.equals("/home.jsp"))
.... Code to get context menu from Stateless Session bean
//Return menu
return contextMenu;
Regards
Jamie -
How to expose UI components in a managed bean?
Dear all
I created a jsf page without exposing UI components in managed beans.
And the page is created successfully.
But now I want to expose UI components in managed beans again
How to make this??
Please helpselect your component in Jdeveloper main menu, in the property inspector find Binding property -->click Edit to bind this component to a managed bean property.
-
SharePoint 2013 Foundation Search - Change the admin components to the new WFE server
Hi,
We tried to move the Search Service Application from one server to another server which was newly joined in the Farm.
In this case,the Search Service in my App server - which was working earlier also did not work. I tried almost all Powershell scripts to stop the service, and i could not make it.
Please let me know, how to stop the search service in both servers and to run only in the new server that i have joined.
Also, we need to move all Search Admin components to the new server, and from then Search Index should work only in the new server and not the old one.
Kindly let me know the possibility how can this be achieved.
Thanks in Advance!Hi Karthikanandh,
If you want to stop the Search service in both servers and only run in the new server, then you can stop the service in Central Administration in both the two servers and start the service in new server.
Please go to Central Administration > System Settings > Manage service on server > change the server to the one that you need to stop the search service and then stop the search service.
To move the search admin component to another server, then you need to clone the active Search topology and move that component, and then then activate the topology and move the remaining components.
http://sharepoint.rackspace.com/sharepoint-2013-search-administration-tutorial
http://blogs.technet.com/b/pfelatam/archive/2013/05/10/create-a-search-topology-in-sharepoint-2013.aspx
http://technet.microsoft.com/en-us/library/jj862354.aspx#Search_Comp_Clone
Best regards.
Thanks
Victoria Xia
TechNet Community Support -
What are the basic components in the library plugins folder.
What are the standard plugins in the Library/Plugins folder for Snow Leopard? I'm trying to figure out what I can uninstall and I have no clue.
It probably contains the empty folders Components, HAL, MAS, and VST. (I'm not sure, since my folders do contain stuff.) But none of Apple's standard effects and instruments are sitting there.
-
Use only the BPM components of the suite
Where can I download the complete installer of 11g(with the virtual machine option)?
There is posible just use the BPM components and for instance the WSO2 suite for SOA?
thanks
RayHi Ray,
Here's one that is preconfigured and runs on Oracle's VM Virtual Box: http://www.oracle.com/technetwork/middleware/soasuite/learnmore/vmsoa-172279.html
Dan -
About the difference between the AWT components and the swing components
As we know that an AWT component has a peer, but dose a lightweight component(e.g: a swing component) has also a peer? And could somebody tell me that who and how creates the CLICKED_EVENT when I click a JButton(a swing component), and where the CLICKED_EVENT to go util it was processed by a method like btn_ok_clicked(Event e)? And if I click a Button(an AWT component), what's the difference?
Thanks a lot!The main difference is that AWT are native components, and Swing components are entirely in java written. That's besides the look and feel. There are a lot of other differences between AWT and Swing, and there are better described in the documentation.
-
Howto: Iterate ADF BC from a managed bean from the View?
Hi Everyone,
I've been trying to iterate a BC ADF object from a managed bean from the view layer. Here is what I have done so far, but I don't seem to get any records:
In faces-config.xml, I am passing in the BindingContext to the managed bean. (This is a session scoped bean).
<managed-property>
<property-name>bindings</property-name>
<property-class>oracle.adf.model.BindingContext</property-class>
<value>#{data}</value>
</managed-property>In the testPageDef.xml I have the executables and bindings setup:
<executables>
<iterator id="TestRO1Iterator" RangeSize="-1" Binds="TestRO1"
DataControl="ApplicationControlDataControl"/>
</executables>
<bindings>
<table id="TestRO1" IterBinding="TestRO1Iterator">
<AttrNames>
<Item Value="C1"/>
<Item Value="C2"/>
</AttrNames>
</table>
</bindings>In my managed bean, in addition to the accessors for the bindingContext of bindings, I have:
BindingContainer bc = getBindings().findBindingContainer("testPageDef");
ControlBinding cb = bc.getControlBinding("TestRO1");
RangeBinding rb = (RangeBinding)cb;
List testList = rb.getRangeSet();
Iterator testIter = testList.iterator();
int testCount = testList.size();
while (testIter.hasNext()) {
Map attrs = (Map)testIter.next();
System.out.println(attrs.get("C1")+","+attrs.get("C2"));
//Do some fancy stuff here with the values.
}However, my testList.size() always returns 0.
Is this the right method to programatically access the data from the view layer from a managed bean, or have I missed something completely? Are there any working samples that I could take a look at?
Jdev: 10.1.3.1
Thanks!
KentonHi,
<managed-property>
<property-name>bindings</property-name>
<value>#{bindings}</value>
</managed-property>
private BindingContainer bindings= null;
public void setBindings(BindingContainer bc){
bindings = bc;
public BindingContainer getBindingContainer(){
return bindings;
DCIteratorBinding dciter = (DCIteratorBinding ) bc.get("TestRO1Iterator");
RowSetIterator rsi = dciter.getRowSetIterator();
while (rsi.hasNext()){
Row rw = (Row) rsi.next();
//Do some fancy stuff here with the values.
You find several examples in the developer guide and on the Internet
Frank -
Setting bind variable for a view object from the Managed Bean
Hi,
i am using JDeveloper 11g, i have to create LOV in the JSF. To show the LOV, it has to populate data using View object and its query parameter need to be sent from the Managed Bean.
For the View object i want to set the bind variable parameter from the managed bean value. bename is stored in a managed bean (session scope)
#{beantest.bename}
But it gives the following exception.
JBO-29000: Unexpected exception caught:
org.codehaus.groovy.control.MultipleCompilationErrorsException,msg=startup failed, Script1.groovy: 1: expecting '!',found '{'@ line1, column 2.
I have followed the link http://kr.forums.oracle.com/forums/thread.jspa?threadID=615474 like Frank wrote on 8.2.2008:
But steps are not clear.
How to input the VO bind parameter with Managed bean variable?
Any Help
Regards
Raj
Edited by: user9928180 on Dec 17, 2008 9:51 AMHi,
a bind variable in a VO needs to be exposed as an executeWithParams operation in the pageDef file. Just add a new action binding to the pageDef file (context menu) and select the executeWithParams operation on teh VO. Then in the argument field, reference the managed bean property for the value
Frank -
How to programmatically Identify the Phase from a managed bean
How can we identify the Phase from a normal managed bean method ?
This managed bean method is a method activity in a task-flow. How can we identify the phase..?
If there is an event then, we can identify the phase using event.getPhaseId() but here there is no event. Can I get the phase programmatically ?
ThanksHi,
You won't need that with a PhaseListener. You could use something like the following:
public class CurrentPhaseListener implements PhaseListener
private static ThreadLocal<PhaseId> currentPhaseId = new ThreadLocal<PhaseId>();
public static PhaseId getCurrentPhaseId()
return currentPhaseId.get();
public void afterPhase(PhaseEvent ev)
currentPhaseId.remove();
public void beforePhase(PhaseEvent ev)
currentPhaseId.set(ev.getPhaseId());
public PhaseId getPhaseId()
return PhaseId.ANY_PHASE;
}Regards,
~ Simon
Maybe you are looking for
-
Can't install apps in iPad mini using iTunes
I have an iPad mini iOS 6.1.3. I download apps via iTunes. But when I try to transfer apps from my PC to my device(iPad mini), it doesn't work. I drag an app and place it in pad window in iTunes and iTunes shows the app in its pad window, but in my d
-
Bapi for creation of employee(pernr)?
Hi, Is there any Bapi with which we can create an employee(Pernr)? I need to call this BAPI from .net connecctor. We have BAPI_APPLICANT_CREATE for applicant creation. Like this, do we have any thing for employee creation? Thanks in advance, RSS.
-
How to add a virtual qwerty to facebook LoginWindow
Hello every one! This is my first Discussion on this forum, i have read this a few times looking for solutions, but i not for asking... Well, my problem is that i am developing a software usig flex builder for a all in one computer. One of the thing
-
How to do a bios update for installed memory
I just bought 2 1 gb dimms and my computer does not recognize them. Even when I switch them from the slots to mke sure I read do a BIOS update. How do you do that, as I also have the newest 10.9 system. Thanks
-
Need the logic to retrieve the data from the table
Hi , I have a table with the following data ID Dept Sal 100 a 10 100 b 20 100 c 30 100 d 40 200 b 20 200 c 30 200 d 40 300 c 30 300 d 40 400 d 40 I want to retrieve the ID's from the above table based on the below logic.. a) If an ID is in Dept 'a' d