Please Note: Here we are using a webkit property. That means this feature will work only in google chrome.
Google chrome supports it's own voice search property. We can add this property to our application by adding "x-webkit-speech" in our input fields. Here we can create a physical render and implement this feature.
<!-------------------CODE Begins----------------------------!>
if( typeof( SiebelAppFacade.GoogleVoicePR ) === "undefined" ){
SiebelJS.Namespace( "SiebelAppFacade.GoogleVoicePR" );
SiebelApp.S_App.RegisterConstructorAgainstKey( "GoogleVoicePRenderer", "SiebelAppFacade.GoogleVoicePR" );
SiebelAppFacade.GoogleVoicePR = ( function(){
function GoogleVoicePR( pm ){
SiebelAppFacade.GoogleVoicePR.superclass.constructor.call( this, pm );
var controls = this.GetPM().Get( "GetControls" );
var cntrl = controls[ "Last Name" ];
var lastNameCntrl = cntrl.GetInputName();
$('input[name="'+lastNameCntrl+'"]').attr("x-webkit-speech","x-webkit-speech");
}
SiebelJS.Extend( GoogleVoicePR, SiebelAppFacade.PhysicalRenderer );
return GoogleVoicePR;
}());
}
<!-------------------Code Ends------------------------------!>
Google chrome supports it's own voice search property. We can add this property to our application by adding "x-webkit-speech" in our input fields. Here we can create a physical render and implement this feature.
<!-------------------CODE Begins----------------------------!>
if( typeof( SiebelAppFacade.GoogleVoicePR ) === "undefined" ){
SiebelJS.Namespace( "SiebelAppFacade.GoogleVoicePR" );
SiebelApp.S_App.RegisterConstructorAgainstKey( "GoogleVoicePRenderer", "SiebelAppFacade.GoogleVoicePR" );
SiebelAppFacade.GoogleVoicePR = ( function(){
function GoogleVoicePR( pm ){
SiebelAppFacade.GoogleVoicePR.superclass.constructor.call( this, pm );
var controls = this.GetPM().Get( "GetControls" );
var cntrl = controls[ "Last Name" ];
var lastNameCntrl = cntrl.GetInputName();
$('input[name="'+lastNameCntrl+'"]').attr("x-webkit-speech","x-webkit-speech");
}
SiebelJS.Extend( GoogleVoicePR, SiebelAppFacade.PhysicalRenderer );
return GoogleVoicePR;
}());
}
<!-------------------Code Ends------------------------------!>
by placing this code in pr file its not working
ReplyDeleteFixes
ReplyDelete-----
1. Please make sure that your PR is registered in Manifest file, applet user property.
2. Make sure that var cntrl = controls[ "Last Name" ]; "last name" is the name of your control.
3. If your applet contains any browser script(Old) then please run GenB
4. please make sure that you compiled your applet.
We are able to see the Voice image at the field level after using this script. But when we try to speak at the mike after connecting to the System. It is giving the Error saying "No voice heard".
DeleteThis comment has been removed by the author.
DeleteIt is working in my system. Please make sure that
Delete1. Mike is working
2. Background noise is less
3. Chrome may get corrupted. If you can see mike symbol in your text field, this feature is enabled in your browser.
Try this in another machine with another mike
Hye Thanks Prashanth S. We are able to see this change. :)
DeleteHi Prasanth, good post... I tryed in my Siebel, but don't work. When I enter in applet with user property "GoogleVoicePRenderer" load only the field's but don't load data. The
Deleteapplet don't work, the fields don't show icon to MVG.
can you help me?
where I worng?
Don't need PM file?
Tks
Hi Alexandre,
DeleteDid you try this example with a form applet? if not try with a form applet.
Hi Charles,
ReplyDeleteI think you know the limitations of old siebel UI. High interactivity needs IE and we need to set up IE for proper rendering of UI. So the customer/End user has to use windows machine with IE. Open UI comes with a solution for this. This is using Open Standards like Ajax (Read this: 1) http://siebelopenui.blogspot.in/2012/10/what-is-ajax-and-why-it-is-in-siebel.html 2) http://siebelopenui.blogspot.in/2012/09/siebel-open-ui.html)
this also will help you
http://siebelopenui.blogspot.in/2012/09/siebel-open-ui.html
It is not just CSS change. But for customizing siebel default screens, you can even edit css.
Physical render, Physical Model allows you to control & Style all input & Its data in siebel.
I am ready to help you, to know more, and i will share some training material & PPTs. Please provide your mail id.
Hi Prashanth,
DeleteCould you please send me training material and PPTs as well
Thanks
Ravi
Hi Ravi,
DeletePlease give me your email
Hi Prasanth,
DeleteIf you have training material, please send it to me as well.
Thanks,
Rajan.
Hi Rajan,
DeletePlease let me know your contact details (Email)
Hi Prasanth,
DeleteCould you send to me as well?
Thanks
Charles
Prasanth
ReplyDeleteI would very much appreciate if you could email me the training material at rjuneja at gmail.com
thanks.
Hi Can we integrate mobile camera device by using javascrip code ?
ReplyDeleteUsually browsers will not allow to access any device or files in Client's machine. If any code attempts that, that will blocked by browser. But there are some possible ways to achieve this. We could invoke & connect printer and scanner from OpenUI. But that is not the feature of OpenUI. we need the tricks of a web developer :)
Deletehello Prasanth..Can you send training material that you were referring to me too.
DeleteThanks,
I dont have ur address
DeleteHi Prasanth,
ReplyDeleteIam New to Siebel open UI I tried the above code,but when i added to one of my applet
then that applet is getting disappearing on UI Side.Could you please look at it
Hi,
DeletePlease make Sure that your version is 8.1.1.9 / 8.1.1.10. If so, make sure that you applied this code for Form Applet.
If your version is 8.1.1.11 /8.2.2.4 - please make necessary changes to the code.