PPR: not working?
Hello
I use jdev 11.1.1.6.0
My user interface look like:
Category: - Please select-
Status: - Select -.
My requirement is:
1.initially, category field must be appear unSelectedLabel.
2. If I choose a value in the category means that status should be visible.
3. If I choose - please select - in category: status should get false visible.
the selected values of first choice are populated programmatically.
Here we are my. JSFF page.
<af:selectOneChoice label="Category" id="soc2" autoSubmit="true" rendered="true" value="#{backingBeanScope.xbean.selectedValue1}" unselectedLabel="--Please Select--" valueChangeListener="#{backingBeanScope.xbean.categorylisteners}"> <f:selectItems value="#{backingBeanScope.xbean.elements1}" id="si2"/> </af:selectOneChoice> <af:selectOneChoice label="Status" visible="#{backingBeanScope.xbean.selectedValue1 ne null ? true : false}" value="#{backingBeanScope.xbean.selectedValue}" id="soc3" partialTriggers="soc2" unselectedLabel="--Select--"> <f:selectItems value="#{backingBeanScope.xbean.elements}" id="si3"/> </af:selectOneChoice>
bean code:
public SelectItem[] elements = null; public String selectedValue; public SelectItem[] elements1 = null; public String selectedValue1; public void categorylisteners(ValueChangeEvent valueChangeEvent) { // Add event code here... if (valueChangeEvent.getNewValue() != null) { if (valueChangeEvent.getNewValue().toString().equals("0")) { ADFUtil.setBoundAttributeValue("Cat1", "Pol Rel"); } else if (valueChangeEvent.getNewValue().toString().equals("3")) { ADFUtil.setBoundAttributeValue("Cat1", "Cms"); } else if (valueChangeEvent.getNewValue().toString().equals("6")) { ADFUtil.setBoundAttributeValue("Cat1", "Qute"); } } } public BindingContainer getBindings() { return BindingContext.getCurrent().getCurrentBindingsEntry(); } public void setElements(SelectItem[] elements) { this.elements = elements; } public SelectItem[] getElements() { BindingContainer bindings = getBindings(); DCIteratorBinding empVO1 = (DCIteratorBinding)bindings.get("Xstatusvo1Iterator"); ViewObject empVO = empVO1.getViewObject(); empVO.setWhereClause("CATEGORY = :1"); empVO.setWhereClauseParam(0, ADFUtil.getBoundAttributeValue("Cat1")); empVO.executeQuery(); int len = empVO.getRowCount(); elements = new SelectItem[len]; SelectItem item = null; for (int i = 0; i < len; i++) { Row rw = empVO1.getRowAtRangeIndex(i); if (rw != null) { item = new SelectItem(); item.setValue(rw.getAttribute("Categoryid").toString()); item.setLabel(rw.getAttribute("Status").toString()); } elements[i] = item; } return elements; } public void setSelectedValue(String selectedValue) { this.selectedValue = selectedValue; } public String getSelectedValue() { return selectedValue; } public void setElements1(SelectItem[] elements1) { this.elements1 = elements1; } public SelectItem[] getElements1() { BindingContainer bindings = getBindings(); DCIteratorBinding empVO1 = (DCIteratorBinding)bindings.get("xcategoryvo1Iterator"); ViewObject empVO = empVO1.getViewObject(); empVO.executeQuery(); int len = empVO.getRowCount(); elements1 = new SelectItem[len]; SelectItem item = null; for (int i = 0; i < len; i++) { Row rw = empVO1.getRowAtRangeIndex(i); if (rw != null) { item = new SelectItem(); item.setValue(i); item.setLabel(rw.getAttribute("Category").toString()); } elements1[i] = item; } return elements1; } public void setSelectedValue1(String selectedValue1) { this.selectedValue1 = selectedValue1; } public String getSelectedValue1() { return selectedValue1; }
1.initially, category field must be appear unSelectedLabel.
Nice work
2. If I choose a value in the category means that status should be visible.
works fine
3. If I choose - please select - in category: status should get false visible.
Does not .
I noticed one thing at this point. If I reload the page manually does status get false visible. But I don't want to reload the page manually.
Please check and tell me. what Miss me?
Thank you.
You had your bean in backingBeanScope which means that the bean is created for each request. The value selected in the bean is zero (even if you see the right selected label. Now, if you change the back of the value for the value "select...". "the null value that does not change the original value (in the bean). Only if you change the value of the valueChangeEvent is fired.
Timo
Tags: Java
Similar Questions
-
Partial triggers does not work for my application
my code like this:
....
< af:selectOneChoice id = "soc1.
Binding = "#{createProjectBean.proCategory} '"
valueChangeListener = "#{createProjectBean.selectChange} '"
rendering = "true" required = "true".
autoSubmit = "true" >
< f: selectItems value = "#{bindings." CategoryId.items}"id ="si1"/ >
< af:selectItem label = "selectItem 1" id = "si2" value = "11" / >
< af:selectItem label = "selectItem 2" id = "si3" value = "22" / >
< / af:selectOneChoice >
< /p >
.....
< af:selectManyCheckbox id = "smc1.
Binding = "#{createProjectBean.prodPref} '"
valueChangeListener = "#{createProjectBean.valueChange} '"
required = "true" rendered = "#{bindings.createProjectBean.showCheckbox} '"
"label =" * select all products you want to compare:
partialTriggers = "soc1" >
< af:selectItem label = 'Oracle Fusion application' value = 'Oracle Fusion application' id = "si8" / >
< af:selectItem label = value 'Application of the working day' = 'Application of the working day' id = "si10" / >
< af:selectItem label = 'Mircosoft Dynamic' value = 'Mircosoft Dynamic' id = "si7" / >
< af:selectItem label = "Peoplesoft" value = "Peoplesoft" id = "si9" / >
< / af:selectManyCheckbox >
< p >
........
the partial bean code:
{} public boolean selectChange (ValueChangeEvent valueChangeEvent)
String selItem = (String) valueChangeEvent.getNewValue ();
{if (selItem.Equals("22"))}
setShowCheckbox (true);
} else {}
setShowCheckbox (false);
}
Return this.showCheckbox;
}
......
However, it is not working.could someone can help me?
Hello
Try to use binding with the scope to be and use partial trigger programmatically.
To refresh the pane programmatically:
Bind the component at the bean. for example
value = "outputText1" >
The extent of the necessary use following the API inside the bean:
AdfFacesContext.getCurrentInstance () .addPartialTarget (NameOfBindingAttribute);
Also check the procedure below
Activation of Page partial, rendering declaratively
Triggers must inform the framework that a PPR request occurred. On control components, this is achieved by setting the attribute partialSubmit to true. This causes the component to order for a partial page request fire whenever it locks.
The autoSubmit on an input element attribute and the attribute partialSubmit on a component of command are not the same thing. When partialSubmit is set to true, while the components that have their partialTriggers attribute values will be processed through the life cycle. The autoSubmit attribute is used by entry and choose the components to tell the framework to automatically a form submit whenever the value changes. However, when a form is submitted and the autoSubmit attribute is set to true, a valueChangeEvent event is called, and the life cycle runs only on the items marked as components of root for this event and their children.
1 - Select the trigger (in other words, the component whose action causes the PPR)
If the trigger is a control element, set the attribute to true partialSubmit
If the trigger is an input or select element within a form and you are looking for the value that will be submitted, expand the section of behavior of the property inspector and the component set to true autoSubmit attribute.
2. Select the target component that you want to return when a PPR-trigger event occurs. the trigger for the shuttle to the selected Panel, and then click OK.
Ref: http://docs.oracle.com/cd/E16764_01/web.1111/b31973/af_ppr.htm
Thank you
Amey
-
clientListener does not work with my rich input Custom tag
Hello
clientListener does not work with my rich input Custom tag
I have a custom tag myInputText and here are some details abt it...
MyInputText extension of RichInputText
MyInputTextTag extension UnifiedInputTextTag (Tag Handler)
AjaxTextFieldRenderer extension SimpleInputTextRenderer (for purposes of rendering)
So, when I use
< mc:myInoutText id = 'test100' >
< af:clientListener method = "clientMethodCall" type = "keyUp" / >
< / mc:myInoutText >
< af:inputText id = "test101" label = "test101Label" >
< af:clientListener method = "clientMethodCall" type = "keyUp" / >
< / af:inputText >
in my page and run the clientMethodCall page is called for test101 but NOT for test100.
Don't know why,
Could someone help me please...
Thank you
MuraliHello
I still think you're missing one rendering engine, else your rendering engine would not be called, because it must be returned by a method protected createFormInputRenderer (FacesBean.Type type) FormInputRenderer.
In addition, renderScript does exactly? Its positioning can be really messy in this case since the element root dom was not yet written in the Responsewriter and can also be dangerous in a PPR request (if not more). The correct way to do this would be to create a custom JavaScript counterpart and place the code in the InitDomElement function.
Kind regards
~ Simon
-
Can you please fix the problem? Appstore cannot update or install apps... App Store not worked yesterday.
We cannot solve a problem for you, but we can make suggestions of troubleshooting...
Have you tried restarting your iPhone yet?
- Press and hold the sleep/wake button until the Red slider appears.
- Drag the slider to turn off your device completely off.
- Once the device turns off, press and hold the sleep/wake button again until you see the Apple logo.
-
Safari does not work after installing macOS Sierra
Safari and apple store does not work after installing macOS Sierra
Alas, my crystal ball is in the shop for cleaning, so you will need to provide more details on what "doesn't work" and above all error messages. First of all, let's start the App Store. Provide as much information as possible for those of us who do not sit on your shoulder.
-
My iPad Apple 3rd generation wifi + his cell phone does not work
MY 3rd generation Apple iPad, wifi + cell
model number MD408LL/a
Serial number DM * VGL
THE SOUND DOES NOT WORK
< personal information under the direction of the host >
All sounds, or simply notification and sounds apps (for example do music and videos app still have sound)? If notifications and apps you have notifications on mute: on the iPad side switch - Apple Support ? If the sounds in all applications which have tried for example soft-reset/reboot of the iPad, insert/remove the headphones?
-
I installed the latest update required for my iphone ios 6 a few days ago, and now when I try to download pictures from my iphone to my PC (via USB connection), the PC does not see the iphone. iTunes sees it yet, but windows Explorer does not work. It seems that some setting has been broken through the update of ios. A way to solve this problem?
Restart the computer and the iPhone. Unlock the iPhone before connecting it to the computer. Any change?
TT2
-
QuickBook 2015 does not work on OS Sierra
Hello! My quick book 2015 will not work on the newly installed MacOS Sierra. "You cannot use this version of Quickbooks 2015.app with this version of Mac OS" is someone has a solution to this problem
Seems what intuit has changed their Quickbooks for a right to use a month for their application
According to their web site. or a close to $300. cost for a licence of the only machine (more?)
Some research suggests that QuickBooks version 17 exist, maybe it's the subscription model
as their single version machine says it's version 16. For Intuit Quickbooks information, rely on them:
• For Mac - accounting software - Intuit QuickBooks:
https://QuickBooks.Intuit.com/Mac/
The subscription models, suggest that they offer a "free trial" then a monthly fee.
I have not read past the first page. -Not certain what options may exist, to Intuit.
And I'm not a user of QuickBooks...
Edited to add: see quickbooks support:
Is Quickbooks for Mac going to Sierra? Is there an another altern...
https://community.Intuit.com/.../1394425-is- QuickBooks- for-mac-goes-for -sierra- is-t
Update 2015 is here: http://http-download.intuit.com/http.intuit/Downloads/2015/US_R8/QuickBooksProMa c2015.dmg
- IntuitBiscotti
- 7 days ago
Good luck and good hike!
-
Open the link behind Mail does not work
Sierra using my link opened behind Mail does not work. The link opens on the top of the window.
This option works for me in Sierra... is working for you with your previous version of the OS?
-
iPhone 5 home button does not work after ios 10
My 5 Iphone Home button does not work after update final IOS version of 10.
The home button works on the first push to wake the phone but it will not open the phone the second button.
I activated the assist button, which does not work either. But what I discover is if I open device for assistance then touch and lock screen click on the button home will work once to open the phone. If I open any app I can't close it unless I go through the same routine.
You attempted to restart your phone?
You can do so by holding the sleep/wake button and the Home button simultaneously until the Apple logo appears
-
Do not disturb (on request) does not work
I have an iPhone 7 more with iOS 10.0.2. I had set up as NEW when I got it. I use the function do not disturb I SLEEP every night to block the incoming notifications apps and emails (including work with the application Outlook email). I leave the phone won't cut not so I can make sure my alarm wakes me up the morning. But it does not work. I still wake up emails and notifications of the app. It worked on my old iPhone with iOS 6, 8, 9 or even 10.
I see a lot of old messages and questions about DND not work, but they were more specific to older phones and ' iOS.
Anyone else having this problem?
Any ideas for help?
Thank you.
I'm sure that I understood this.
I had "only when locked" checked and not 'always' in settings do not disturb.
I leave my iPhone unlocked all night using the bedside table Central app as my alarm clock.
There we go.
-
Contact ID does not work after update iOS10.0.2
http://www.Macworld.co.UK/how-to/iosapps/iOS-10-troubleshooting-tips-3646690/
Troubleshooting iOS 10 tips: Touch ID does not work
Some users have reported that a previously happy Touch ID installation stopped working when they made the update to iOS 10. It is a pain, but rescuable - you will probably need erase your fingerprints and re-enter.
First, however, try something simpler: go to settings > Touch ID & password, enter your password, then press the buttons next to pay Apple and iTunes and App Store so that they become white. Turn off your iPhone and turn it off again, then go back to settings and turn the two knobs back to green (you will need to enter your password Apple ID).
Who fixed the problem? I haven my Aff!
If not, go through the fingerprint stored in settings > Touch ID & password - press each of them in turn - then erase fingerprints. Then go back and press Add A digital footprint and put back them in. It's a bit complicated, but it should fix the problem.
I did all that, but the problem could not be solved.
Try the following steps:
1. go in the settings, press button ID & password, enter your password. Then turn off iTunes and App Store. Restart your iPhone or iPad. Return to Touch ID and password in the settings and re - turn on iTunes and App Store. Press Add a fingerprint to add another print.
2 remove and re-add fingerprints: settings > Touch ID & password > enter your device code > scroll to find fingerprints fingerprints. Press the fingerprint, that you want to remove, and then press DELETE.
3. restart your iPhone by pressing and hold the Sleep/Wake and home.
-
Projector does not work after upgrade from Sierra
My projector does not work after upgrade to Sierra. Or search in Outlook (I use outlook for Mac due to having MS 365 for labour) or the search function in the finder. I use this all the time and need this feature back. I tried to reindex spotlight and nothing. Anyone has any ideas.
Try to rebuild Spotlight rebuild the Spotlight to your Mac - Apple Support index
-
Scan with preview - several Pages of a PDF THAT does not work in Mac OS Sierra
Hello everyone,
I had upgraded my Macbook Pro (early 2011) to Mac OS Sierra. A famous feature of older versions of Mac OS is to use Preview to scan documents to PDF format, joined the pages scanned all of a single document.
After upgrading to Sierra this feature does not work correctly. The pages are not more combined into a single PDF. Anyone who has observed the same problem?
Best regards from the Germany
Jörg
Yes, it's been posted here several times.
-
ITunes and the AppStore do not work with Sierra
I upgraded to El Capitan Sierra and now ITunes and AppStore do not work. The message says something wrong with the internet connection and not able to connect.
I tried to disconnect and connection that worked with the AppStore, but still can not.
ITunes does not allow a reconnect.
Any help appreciated.
Thank you
Aurore
Try the following steps:
Advanced steps for fixing problems with iTunes Store - Apple Support connection
Maybe you are looking for
-
Hello I want to use my book 70CT in the car or at least be capable of recharging in the car. Anyone know if there is a suitable Chargers / or power supplies that operate out of current 12 volts Lena
-
How to make two separate signals
Now I use NI 9215 with NBC to get the data. I have two channels I will, but the problem is when I using Assistant.vi of data acquisition, there is a single output, I want the two signals can be separated (two output channels). Can someone help me?
-
Window seems to be the right size
My windows XP was recentlly, hard hit by a virus and I took it to a shop that has reinstalled XP. Since then, with Internet Explorer and Firefox, windows ' do not seem to fits correctly "it's climax with Sky poker where I can't play without playing i
-
Deleted items are in my deleted folder, how can I find them in my Inbox in?
-
Why YouTube gives me "error - user stopped operation?
A month ago, I downloaded a video on YouTube - no problem. Now, I can't download anything. YouTube keeps giving me an error message indicating that I (the user) stop the operation. ??? Can anyone help?