标签: dialog

单击 commandLink 时,primefaces 对话框出现后消失

我有这个代码:

<h:form>
        <h:commandLink value="Créer un compte" onclick="dlg3.show();"/>
</h:form>

<p:dialog id="modalDialoog" widgetVar="dlg3" draggable="false" resizable="false" dynamic="true" header="Inscription">
<center>
<p:panel id="xyzBody">
<h:form id="inscri-f">
        <h:panelGrid id="loginPan" columns="2" bgcolor="White">

         <h:outputText value="Nom d'utilisateur :" />
         <p:inputText id="username" value="#{demandeBean.login}"></p:inputText>

         <h:outputText value="Mot de passe :" />
         <p:password id="pwd" value="#{demandeBean.pwd}"/>

         <h:commandButton value="Envoyer demande" update=":inscri-f:cr" 
                 actionListener="#{demandeBean.envoi_dde}"></h:commandButton>

         <h:commandButton value="Retour" action="page1?faces-redirect=true"></h:commandButton>

          <p:outputPanel id="cr"> 
            <h:outputText rendered="#{demandeBean.saved}" value="#{demandeBean.message}"/>
          </p:outputPanel>
                </h:panelGrid>
       </h:form>
       </p:panel>
       </center>
       </p:dialog>
Run Code Online (Sandbox Code Playgroud)

我的问题是当我单击 commandLink 时显示“Créer un compte”对话框并且它很快消失。

jsf dialog primefaces

0
推荐指数
1
解决办法
4646
查看次数

如何在java中制作对话框窗口?

我在 java 站点上找到了一个关于如何制作对话框窗口的网页,但是当我尝试它时它不起作用。该网站说键入:

JOptionPane.showMessageDialog(frame, "Window text.");
Run Code Online (Sandbox Code Playgroud)

我只是想用一些文本和一个确定按钮来制作一个窗口,但是当我输入它时,我的 Eclipse IDE 想让我为 JOptionPane 导入一些东西,在我这样做之后,它说“框架” 部分不正确,即“无法解析为变量”。我在这里做错了什么?

java swing dialog window joptionpane

0
推荐指数
1
解决办法
1567
查看次数

从 jface 对话框中删除按钮栏

我想创建一个没有确定/取消按钮的对话框。我知道如果你重写 createButton 方法,这可以实现。

如果根本不需要按钮栏,您如何覆盖 createButtonBar 方法以返回 null?这将节省一些代码。

dialog jface buttonbar

0
推荐指数
1
解决办法
2151
查看次数

将 .resw 文件中的多个字符串资源用于 ContentDialog

我想使用我的 .resw 文件中的字符串设置 ContentDialog 的 PrimaryButtonText、SecondaryButtonText 和 Title 属性。很遗憾 ?只能对使用 x:Uid 的一个属性执行此操作,因为不能接受在 ContentDialog 内设置 x:Uid 两次。我什至试图做这样的事情:

<ContentDialog>
<ContentDialog.PrimaryButtonText x:Uid="DialogConfirm" />
    <ContentDialog.SecondaryButtonText x:Uid="DialogCancel" />
</ContentDialog>
Run Code Online (Sandbox Code Playgroud)

但我有一个例外

XBF 生成错误代码 0x09c8

有什么办法可以做到这一点吗?

xaml dialog winrt-xaml uwp

0
推荐指数
1
解决办法
962
查看次数

如何在 android 应用程序中创建持久性对话框

我正在使用此代码在我的 android 应用程序中创建一个对话框。弹出对话框创建成功,但问题是如果我触摸屏幕上的任何地方,对话框就会消失。我希望对话框保持在屏幕上,即使用户触摸屏幕的任何其他部分。应允许用户仅在对话框中选择肯定或否定响应,然后才能继续。

有人可以告诉我如何修改我的代码来实现这一点。

AlertDialog.Builder builder1 = new AlertDialog.Builder(context);
builder1.setMessage("Would you click to proceed with this app.");
builder1.setCancelable(true);

builder1.setPositiveButton(
    "Yes",
    new DialogInterface.OnClickListener() {
        public void onClick(DialogInterface dialog, int id) {
            dialog.cancel();
        }
    });

