小编Joh*_*tts的帖子

MissingPluginException(在通道 plugins.flutter.io/firebase_core 上找不到方法 Firebase#initializeCore 的实现)在 Android 上

调用Firebase.initializeApp()我的颤振代码时出现上述错误。我遵循了这里的文档:https : //firebase.flutter.dev/docs

这是我的 pubspec.yaml

dependencies:
  flutter:
    sdk: flutter
  firebase_core: ^0.5.0
  cloud_firestore: ^0.14.0
  firebase_auth: ^0.18.0
  fl_chart: ^0.11.0
  snapping_sheet: ^2.0.0
  flutter_svg: ^0.18.0
  flutter_redux: ^0.6.0
  strings: ^0.1.2
  random_string: ^2.1.0
  redux_thunk: ^0.3.0
  #  firebase_crashlytics: ^0.1.4+1
  dotted_line: ^2.0.1

  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^0.1.3

dev_dependencies:
  flutter_test:
    sdk: flutter
Run Code Online (Sandbox Code Playgroud)

这是我的颤振代码:

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  SystemChrome.setEnabledSystemUIOverlays(SystemUiOverlay.values);

  final store = Store<AppState>(AppState.reducer, initialState: AppState.initial(), middleware: [thunkMiddleware]);

  runApp(
    FutureBuilder( …
Run Code Online (Sandbox Code Playgroud)

android firebase flutter google-cloud-firestore flutter-dependencies

15
推荐指数
3
解决办法
9939
查看次数

删除特定数据表上的所有边框

我需要使用PrimeFaces隐藏一个数据表的所有边界,而不是全部.我尝试了很多东西,没有人工作过.有谁知道怎么做?

我已经将以下样式(单独)应用于ui-datatable该类:

border: hidden !important;    
border-style: none !important;
Run Code Online (Sandbox Code Playgroud)

另一件事......

css datatable jsf border primefaces

9
推荐指数
1
解决办法
2万
查看次数

为什么在使用primefaces时使用omnifaces?

我需要知道使用OmniFaces的好处与我目前使用的PrimeFaces相比.OmniFaces提供的PrimeFaces没有哪些功能?

jsf primefaces omnifaces

8
推荐指数
1
解决办法
5293
查看次数

事务不回滚

我调用两个方法,第一个更新表,下一个在另一个表中插入记录.当第二个事务失败时,EJB不执行第一个事务的回滚.

这是我的支持bean:

@ManagedBean
@ViewScoped
public class TransactionTestBean implements Serializable {

    @EJB
    private TransactionTestService service;

    public String loadView() {
        return "/test/transactionTest";
    }

    public void test() {
        try {
            service.updateTest();
        } catch (Exception e) {
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

EJB接口:

@Local
public interface TransactionTestService {

    void updateTest() throws CustomException;
}
Run Code Online (Sandbox Code Playgroud)

EJB类:

@Stateless
@TransactionManagement
public class TransactionTestServiceImpl implements TransactionTestService {

    @Resource(mappedName = "java:jboss/datasources/xxxxxDS", shareable = true)
    public DataSource dataSource;

    private TransactionTestDAO dao;

    @PostConstruct
    public void init() {
        dao = new TransactionTestDAOImpl();
    } …
Run Code Online (Sandbox Code Playgroud)

java ejb rollback jboss7.x

8
推荐指数
2
解决办法
5504
查看次数

从所有PrimeFaces p:panelGrid组件中删除边框

我需要使用primefaces隐藏所有panelgrids的所有边框.我试过他没有效果:

table {
    border: none;
}

table tr, table td {
    border: none;
}
Run Code Online (Sandbox Code Playgroud)

我能做什么?

css jsf border primefaces panelgrid

5
推荐指数
1
解决办法
2万
查看次数

将<p:commandButton>样式应用于<p:commandLink>,因为我基本上需要<p:commandButton target ="_ blank">

有谁知道如何将命令按钮中的相同样式添加到所有命令链接?

我希望所有链接都显示为这样(覆盖链接样式和使用按钮样式):

一个普通的按钮: 在此输入图像描述

悬停按钮: 在此输入图像描述

按下按钮: 在此输入图像描述

我目前的主题是开始

jsf commandlink primefaces commandbutton

5
推荐指数
1
解决办法
1万
查看次数

对话框显示在页面底部

我在所有视图中以这种方式显示对话框:

<f:view locale="#{loginBB.localeCode}">
    <ui:insert name="dialogs" />
    <p:messages autoUpdate="true" closable="true" redisplay="false" />
    <ui:insert name="content" />
</f:view>
Run Code Online (Sandbox Code Playgroud)

但它们显示在页面底部

我使用CSS在所有对话框中进行了此更改:

/* Put the dialogs on the top of the screen. It only works on firefox */
.ui-dialog {
    position: absolute;
}

/* Disable scroll on the loading dialog */
.disable-scroll .ui-dialog-content {
    overflow: hidden;
    width: auto;
}
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

它们没有显示在屏幕顶部?

编辑: 我删除了CSS样式,但对话框仍然出现在iPad的页面底部.明天我将在Mac OS X的safari中进行测试

这是我的styles.css文件:

td.right {
    text-align: right;
}

td.center {
    text-align: center;
}

table td,table tr {
    vertical-align: top;
}

.ui-datatable .ui-datatable-data tr,.ui-datatable …
Run Code Online (Sandbox Code Playgroud)

css jsf dialog primefaces

5
推荐指数
1
解决办法
2998
查看次数

提供PDF下载后自动打开打印机对话框

我目前正在浏览器的新选项卡中打开pdf文件,但我需要知道如何在按下commandButton后打开打印机对话框来打印pdf jasper报告

这是在新选项卡中打开pdf的方法:

public void printJasper() {

    JasperReport compiledTemplate = null;
    JRExporter exporter = null;
    ByteArrayOutputStream out = null;
    ByteArrayInputStream input = null;
    BufferedOutputStream output = null;

    FacesContext facesContext = FacesContext.getCurrentInstance();
    ExternalContext externalContext = facesContext.getExternalContext();
    HttpServletResponse response = (HttpServletResponse) externalContext.getResponse();

    try {

        List<String> sampleList = new ArrayList<String>();
        sampleList.add("Fist sample string");
        sampleList.add("Second sample string");

        JRBeanCollectionDataSource beanCollectionDataSource = new JRBeanCollectionDataSource(sampleList);
        Map<String, Object> reportValues = new HashMap<String, Object>();
        reportValues.put("anyTestValue", "test value");

        facesContext = FacesContext.getCurrentInstance();
        externalContext = facesContext.getExternalContext();
        response = (HttpServletResponse) externalContext.getResponse();

        FileInputStream file …
Run Code Online (Sandbox Code Playgroud)

printing pdf jsf jasper-reports primefaces

5
推荐指数
2
解决办法
1万
查看次数

注销消息未显示

当我从我的应用程序注销时,它不会显示我的注销消息

我有一个outputText试图在我的视图中显示消息(<h:outputText id="message" value="#{loginMB.message}" />):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:o="http://omnifaces.org/ui"
    xmlns:p="http://primefaces.org/ui"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    template="/WEB-INF/templates/template.xhtml">
    <ui:define name="content">
        <o:form id="login" includeViewParams="true">
            <h:outputText id="message" value="#{loginMB.message}" />
            ... Another components ...
        </o:form>
    </ui:define>
</ui:composition>
Run Code Online (Sandbox Code Playgroud)

这是我的支持豆:

@ManagedBean
@SessionScoped
public class UserBB implements Serializable {

    private String message;

    public void logout() {
        try {
            message = "You have been logout successfully";

            SecurityUtils.getSubject().logout();
            Faces.invalidateSession();
            Faces.redirect("login.xhtml");
        } catch (Exception exception) {
            ... Another code ...
        } …
Run Code Online (Sandbox Code Playgroud)

session jsf redirect message

3
推荐指数
1
解决办法
1113
查看次数

将双精度型转换为不带小数位的字符串的最佳方法

将双精度型转换为不带小数位的字符串的最佳方法是什么?

关于什么 String.valueOf((int) documentNumber)?

小数点后的小数点始终为0。我不需要四舍五入

java math

3
推荐指数
2
解决办法
2万
查看次数

Custom message from @Pattern not shown on a Double property

I am trying to use JSR-303 bean validation.

I added the maven dependency

<dependency>
    <groupId>javax.validation</groupId>
    <artifactId>validation-api</artifactId>
    <version>1.1.0.Final</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)

I put ValidationMessages_es.properties and ValidationMessages_en.properties in /WEB-INF/classes.

This is the model:

@Pattern(regexp="[0-9]", message="{not.a.valid.number}")
private Double price;
Run Code Online (Sandbox Code Playgroud)

And this is the view:

<p:inputText id="price"
    value="#{inventoryMB.product.price}">
    <f:convertNumber type="number" maxFractionDigits="0" />
</p:inputText>
<p:message for="price" />
Run Code Online (Sandbox Code Playgroud)

当我输入无效数字时,我从验证器收到此消息:

form:price: 'ss' is not a number. Example: 99
Run Code Online (Sandbox Code Playgroud)

来自属性的我的自定义消息不起作用.怎么了?

jsf bean-validation

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

使用 date_trunc 的缺点

几年前,我听说在 sql 中截断日期不是一个好的做法。真的吗?

我需要从“yyyy-MM-dd”格式的表中获取日期类型列的值,日期当前以“yyyy-MM-dd hh:mm:ss”格式存储在表中

sql postgresql

1
推荐指数
2
解决办法
1921
查看次数

为什么使用或不使用java 7来制作JAVA EE应用程序

Java 6是这种编程语言的稳定版本.但是我想升级到当前版本的java 7.这时,建议在生产中使用java 7吗?在哪里可以找到有关我升级到java 7时可能遇到的问题的更新信息?

java java-7

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