Hide and show button in oracle MAF - jdeveloper

How to hide and show the commandButton in oracle mobile Application Framework using AMX?
Is this possible to do it in AMX itself without using javascript/jQuery.

No need for JS.
Example with using the inlineStyle:
<amx:commandButton id="c1" text="#{row.name}" inlineStyle="#{row.salary >4000 ? 'display: none;' : 'display: inline;'}">
You can also use the rendered attribute as described in the documentation.

Related

Integrate CKEditor in ADF12c Popup

Am trying to integrate CKEditor in a ADF popup which is in a page fragment using JSP Tag Libraries.
Am using JDeveloper 12.13 version.
Here is the code am using in a popup which is in a subform.
<cke:editor basePath="/PLS/js/" editor="editor1" value="Type Here"/>
Am getting below error
java.lang.IllegalStateException: Could not find component to stream
at oracle.adfinternal.view.faces.streaming.StreamingDataManager.submit(StreamingDataManager.java:519)
at oracle.adfinternal.view.faces.renderkit.rich.DocumentRenderer._encodeStreamingResponse(DocumentRenderer.java:4047)
Getting this exception with different Content Delivery modes(immediate, lazy) for popup. I have also tried declared ADF RichText Editor and replacing it with CKEDitor replace tag.
Does anyone has idea why CKEDitor is not working in ADF Popup.
Does your var rt1 and rt2 return any values or are they undefined? To search for components in ADF page , you should use javascript as defined in links here and here .
You can also refer the oracle documentation here for using ADF client side Architecture.
Instead of a popup i have implemented CKEditor in a separate task flow and used that as a region in my main page by invoking that task flow as inline-popup dialog. This resolved my issue

ASP .NET MVC3 Razor Popup View

I am new to web development..
i have created views using Entity Framework in MVC3 Razor..
What i have done yet is,
i 1st created model(Clients) and DbContext(ClientDbContext) Classes.
then, i add controller with scaffolfind options
Template: Controller with read/Write actions and View, Using Entity Framework
Model Class: Clients
Data Context Class : ClientDbContext
Views : Razor(CSHTML)
It Creates the controller class and index, Detail, Delete, Delete Views...
After that i modified the index page for search and pagination...
All are working good...
in the index page i have create, edit, delete, detail links...
When i click the links browser loads to that page and working good...
But i need to popup those views when i click the links in the index page...
i don't know how to do this... i studied many articles but i am confused...
Please help me to solve this with an efficient manner...
Thanks in advance...
Creating a model pop-up within a page isn't something that can be done directly with ASP.NET MVC. You could do it yourself using javascript & css but I would strongly recommend using a JS UI framework to do this. jQuery UI has a pop-up modal box, except they call it a dialog.
The docs for jQuery UI's dialog can be found here. Have a look through the examples to see the fine details of how to set it up. But this is the basic flow of what you need to do:
Download the jQuery UI files needed and include them on your page (CSS/JS files)
Take the html from your create/update/delete views and put it on your index page, wrap them in a div with an appropriate id
When the page loads use jquery ui to target your div's you want to be a popup
Things such as the link you want to make a dialog popup is set by passing options to the dialog initialize method, again the exact options and examples can be found on the docs page.
Refer this : http://jqueryui.com/dialog/ to create a jQuery Dialog box.
<script>
$(function() {
$( "#dialog" ).dialog();
});
</script>
<div id="dialog">
#using(Html.BeginForm()){
#Html.EditorForModel()
<input type='submit' value ='Submit'/>
}
</div>

jQuery Mobile How to simulate data-rel="dialog"

Is there a way to simulate the data-rel="dialog" attribute to show a page as a dialog page?
I can't use this one because I use the button for the LogIn/LogOut model, and this one doesn't work if I don't insert the data-ajax="false" attribute.
But using this I cannot use the ajax-based data-rel attribute.
So I need a trick to create a dialog page without using the dialog attribute on the anchor link.
Thanks
Hopefully in the next iteration of jQM ( 1.2 ) you could use the Popup, You can currently test this out in the pre-release builds:
http://jquerymobile.com/test/docs/pages/popup/index.html
or a form login

Change URL of Facebook like button with Ajax

I am wondering whether it is possible to change the action of a Facebook like button on an Ajax event.
What I am trying to do:
I display an article when the page was loaded. At the end of the article I have a button which loads the next article via Ajax. Additional I have the following Facebook like button:
<fb:like href="http://www.myurl.com" layout="standard" show-faces="true" action="like" id="fblike" />
When I load the next article I put the new URL of the article into the "href"-attribute via Javascript (which works fine), but when I click on the like button the initial article url will be pushed to facebook, and not the new one.
Any ideas?
Thanks a lot.
You don't actually need the iframe version as it is more limited and not as good for performance. All you need to do is use this snippet to re-render the button in the DOM; without a page refresh, the element does not "refresh" otherwise:
FB.XFBML.parse();
See docs here: http://developers.facebook.com/docs/reference/javascript/
You could try the iFrame version instead the XFBML version:
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fexample.com%2Fpage%2Fto%2Flike&layout=standard&show_faces=true&width=450&action=like&colorscheme=light&height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>
See here for more infos:
http://developers.facebook.com/docs/reference/plugins/like

iGoogle style dashboard using jquery

Is there any jquery plugin for implementing iGoogle style dashboard? So basically drag n drop style etc.
Thanks
I recently found this:
http://www.webappers.com/2008/11/19/how-to-create-igoogle-interface-with-jquery/
Hope that helps...
Take a look at the jQuery UI portlet demo for Sortable.
If you are looking for a similar dashboard framework, please check out my implementation of igoogle style dashboard called 'sDashboard' : http://modeln.github.com/sDashboard/
This plugin, helps in converting an array of widget definitions into a dashboard, were each object in the array gets rendered as a dashboard widget.
Its has some neat features to render table and charting widgets and is highly configurable. The documentation page includes a link to a demo application & example usages to render different styled widgets.
Check out my implementation of an iGoogle style Dashboard using jQuery.

Resources