builder1.setNegativeButton(
    "No",
    new DialogInterface.OnClickListener() {
        public void onClick(DialogInterface dialog, int id) {
            dialog.cancel();
        }
    });

AlertDialog alert11 = builder1.create();
alert11.show();
Run Code Online (Sandbox Code Playgroud)

提前致谢

android dialog

0
推荐指数
1
解决办法
573
查看次数

如何通过单击按钮实现一些带有一些图像的小弹出窗口

在此处输入图片说明

当用户单击三个蓝点按钮时,我想要这样的弹出窗口。如何在android中实现这种类型的弹出视图。有图书馆可用吗?

android dialog popup

0
推荐指数
1
解决办法
1944
查看次数

键盘打开时如何调整对话框大小?

我想要做什么:键盘应该显示在对话框的底部。

代码:我正在扩展 Dialog 类。

  window.setLayout(WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.WRAP_CONTENT)
        window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE)
        window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE)
Run Code Online (Sandbox Code Playgroud)

我尝试过的:

  1. window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE)

  2. window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN)

正如我在这里学习的那样, SOFT_INPUT_ADJUST_RESIZE 应该可以工作,但我无法弄清楚为什么它在我的情况下不起作用?

登录画面

android resize dialog

0
推荐指数
1
解决办法
2089
查看次数

在Google Maps事件监听器中打开Angular Material对话框为空

我在项目中使用Angular 6.0.6和Angular Material 6.3.0。我已将对话框组件添加到entryComponents应用程序模块中。如果直接在仪表板组件中打开该对话框,效果很好,但是在大多数情况下,当我在rightclickGoogle Maps标记的事件处理程序中打开该对话框时,该对话框为空。

在这种情况下,它为空:

private attachEvents(wo) {
  wo.marker.addListener('rightclick', (e) => {
    this.dialog.open(DialogAlert, {
      width: '400px',
      data: {
        confirmation: true,
        message: 'test',
        title: 'X'
      }
    });
  });
}
Run Code Online (Sandbox Code Playgroud)

如果我将open代码放在外面wo.marker.addListener,效果很好。

乐于听到任何建议以使其在事件处理程序中正常运行。我尝试在事件处理程序中调用detectChangesChangeDetectorRef),但无济于事。

对话框的HTML代码:

<h1 mat-dialog-title>{{data.title ? data.title : defaultTitle}}</h1>
<div mat-dialog-content>
  <p>{{ data.message }}</p>
</div>
<div mat-dialog-actions>
  <button *ngIf="confirmation" mat-raised-button (click)="onNoClick()">Cancel</button>

  <button *ngIf="confirmation && !options" mat-raised-button (click)="onConfirmClick()" cdkFocusInitial>Yes</button>
  <button color="primary" *ngFor="let o of options;  index as i" mat-raised-button (click)="onConfirmClick(i)">{{o}}</button> …
Run Code Online (Sandbox Code Playgroud)

javascript google-maps dialog angular-material angular

0
推荐指数
1
解决办法
493
查看次数

在对话框的构造函数中调用.Show()或.ShowDialog是一种好习惯

将.Show()或.ShowDialog()方法作为WPF窗口构造函数的最后一行调用是一个好习惯吗?唯一的原因是简化使用我的窗口类 - 通过创建它的实例我已经显示它.

.net c# wpf constructor dialog

0
推荐指数
1
解决办法
118
查看次数

React JS - 如何在 Dialog (material-ui) 的 PaperProps 中添加样式

我正在使用 material-ui ReactJs 中的 Dialog 组件。

<Dialog fullScreen open={this.state.open}
  PaperProps={{ classes: {root: classes.dialogPaper} }}
  onClose={this.handleClose.bind(this)} transition={this.props.transition}>
  {this.props.children}
</Dialog>
Run Code Online (Sandbox Code Playgroud)

在上面的代码中,我已经覆盖了 PaperProps 的根类。现在我还想覆盖 PaperProps 中的样式。在 PaperProps 中是否可以覆盖样式。

就像是 PaperProps={{ classes: {root: classes.dialogPaper}, style:{} }}

如果我错了,请告诉我。我也想覆盖样式。

overriding dialog inline-styles reactjs material-ui

0
推荐指数
1
解决办法
8279
查看次数