How to translate SelectOneChoice display if it linked to lookup view object
I used ADF faces to build simple registration form for Customers and i want to localize it and its lookups(SelectOneChoice,SelectOneListbox) so i did the following
1- Create table called Customer and has field of Country id
2- Create table called Countries with 3 fields {CountryID,CountryName,CountryNameArabic}
where
CountryName :English Country name
CountryNameArabic : Arabic Countrty Name
3- Create DataControl for the previous description
4- Drag the CustomersView to JSF page
5- Change CustCountryID to selectOneChoice and refer to CountriesView which is my lookup View
I want to change the displayed Country Name according to localization of the browser
if locale is English --> use CountryName Field
if locale is Arabic --> use CountryNameArabic Field
please help
note : if there is another solution please describe it
thanks
first thanks for reply
You can use an expression language to check for the
locale and based on the result change the value
binding that you are using.i already used expression language in pageDef to get the values dependent on the views
<list id="CustomerViewCountryid" IterBinding="CustomerViewIterator"
StaticList="false" ListOperMode="0"
ListIter="CountriesListIterator">
<AttrNames>
<Item Value="Countryid"/>
</AttrNames>
<ListAttrNames>
<Item Value="Countryid"/>
</ListAttrNames>
<ListDisplayAttrNames>
<Item Value="#{(view.locale.locale=='en')?'CountryName':'CountryArabicName'}"/>
</ListDisplayAttrNames>
</list>
and i got
oracle.jbo.NoDefException: JBO-25058: Definition #{view.locale.language=='en'? 'CountryName':'CountryArabicName'} of type Attribute not found in CountriesView
You can also have both the English and Arabic items
on your page and use an expression language in the
rendered property of the list to decide which one to
show.i think this solution is not applicable because i can't bind the same field (CustomerView.CountryID) to 2 different iterators in the pageDef
if so please describe this solution clearly
thanks
Similar Messages
-
Create view link between two view objects (from programmatic data source)
Hi Experts,
Can we create a link between two view objects (they are created from programmatic datasource ; not from either entity or sql query). If yes how to create the link; ( i mean the like attributes?)
I would also like to drag and drop that in my page so that i can see as top master form and the below child table. Assume in my program i will be only have one master object and many child objects.
Any hits or idea pls.
-tEasiest way to do this is to add additional transient attributes to your master view object, and then include those additional transient attributes in the list of source attributes for your view link. This way, you can get BC4J to automatically refer to their values with no additional code on your part.
-
Displaying a Master with two detail view objects
Hi,
I have a situation where I need to relate a Master view object to two Detail view objects. Currently I am doing the lookup manually (using viewcriteria!) but I would much rather have the framework handle this. Does anyone know of a way to A: Link two details to one master and B: Display them on the same page.
I am using Jdeveloper 9.0.3.3 (1205) and currently have a straight BC4J/JSP application with no struts or UIX.
Thank you in advance for any help you can provideIf I understand you correctly. You should just have to create two separate viewLinks. Add the datasource tags for the master and the two views via the viewlinks. Then use a rowKey to get the correct master.
Hope that helps! -
View Links for Programmatic View Objects
Hi All,
I created a read only VO called MyVO based on a sql query.
I created 2 programmatic view objects, MasterView and ChildView.
In a custom method in AMImpl class ,I iterate through this MyVO resultset and get the rows in a Row object.
Based on some attributes values of the Row, I populate both master and child View Objects.
I have created a view link between Master and Child Programmatic View Objects and have exposed them in AM.
Now I run the AM, and run the method exposed in client interface.
Now I click on my master and child programmatic views.
I see that the rows are populated in both of these programmatic VOs.
But when I click on viewlink which I have exposed under master, it doesnt show me any
record for child.
This is my method of AMImpl which is exposed in AM client interface.
public void constructLines(){
ViewObject vo= this.getMyVO1();
ViewObject master=this.getTransientVO1();
ViewObject child=this.getTransientLineVO1();
Row r,masterRow,childRow;
int count=0;
while(vo.hasNext()){
++count;
r=vo.next();
masterRow = master.createRow();
if(r.getAttribute("QuoteHeaderId")!=null)
masterRow.setAttribute("QuoteHeaderId",
r.getAttribute("QuoteHeaderId").toString());
if(r.getAttribute("QuoteLineId")!=null)
masterRow.setAttribute("QuoteLineId",
r.getAttribute("QuoteLineId").toString());
if(r.getAttribute("LineNumber")!=null)
masterRow.setAttribute("LineNumber",
r.getAttribute("LineNumber").toString());
master.insertRow(masterRow);
childRow= child.createRow();
if(r.getAttribute("RefLineId")!=null)
childRow.setAttribute("RefLineId",
r.getAttribute("QuoteLineId").toString());
if(r.getAttribute("QuoteHeaderId")!=null)
childRow.setAttribute("QuoteHeaderId",
r.getAttribute("QuoteHeaderId").toString());
child.insertRow(childRow);
This is stopping me from my development progress.
Any suggestion to solve this will be of great help.
Thanks,
PrabhanjanHi..
have you define relationship correctly between masterVO and childVO.sometime there may be the problem. -
How to change sql expression of SQL-Calculated Attribute of view object ?
Hi
jdev 11.1.1.5
I have a view object with a SQL-Calculated Attribute (sumAnalytic) how can I change sql expression of this attribute in runtime?
for example in application module method??Hi Mr Timo
Thanks for your reply but I do not need dynamic vo because I can not change all of my vo
I only need to change expression of SQL-Calculated Attribute of view object in run time.
For this I set expression in view object something like this 'select 2 from dual' and in run time in my AM method I get the vo query and replace 'select 2 from dual' with something like 'selet sum(amnt) over (partition by 1)' and set new query.
But I think the better solution must exist
Thanks -
View Link w/ Transient View Objects
I'm trying to create 2 view objects that contain only transient attributes and create a view link between them. I have a key defined in the parent and 2 keys in the child. When I create the view link I'm unable to generate the accessor in the source because the boxes are all grey'd out. The destination side works correctly.
Is there any reason this shouldn't be possibly in BC4J? I've been scouring the documentation and so far I haven't found any mention that a view link will not work in this situation.
This is in JDev. 9.0.4.
Thank youA view link builds its corresponding where clause based on the selected attributes. On the source side, the attributes are used as parameters to the query, so transient attributes are fine. Attributes on the dest side get built into a where clause which would not work with transient attributes, so they are disabled.
for example:
select * from blah where (%1 == destVo.attr1) would not work if destVo.attr1 is transient. -
How to display dynamic hyper link in list view webpart using xslt ?
Hello,
I have changed design layout of list using xslt webpart.
However, still I am unable to update the hyperlink value for the same.
I have column named "PageLink" that is having http link value for example "http://google.com"
I require to display that value over the Title Text and hence I have updated code as below.
But its not updating href link as per the requirement !
<xsl:variable name="varPageLink">
<xsl:value-of select="@PageLink" />
</xsl:variable>
<a href="{@varPageLink}" target="_blank" onmouseover="javascript:this.style.cursor='hand';" >
<xsl:value-of select="@Title"></xsl:value-of>
</a>
Can anyone please
Dipti ChhatrapatiHi,
In my case safelinkurl == varPageLink
what I have defined as xsl variable.
However, by specifying the link value in list as relative URL - my code has worked as per the expectation
There was fault in link value as this xslt has not accepted absolute URL !
I hope this finding can help others :) !
Thank you for your time !
Kind Regards,
Dipti Chhatrapati -
Stupid question ? How do I PROPERLY display 16:9 in the canvas/viewer
Working in FCP6. All I want to do is capture 16:9 PAL DVCAM from a Sony DSR 450 (set, unsurprisingly, to 16:9!) I've been all over the manual and drop down menus, think I've got the settings correct, BUT the canvas and viewer show the 16:9 letterboxed in a 4:3 frame and the capture window shows incoming 16:9 video squeezed into 4:3 frame. this can't be right surely. Could someone take me through the right settings?
In Avid (sorry for the bad language) you can simply select 16:9 monitors. I've found the windows/arrange/standard bit and was expecting to see a 16:9/4:3 option but it doesn't exist. Help ... Please.Hi. Thanks for the thoughts. I'v already been on this dialogue box, there isn't a straightforward 16:9 setting. I'm assumng that you aheck the anamrphic 16:9 box select pixel aspect ratio to PAL CCIR601 720x576 and frame size to CCIR 601 PAL (4:3) Can't imagine what the frame size seting CCIR^)! PAL(5:4) is for. I'm aware that there are no more pixels recorded in 16:9 on a native 16:9 chip so setting for PAL 4:3 and ticking the anamorphic 16:9 box should fo it, shouldn't it. If you select one of the (obviously) native 16:9 HD formats you still get a letterbox within the 4:3 shaped viewer/canvas windows. Maybe that's just how it is. Seems strange though.
-
How to set the display ratio of master and detail view
Currently, I use SplitApp that contain the master and detail view. And I would like to show the master view on the left half and detail view on the right half. Is there any proper way to adjust this?
Thank you in advance.You can set the width ratio by adding css. Check this,
http://jsbin.com/dakir/1 -
How to programmatically retrieve the real field name from a view object ?
Dear all,
when I map a business component (a database table) to a view, the fields are automatically converted by JDeveloper, for example, a field named 'user_id' in the oracle table definition, becomes 'userid' in the view.
The question: how can I retrieve the right table column name from within a backing bean ? Please explain also what should I bind and how; should I use an iterator ?
Another more: since we can change the label of a field on a view, how can then I get the mapping between the column name on the view and the column name on the table in the database ?
Thanks in advance,
Sergio.Hi Timo,
many thanks for your answer.
The rest of my question: you know we can drop a view from the DataControls onto a ADF page, with each field of the table having a label.
That label is initially set like the internal table field name, so for instance, if user_id is the real table field name, userid will be the (by JDeveloper) internal renamed table field name, and the label would be userid too.
If I then change the label text to, for example, "myUserid", the question is: how can I know which real table field does "myUserid" point to ?
In other words, when my form is submitted, I want to know which field name has been changed and prepare an update sql in a bean.
For this purpose I bind each view field to a validator function in the bean, and collect al the pairs "label_name + submitted value" in an hash table.
Now inorder to build up that update query, I need the mapping between the label_name ("myUserid") and the real table field name ("user_id"). The question: how to map the label to the real table field name ?
By the way, I'm using JDeveloper 11g rel. 2.
Regards,
Sergio. -
Hi,
Can anyone tell me how to influence which attributes are used to create the display text for a selectOneChoice element?
I have a dropdown box to choose the gender of a person (the forum censors the word Sex?!). My page source looks like:
<af:selectOneChoice value="#{bindings.Gender.inputValue}"
label="#{bindings.Gender.label}"
required="#{bindings.Gender.hints.mandatory}"
shortDesc="#{bindings.Gender.hints.tooltip}"
id="soc1">
<f:selectItems value="#{bindings.Gender.items}" id="si1"/>
</af:selectOneChoice>with page binding:
<list IterBinding="MyIterator" StaticList="false" Uses="LOV_Gender" id="Gender" DTSupportsMRU="true"/>At present, because I have two attributes on the LOV, i get labels like:
M Male
F Female
When I actually just want to show one of these (not really bothered which).
I've tried both of the methods described here:
http://java2go.blogspot.com/2007/08/mastering-adf-faces-component.html
But the first has no effect (adding AttrNames child element in binding and specifying only one of the attributes) and the second doesn't seem to be possible any more (af:forEach tag is not allowed as a child of selectOneChoice).
I've tried the UI Hints on the GengerLOV object but they also seem to have no effect. What's the recommended way to do this?
CheersHi,
It should work fine, if you have selected only one attribute in UI hints for GenderLOV. Please re-check if you have multiple attributes selected or only one attribute selected.
Also, In the source view of the view object, check the ListBinding and its display attributes to make sure the view object source is updated correctly.
ListBinding for LOV_Gender should be something like:
<ListBinding
Name="LOV_Gender" .. >
<AttrArray Name="ListDisplayAttrNames">
<Item Value="Gender"/> <!-- make sure only one item is available-->
</AttrArray>
</ListBinding>
Sireesha -
Alright, the question I have has to deal with how to link an app to a website to download files. How, or is it even possible to link individual picker view selections to download an individual file from a website or other location such as dropbox using xcode. Sorry if this is the wrong place to post this, but if anyone can help or can send a link to a place that can, I would greatly appreciate it!
I am not getting anywhere with deploying my application or
applet.
I have set up my bc4j project. It contains all my VO info,
links, application module. (proj a)
I then have another project with DbInfo in it(has all my rowset
info), Multiple Frames, and my Applet.java file.
Actually I have an Applet.java file and a Application.java file
because I was seeing if both/either worked. Anyway they seem the
same, except for that extra window that comes up when you run the
applet.
I follow the steps in the oracle directions (from earlier post).
And all seems ok. But at ---->
[*] Select the subdirectory under myhtml where your applet's HTML
file
is located, and enter the directory path of the 'staging'
directory you
created in step 3 above, if different from the default.</li>
[*]Select the HTML files that JDeveloper created to run your
applet.</li>
[*]Select all of the Java source files in your project that make
up the
applet.</li>
I have no HTML file associated with my applet, at least that I
know of.
So do I need to create one, or should it of been done
automatically.
Also, I trying to figure out what will be the best way to deploy
my project. Applet or stand alone application is what my first
choices have been so far. I have read that there is some issues
with applets being served from a different server than the
database. So a stand alone application was my front runner, but
I haven't gotten either way to work yet. -
How to populate the view object programetically
Hi all,
Is there any way to populate the records present in my backing bean. In my beacking Bean there is an array list how can i assign the array list values to the View Object.
Thanks in Advance.,
Mohan Krishna m.,It's something like this that are you finding ?
populateViewObject(ViewObject vo, ArrayList<MyBean> arrayBean){
Ror myRow = null;
for(MyBean my : arrayBean){
myRow = vo.createRow();
myRow.setProperty("<PropertyName>", my.getPropertyName())
//Another Properties ...
vo.insertRow(myRow);
} -
How to Create an Input Form using a Transient View Object?
I would like to use a Transient View Object to store data from input forms across a multiple-page enrollment process.
My question is how to I create the input form using the Transient View Object on the .jspx page? Do I drag/drop an ADF creation form onto the page? Or, use a regular ADF form? Do I need to create the initial row progammatically?
Just looking for some general directions or set of instructions? I've looked at the SRDemo example (Globals Transient View Object), but I'm not sure how they created the page at design time?
thanksWell following the SRDemo example, this seems to work:
1. Create Transient View Object
2. Add to Application Module as a Data control
3. Add to .jspx page as an ADF Form (not as an ADF Create Form)
4. Add following code to Application Module containting Transient VO instance:
protected void prepareSession(Session session) {
super.prepareSession(session);
insertTransientViewObjRows();
private void insertTransientViewObjRows() {
ViewObject transientvo = getViewObj1();
transientvo.clearCache();
transientvo.insertRow(transientvo.createRow());
} -
How to build a full dynamic WHERE expression in ADFBC Faces View Object ?
Dear Steve
>
I need an example about how to build a full dynamic WHERE expression in
ADFBC View Object
In UIX I known to do that, but i don't kwown how to do in ADFBC Faces.
please help me to see an example.
thanks
Juan CarlosYou write an AM level method to set the where clause and you expose it as a client method. (just like you did before)
Then you can drag this method onto a page as a button and then pressing on this button will execute the method.
If you want this to be done automatically without pressing a button - you go to the pagedef.xml file for your page and add a methodInvocation binding to that AM method, and then add a method executable to the executables section calling this method.
Maybe you are looking for
-
Recently I bought my macbook with retina display and when I plugged it into the television with using the HDMi cord it worked perfectly fine with the image on the television. But now I when I plug it in to the television it comes up with a black scre
-
How can I 'login' as a different user via ARD?
It has been too many years and I cannot remember much of anything anymore... My main computer is running the ARD admin app. I have a 'server' that has the client software installed and setup to auto login to my admin account on the 'server'. I can ea
-
Any Way to Get Tapering, Diagonal Sloping Text Using FCE Alone?
The winning film at our club competition on Thursday had an interesting final credit shot. The background was a three quarter view of a Roman Temple with a flat "gutter" below the roof gradually converging due to perspective. One line of credits move
-
'PERSON is not a node of logical database PNP'
Hi All, We are upgrading from 4.6 to ECC6.00.Previously we used the include RPCIPE0D with PNP database in one of the programs and had no errors.Now in ECC6.0,there is a huge change in the code of RPCIPE0D when compared to 4.6C.
-
Accessing a file in a standby ASA5510
Hi all, i have a file, a .txt of a backup configuration i need to access inside the standby ASA... Is there anyway that i can accesse the file, besides doing the failover on the active so that the passive becomes active? Thank you