dialog

How to validate a field using cq.HTTP.post method In adobe cq5?

微笑、不失礼 提交于 2019-12-20 05:39:19
问题 I am trying to validate a field by sending field value to a servlet and in response i'm getting true or false i.e whether this field is valid or not . here is my dialog file <bodytext jcr:primaryType="cq:Widget" fieldDescription="Type Text Here" fieldLabel="Body Text" name="./bodytext" validator= "function(value) { var dialog = this.findParentByType('dialog'); var postParams = {}; postParams['value'] = value; CQ.HTTP.post('/bin/feeds/validation.json', function(options, success, response)

How to create a dialog box in a non-UI thread in a different class?

孤人 提交于 2019-12-20 05:38:20
问题 I'm developing a very simple game in android(that runs in a non-UI thread), I want to make that, when the game is over, it shows a custom dialog box with the score, but the class isn't in the MainActivity class. I can't figure out how to create the dialog in the thread whitout getting any error. 回答1: There are so many ways to do that. One way is to pass your context to the class constructor of the game to be able to access the UI through it. public class MyGame { private Context context;

JQuery UI库 - Dialog

时光总嘲笑我的痴心妄想 提交于 2019-12-20 04:52:50
在网站中我们经常会做一些好看的Popup Dialog,我们前面曾经讲过用JQuery的Importo插件 来做自定义的AlertBox。 其实,我们可以利用JQuery官方提供的UI库来做。 而且,JQuery UI库效果更好,更成熟。 今天,我们就来讲一下怎么利用JQuery UI自身的UI库来做自定义的Dialog。 首先,我们需要下载到JQuery UI自身的javascript和css还有图片文件夹,把它们 放在特定的位置,我们好引用。 jquery-ui-1.7.2.custom.min.js jquery-ui-1.7.2.custom.css 完整代码如下: <% @ Page Language = " C# " AutoEventWireup = " true " CodeBehind = " JqueryUIdialog.aspx.cs " Inherits = " BlogNet.JQueryDemo.JqueryUIdialog " %> <! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" > < html xmlns ="http://www.w3.org/1999

Android - java.lang.IllegalArgumentException Erron when creating Dialog on 2.1 and low android

跟風遠走 提交于 2019-12-20 03:56:07
问题 I'm getting the below error message from phones that are SDK version < 8. I just released this app on the android market and prior to release my test phones were a HTC Thunderbolt and the Droid X. Neither had this problem at all. I'm getting this error report through Flurry. I'm not able to test this directly because I don't have a phone with SDK < 8 and for some reason I can't get my emulator to start a lower version than the default SDK set for an app. java.lang.IllegalArgumentException,

Create prompt input dialog with dropdown box in javascript?

纵饮孤独 提交于 2019-12-20 03:18:08
问题 Does anyone know how can I create a prompt input dialog with dropdown box in javascript? Example: 回答1: I don't think this is possible, you're probably going to have to use a modal box of some sort. Check out jQuery UI's modal box at http://jqueryui.com/demos/dialog/ 回答2: Ya, you're probably going to have to settle for a modal... although you could style it to look pretty much the same. Although it would be limited to being within the parent window. But if you're ok with that, use a modal

Android - FEATURE_NO_TITLE not working

放肆的年华 提交于 2019-12-20 03:18:00
问题 I am trying to display my about us page via layout, so I don't need any title bar. I tried: Dialog d = new Dialog(this); d.setContentView(R.layout.about_us); d.setCanceledOnTouchOutside(true); d.requestWindowFeature(android.view.Window.FEATURE_NO_TITLE); d.show(); but when I click on the menu item, it force closes. when I comment the third line of the code above, it shows my layout with title bar, which I don't need. P.S.: my activity extends ActionBarActivity, is this the reason? If yes then

Facebook Feed Dialog returns a unhandled JavaScript including post_id that crashes iOS app

懵懂的女人 提交于 2019-12-20 03:12:18
问题 I try to use Facebook's Feed Dialog. According to the examples on the Facebook Developer's web pages I coded two classes MyAppModelClass and MyViewCntrl , see below. Compilation runs without errors or warnings! And the iOS app hangs only the first time it is ran. When I call [MyViewCntrl aMethod] the first time - The user has to login with eMail and password - After login posting to the users wall can be edited - After clicking "share" button on the feed dialog I get a grey view displayed and

Facebook Feed Dialog returns a unhandled JavaScript including post_id that crashes iOS app

元气小坏坏 提交于 2019-12-20 03:12:10
问题 I try to use Facebook's Feed Dialog. According to the examples on the Facebook Developer's web pages I coded two classes MyAppModelClass and MyViewCntrl , see below. Compilation runs without errors or warnings! And the iOS app hangs only the first time it is ran. When I call [MyViewCntrl aMethod] the first time - The user has to login with eMail and password - After login posting to the users wall can be edited - After clicking "share" button on the feed dialog I get a grey view displayed and

Webview crashes on select box or any Dialog

筅森魡賤 提交于 2019-12-20 02:44:09
问题 I have an application where clicking on an item in a list shows webview with javascript injected.I need to save the webview object so that when the user presses the same item again the existing webview is shown instead of reloading it and injecting the javascript again.I am able to save the webview object in Arraylist of webview inside the application class. I check whether the item already exists in the Arraylist and if it do exists take the corresponding object and set the object as the

I want to make a Dialog Screen Like WhatsApp Profile Photo Dialog Screen

旧时模样 提交于 2019-12-20 02:12:28
问题 hello Friends.... I am currently trying to make a Dialog using Implicit Intent where i want to show my Dialog like whatsApp(Profile Photo Screen) and in this screen whatsApp are using extra field named as "Remove Photo". When i try to make same type of screen Dialog then i am unable to add this extra field("Remove Photo"). i have done all code. its working fine for three option in Dialog like(Gallery,Photo,Camera) and i am unable to handle these all in onActivityResult() . I am sending my all