ADF Faces: how to extend one of the faces components
Hi all,
I am thinking of extending the built-in ADF Faces CommandMenuItem component (to work around a bug that was filed). The only thing that I think I need to do is to add an additional property - I don't believe that I will need to add any additional behavior to the tag.
Can anyone comment on (high level) the steps that I would need to go through? I'd like to
a). Add the property
b). Make sure the property shows up in the JDev property inspector
c). Inherit everything else from CoreCommandMenuItem.
I've looked at the source code (from the Apache guys), and this doesn't look too hard. I don't want to re-compile the whole Apache drop, just create a new component as described above, but I've no idea really where to start.
Any insights appreciated,
John
Hello John,
I don't know how possible it will be. It depend on what kind of property you want to add. Here are the general indications to acheive this.
1) Make a custom component class extending CommandMenuItem class and add an additional property.
2) Extends the commandMenuItem tag clas with your own
3) override the method public void setProperties(javax.faces.component.UIComponent component)
you just have to call the parent first which is the specification behavior anyway, so:
public void setProperties(UIComponent component) {
super.setProperties(component);
// Cast the component to your component class and set your additional property on it
4) The hard part... This is where I'm unsure of the procedure, but I would say that you'll have to extends ADF Faces's renderer for commandMenuItem and find a way to push the property in it if it has to be sent to the client. This seem really annoying to do. One way to do it would be to wrap the ResponseWriter so you can intercept what the parent renderer encodes and insert your property in the right spot. That strategy requires an additional (probably intern) class extending ResponseWriter. Then you would have to do something like this:
FacesContext context = FacesContext.getCurrentInstance();
ResponseWriter initial = context.getResponseWriter();
context.setResponseWriter(new MyWrapperWriter(initial));
super.encodeBegin(context, component);
context.setResponseWriter(initial);
The Wrapper would have to override all methods and delegate the call to the wrapped instance. When calling startElement(String) you would add a call to writeAttribute for your own property.
5) For showing the property in the property editor panel you must fill a faces-config.xml file with the <component> tag. Since that one does not allow inheritance (which is really annoying imho) you'll have to copy most of the properties from adf faces' faces-config.xml file.
6) Fill the tld for your new tag
7) JAR the whole thing
8) Edit your tag library from Tool in the menu I think (not on a computer with JDev installed atm so cannot be sure). Add your library that you just created. If faces.config.xml and the .tld are well made JDev will figure prety much everything on its own. You will now have a new choice in the dropdown menu of the component palette for your custom library.
I hope I was decently clear.
Regards,
Simon Lessard
Similar Messages
-
I have a iPad and iPhone with the same Apple ID, but on Game Center I have used the same id for both devices and they are two different profiles and I was wondering how to have one of the accounts on both devices.
Hi Jamesdwills,
Welcome to the Support Communities!
If you are using the same Apple ID on both devices, the Game Center profile should be the same.
Check out this information from the iPad User Guide. Try signing out of the Game Center on both devices and then sign back in with the correct Apple ID:
Using Game Center
http://support.apple.com/kb/ht4314
Game Center settings - iPad User Guide
http://help.apple.com/ipad/7/#/iPad9a13d039
Game Center settings
Go to Settings > Game Center, where you can:
Sign out (tap your Apple ID)
Allow invites
Let nearby players find you
Edit your Game Center profile (tap your nickname)
Get friend recommendations from Contacts or Facebook
Specify which notifications you want for Game Center. Go to Settings > Notifications > Game Center. If Game Center doesn’t appear, turn on Notifications.
Change restrictions for Game Center. Go to Settings > General > Restrictions.
Cheers,
- Judy -
How can i know if the face time is working on the iPad before i buy it?
How can i know if the face time is working on the iPad before i buy it?
I am plan to buy new ipad2 and i want to check before i buy it, if there is facetime or not?
As far as i know if it is from KSA there is no face time in, but if it from US there is facetime in?
And i have the serial number. -
How do I create both endnotes and footnotes in same doc in Pages? I have iWork 2008. I understand how to create one or the other, but not both.
You have to select one or the other.
Try making two documents and see if you can merge the .pdfs, but their will be problems with page flow, making the pages shift. Can't see it working really.
Pages is not the only solution out there or the best for most jobs (let alone the safest). Try Word for Mac, LibreOffice (free) or any App that has the features you need.
Peter -
How is concurrency handled by the UI components?
This is NOT a question about handling concurrency in the backing bean. Specifically, I am NOT looking for the answer. "request scoped beans do not have to worry about concurrency".
This is a somewhat academic question about how concurrency is handled by the UI components. If JSF receives two requests involving the same view, the restore view process will return the same view for each request. And here by "same view" I mean the same Java object instances. During the apply request values phase won't each request stomp over each other, since they are updating values on the same Java objects?
This obviously does not happen, so I am wondering what I am getting wrong.
-Jacob
Edited by: jacobgmathew on May 26, 2009 11:40 AMI'll respond in terms of JSF 1.2.
For a GET request, the view will be constructed from executing the view template.
For a post-back, the view will be resconstructed based on saved tree structure information.
This means the components are instantiated via the new operator and then the saved state
is applied to the new instance. -
ADF FACES: how to prevent navigation in the UPDATE_MODEL_VALUES phase
I have some complex cross-field correlations to verify on data submitted. I can't do this in the PROCESS_VALIDATIONS phase, since all the model values are in consistent at this point depending on which component is being processed.
So, I'm trying to perform the business logic tests in the UPDATE_MODEL_VALUES phase. This is all working well except for one thing. How do I prevent the view from changing in the case that cross-field issues are detected?
The scenario is that the user has filled out the form and activates some control that would normally navigate the user away from the current view. I detect an inconsistency and need to place a message in the context and prevent the navigation. This is easy if I do this during the PROCESS_VALIDATIONS phase by just throwing a ValidatorException.
I just can't figure out how to accomplish this in the UPDATE_MODEL_VALUES phase.
Any suggestions?I spoke too soon. Maybe my case is more subtle. I have a page with a af:showOneTab. In one of the showDetailItems, I have this validation occuring. Thus, when the user clicks on one of the tabs, and the current page has a validation error on it, I want them to stay on the current page.
Calling renderResponse doesn't seem to prevent the change (although a true ValidatorException thrown during the validation phase does).
So, I'm still stuck with how to prevent the change in tabs when I detect the error in the UPDATE_MODEL_VALUES phase.
Thanks. -
Icloud - how to delete one of the iphones tied to the account
Hello
On my icloud account my iphone 4 and my boyfriends iphone 4 are both tied to one account. We both just updated our software to the iOS 6.0 and now all of our contacts have merged. How can we unmerge them or how can I delete his phone from my account?
thanksWhich app? If it's one of the pre-installed Apple apps, just leave it unless you have a good reason. These boards are riddled with questions from people who have deleted pre-installed apps only to find later that either it was something important that they needed or that they changed their minds and wanted it back again. Leaving these apps will not impact the performance of your machine.
If that's not it, take a look here:
https://discussions.apple.com/message/15350501#15350501 -
How to hide one of the two Multi level categorization blocks in SRVR?
Hi
I am trying to hide one of the multilevel categorization blocks in SRVR(SERVICE request)
Can it be done by configuration in BSP workbench. If yes then how? I went to the view but I am not able to remove the block
Please help.
Thanks
TarangGo to BSP_WD_CMPWB and create a new view by copying existing and remove the 2nd category block.
This can also be done directly from webui.
Regards
Surya -
How to set one of the elements in contributable mode to non editable in oracle site studio
Hi,
I am using oracle site studio and webcenter content.In contributable mode for a cdf I have a static element and 4 columns in that(4 elements). I want to enter data in all 4 columns and after that I want to make one of the column as non editable. Is it possible? If yes, kindly let know how this can be achieved.
Thanks in advanceIf you don't need to actually display the non-editable region in the editor, then you could do the following:
Add all 4 elements to the region definition.
Add your content/data.
Remove the non-editable element from the region definition.
The content/data will still be stored in the CDF and should be retrievable.
Jonathan
https://jonathanhult.com -
10133 ADF LOV: how to get rid of the blank item on top of the list
Hi,
I have a fixed list LOV. Because I do not want the user to pick a null value from the list, I picked "selection required" when I created the LOV. when the page has the LOV first loaded, the dropdownlist still has the blank item on the top. If I pick a value and execute, the page is reloaded. Now I access the LOV, it does not show the blank item anymore. How can I get rid of the blank item when the LOV is loaded the first time? Thanks.
Regards,
AnnieI Annie, a workaround is to based your LOV values on a read-only VO or a POJO. Even if your intentions is to avoid to go all the way to the back end.
Or you can add a "Select One" in the List so your users are aware they need to choose something.
I tested your case in 10g and 11g and both present the same behavior. I'm opening a bug for 11g. the weird part is that in 10g if you select the include blank item option, actually it adds a double blank space on first load.
I will update the forum when I get news about it.
Juan C.
Message was edited by:
JCRuiz -
How to relocate one of the control files on another computer?
Hi ,
I have created a database(10g Release 2) on a windows xp laptop. The control_files parameter is:
C:\ORACLE\PRODUCT\10.2.0\ORADATA\DB10G\CONTROL01.CTL, C:\ORACLE\PRODUCT\10.2.0\ORADATA\DB10G\CONTROL02.CTL, C:\ORACLE\PRODUCT\10.2.0\ORADATA\DB10G\CONTROL03.CTL *, and I use spfile* . Now, I would want to move the third control file(C:\ORACLE\PRODUCT\10.2.0\ORADATA\DB10G\CONTROL03.CTL) to a disk on another computer ( which is a desktop running Windows XP SP2).The laptop and the desktop are on the same network, the laptop IP address is 192.168.0.1, and the desktop IP address is 192.168.0.2.On the desktop, I have a directory named CONTROL_FILES_DIR on a disk partition named C,*and using Windows appropriate GUI, I have shared this directory CONTROL_FILES_DIR , and given to all users the read and write rights on this CONTROL_FILES_DIR directory*. Then, I take the following steps:
a- In sql*plus(on the laptop), I execute
alter system set control_files='C:\ORACLE\PRODUCT\10.2.0\ORADATA\DB10G\CONTROL01.CTL', 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\DB10G\CONTROL02.CTL', '\\192.168.0.2\C:\CONTROL_FILES_DIR\CONTROL03.CTL' SCOPE=SPFILEb- Then , in sql*plus(on the laptop), I execute
shutdown immediate;c- Now, I copy CONTROL03.CTL file (on the laptop) and paste it in the directory C:\CONTROL_FILES_DIR on the desktop.
d-Now, in sql*plus(on the laptop), I execute
connect /as sysdba e-And,after the step d, I execute(in sql*plus, on the laptop):
startupAnd sql*plus displays the message : ORA-00205 error in identifying control file; check alert log .
I read the alert log file , and it was written:
ORA-00202: control file: '\\192.168.0.2\C:\CONTROL_FILES_DIR\CONTROL03.CTL'
ORA-27041: unable to open file
OSD-04002: Unable to open file
O/S-Error: (OS 5) Access is denied.Please, how can I solve this problem?
Thanks.user639304 wrote:
Hi ,
I have created a database(10g Release 2) on a windows xp laptop. The control_files parameter is:
C:\ORACLE\PRODUCT\10.2.0\ORADATA\DB10G\CONTROL01.CTL, C:\ORACLE\PRODUCT\10.2.0\ORADATA\DB10G\CONTROL02.CTL, C:\ORACLE\PRODUCT\10.2.0\ORADATA\DB10G\CONTROL03.CTL *, and I use spfile* . Now, I would want to move the third control file(C:\ORACLE\PRODUCT\10.2.0\ORADATA\DB10G\CONTROL03.CTL) to a disk on another computer ( which is a desktop running Windows XP SP2).The laptop and the desktop are on the same network, the laptop IP address is 192.168.0.1, and the desktop IP address is 192.168.0.2.On the desktop, I have a directory named CONTROL_FILES_DIR on a disk partition named C,*and using Windows appropriate GUI, I have shared this directory CONTROL_FILES_DIR , and given to all users the read and write rights on this CONTROL_FILES_DIR directory*. Then, I take the following steps:
a- In sql*plus(on the laptop), I execute
alter system set control_files='C:\ORACLE\PRODUCT\10.2.0\ORADATA\DB10G\CONTROL01.CTL', 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\DB10G\CONTROL02.CTL', '\\192.168.0.2\C:\CONTROL_FILES_DIR\CONTROL03.CTL' SCOPE=SPFILEb- Then , in sql*plus(on the laptop), I execute
shutdown immediate;c- Now, I copy CONTROL03.CTL file (on the laptop) and paste it in the directory C:\CONTROL_FILES_DIR on the desktop.
d-Now, in sql*plus(on the laptop), I execute
connect /as sysdba e-And,after the step d, I execute(in sql*plus, on the laptop):
startupAnd sql*plus displays the message : ORA-00205 error in identifying control file; check alert log .
I read the alert log file , and it was written:
ORA-00202: control file: '\\192.168.0.2\C:\CONTROL_FILES_DIR\CONTROL03.CTL'
ORA-27041: unable to open file
OSD-04002: Unable to open file
O/S-Error: (OS 5) Access is denied.Please, how can I solve this problem?
Thanks.Even if you get this to work one time, the very operation of your db is dependent on the availability of that second computer. Not a wise design decision. What problem are you trying to solve with this technique? -
How to make one OR the other parameter required? (but not both)
Hi all,
I've got a report showing expenditures by budget code. There's a multi value parameter allowing the user to choose any codes they want, but this can be tedious, since there's a couple hundred of them.
I would like to offer as an alternative a couple of "pre-packaged budget code groups" on another parameter. How can I set it up so that the user must choose EITHER something out of the full multi value set, OR one of the 2 or 3 pre-packaged options?
thanks for any tips,
sffHi sherifffruitfly2,
In Reporting Services, we can make a parameter optional by setting default values for the parameter. Based on your scenario, you can set one parameter to have no default values and set default values for the other parameter.
As Josh posted, another approach is to add "All" value to each parameter and set "All" as the default value for each parameter. Then, we can set the visibility of the report to hide when both of the parameter contains "All". That way, the user can get the
report to run by changing the values of only one parameter. For more information about add a "All" value to a parameter, please see the following thread with a similar topic:
http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/7773eb1f-445e-461c-a315-e2e3d1161ae7/
Hope this helps.
Regards,
Mike Yin
TechNet Subscriber Support
If you are TechNet Subscription user and have any feedback on our support quality, please send your feedback
here.
Mike Yin
TechNet Community Support -
How to block one of the purchasing document types for certain period
My client asked me to block the one of the purchase order documents for certain period.In what way i can do it? and also it shouldn't be displayed in the purchase documents list when we do me21n?
Advanced thanks,
SateeshHi Sateesh,
Here u cann't block the Document type,
U can do this,only the way to delete that document type for certain peroid.
Thanks & Regards
Suresh
> My client asked me to block the one of the purchase
> order documents for certain period.In what way i can
> do it? and also it shouldn't be displayed in the
> purchase documents list when we do me21n?
>
> Advanced thanks,
> Sateesh -
How to make one of the columns in my tabular an text item with popup lov
Hello,
I want to manually make one of the columns say for the deptno in my tabular form as on text item popup lov using apex_item package
and whenever user clicks on the text item popup lov, it should open up an dept table report and from which he/she needs to select
the deptno and this deptno should be returned into the text item popup lov column.
like for example: say if i have an emp table tabular form with all the columns and deptno column as an popup lov and when user clicks on this column
it should open up an new sql report(similar to popup lov window), the select statement for this would be
select deptno,dname,loc from dept order by 1;
And from this popup lov report whenever an user selects a particular deptno, the same deptno should be returned to my text item popup column in emp tabular form.
something like this
select
"EMPNO",
"EMPNO" EMPNO_DISPLAY,
"ENAME",
"JOB",
"MGR",
"HIREDATE",
"SAL",
"COMM",
APEX_ITEM.TEXT(3,deptno,20,50,'readonly=true') || '<img height="16" align="middle" width="16" style="vertical-align: middle;" alt="Popup Lov" src="/i/lov_16x16.gif"/>' deptno
from "#OWNER#"."EMP"
like i made my column as an text item lov and now I want to write an onclick event for the text item lov so that an popup window is displayed which is a sql report of the table dept (select deptno,dname,loc from dept order by 1;) and in this report i want to make deptno as an link so that when ever an user clicks on it
-- this value should be returned to my text item popup lov column deptno in the emp tabular form.
can anyone help me out with this issue.
thanks,Hi,
Refer to the link for the detailed information on ALV Grid.
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907
Hope it helps.
Regards,
Rajesh Kumar
Edited by: Rajesh Kumar on May 25, 2009 9:13 AM -
How do I permanently REMOVE the Face Recognition program in Windows 8.1?
I want to Uninstall, permanently REMOVE, the Face Recognition program from Windows 8.1. When I select this program from the list of all programs displayed, I am not given an "uninstall" option, only the option to "change", which
then begins to install. I was able to uninstall once before, but somehow the program was placed back onto my computer and now the "uninstall" option is no longer available. Thanks!Hello DePaix,
What is your current situation?
Have you tried the solution as MVP Cyber_Defend_Team mentioned?
Do this program preinstalled? If yes, we need to contact the manufacturer to receive better support.
If my understanding is right, you uninstalled it once, but the program was back and only the option to ‘change’.
Could you please provide us a screenshot to avoid misunderstanding if you willing to?
Can you run the program? If the program runs in the startup, we could use the tool System Configuration (msconfig) to disable apps or services that normally run at startup.
For more information, please take a look at the following article about using system configuration.
http://windows.microsoft.com/en-hk/windows/using-system-configuration#1TC=windows-8
Best regards,
Fangzhou CHEN
Fangzhou CHEN
TechNet Community Support
Maybe you are looking for
-
Submitting Job with parameterised procedure using DBMS_JOB
Hi, I need to submit a job which makes a call to a procedure with parameters as shown below: PROCDURE SUB_JOB ( P_PAR1 VARCHAR2, P_PAR2 VARCHAR2) IS L_JOBID INTEGER; BEGIN DBMS_JOB.SUBMIT ( L_JOBID, ' BEGIN PROC1 ('''||P_PAR1||''','''||P_PAR2||''');
-
System Spell Checker 'stuck' on American English
Hi, Running OS X 10.8.3. I have my language settings set to Australian English. How ever, when typing in system applications such as Mail, or Notes, the OS X System Spell checker is spell checking based on American English. For example; when typing a
-
im trying to download songs from itunes to my pc, and then download onto my kindle fire and it keeps on giving me a error msg when trying to download songs on itunes?
-
Hello, I am trying to delete the line item is PO against which i have done GR,IR & 922-Rejection & rejection invoice. While delecting system shows as error as " difference b/w GR & IR qty" Plz suggest.
-
To check whether all chars meet ISO-8859-1 char set
HI, I am Getting the Description of the Material number in a Report. I Need to check whether each char by char of Material description belongs to ISO-8859-1 char set. How to check that? Regards, Raja Senthil N