天道酬勤,学无止境

What is this error Found widget <g:ListBox class='dropdownbx' name='deleteDigits' ui:field='deletedigs'> in an HTML context

I get this error when I run my Gwt app

Found widget in an HTML context

Here is a snippet of the xml that it complains about:

    <!-- ... -->
    <g:HTML ui:field="localPanel">

    <fieldset>
        <legend>Local</legend>
        <label for="btn" >BTN:</label><input type="text" ui:field="btn" class="txtbx numeric" maxlength="10" name='btn'/>
        <label for="stdprt">SDT PRT:</label><input type="text" ui:field="stdprt" class="txtbx" readonly="readonly" name='stdPrt'/>
        <label for="rateArea">Rate Area:</label><input type="text" ui:field="ratearea" class="txtbx" readonly="readonly" name='rateArea'/>
        <br/>
        <label for="deleteDigits">Delete Digits:</label><g:ListBox ui:field='deletedigs' class="dropdownbx" name='deleteDigits'/>
    </fieldset>
    </g:HTML>
    <g:Button ui:field="submit2">Submit</g:Button>
    </g:HTMLPanel>

标签

评论

There are certain tags (those which GWT says are make an "HTML context") that can't have widgets inside them. For instance, <g:HTML><g:Label /></g:HTML> is illegal because a only expects HTML elements and not widgets. However, if you change that to <g:HTMLPanel><g:Label /></g:HTMLPanel> it will work.

The particular snippet triggering the error in your code is the <g:ListBox ui:field='deletedigs' class="dropdownbx" name='deleteDigits'/> that's contained in the <g:HTML ui:field="localPanel">. Make that <g:HTML> into a <g:HTMLPanel> and it should all work.

受限制的 HTML

  • 允许的HTML标签:<a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • 自动断行和分段。
  • 网页和电子邮件地址自动转换为链接。

相关推荐
  • styles_base.xml文件中的错误-android应用-找不到与给定名称'android:Widget.Material.ActionButton'相匹配的资源(Error in styles_base.xml file - android app - No resource found that matches the given name 'android:Widget.Material.ActionButton')
    问题 好的,我是android开发的初学者,我刚刚创建了hello world应用。 但这给我appcompat_v7库的styles_base.xml文件中的错误。 错误:检索项目的父项时出错:找不到与给定名称'android:Widget.Material.ActionButton'相匹配的资源。 styles_base.xml / appcompat_v7 / res / values-v21 AAPT问题 如何处理此错误? 另外,为什么在我不希望使用appcompat_v7库时也要使用它? 我的意思是不使用appcompat_v7库如何创建hello world应用程序? 这是出现上述错误的styles_base.xml文件。 <resources> <!-- Like in themes_base.xml, the namespace "*.AppCompat.Base" is used to define base styles for the platform version. The "*.AppCompat" variants are for direct use or use as parent styles by the app. --> <eat-comment/> <style name="Base.Widget.AppCompat.ActionBar
  • jsp:param 与 Java 类(jsp:param with Java class)
    问题 我有一个包含另一个 JSP 文件的 JSP 文件。 第一个 JSP 应该将 Java 类(小部件)的实例传递给第二个 JSP 文件。 这就是我所拥有的: 第一个JSP: <jsp:include page="/container/SpecialWidget.jsp"> <jsp:param name="widget" value="${widget}"/> // widget is a .Java POJO </jsp:include> 第二个JSP: ${param.widget.id} 问题是这段代码给出了一个错误(它说它不知道 ID)。 如果我省略“.id”部分,页面会打印 Java 类的 Java 代码,这意味着该类已正确传输。 如果我更改第一页的 ${widget} 规则,例如,${widget.id} 并尝试打印 ${param.widget},一切正常。 我的问题:为什么我不能传递一个 Java 类并直接调用它的属性? 我究竟做错了什么? 编辑:错误消息:由:javax.el.PropertyNotFoundException:在类型 java.lang.String 上找不到属性“id” 回答1 当您传递变量${widget}它会在请求时转换为字符串 ( widget.toString() )。 然后将该值作为字符串传递给第二个 JSP,而不是作为原始
  • Android android.R.id.home cant be resolved
    I am some what new to android, and i got an application code which is a big project. I understand all the code written, but currently i got a problem. Before i explain the problem, i will list libs this application is using. ActionBarSherLock ImageLoader Below is the app settings of the android application in AndroidManifest file android:versionCode="7" android:versionName="2.0" > <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="18" /> I included the two libs in the application from Android category on the project properties. But current i got the following error home cant be
  • No Material widget found
    I am new to Flutter and I was trying do execute the example here. I just want to use the TextField widget to get some user input. The issue is that I get a "No Material widget found." error. What am I doing wrong ? Thank you. Code: import 'package:flutter/material.dart'; void main() { runApp(new MyApp()); } class MyApp extends StatelessWidget { // This widget is the root of your application. @override Widget build(BuildContext context) { return new MaterialApp( title: 'Flutter Demo', home: new ExampleWidget(), ); } } /// Opens an [AlertDialog] showing what the user typed. class ExampleWidget
  • 类“不是模板类型”(Class 'is not a template type')
    问题 这个错误是什么意思? Generic.h:25: error: 'Generic' is not a template type 这是通用的。 template <class T> class Generic: public QObject, public CFG, public virtual Evaluator { Q_OBJECT std::string key_; std::vector<std::string> layouts_; std::vector<std::string> static_widgets_; std::map<std::string, std::vector<widget_template> > widget_templates_; std::map<std::string, Widget *> widgets_; int type_; LCDWrapper *wrapper_; protected: LCDText *lcdText_; public: Generic(Json::Value *config, int type); ~Generic(); void CFGSetup(std::string key); void BuildLayouts(); void StartLayout(); int GetType() { return
  • Flutter Listview Widget test fails with error text not found inside list?
    My custom widget code: class CustomWidget extends StatefulWidget { final int index; final String value; final bool isSelected; final VoidCallback onSelect; const CustomWidget({ Key key, @required this.index, @required this.value, @required this.isSelected, @required this.onSelect, }) : assert(index != null), assert(value != null), assert(isSelected != null), assert(onSelect != null), super(key: key); @override _CustomWidgetState createState() => _CustomWidgetState(); } class _CustomWidgetState extends State<CustomWidget> { @override Widget build(BuildContext context) { return GestureDetector(
  • android:数据绑定错误:找不到符号类(android: data binding error: cannot find symbol class)
    问题 我正在开始使用DataBinding功能。 我正面临着问题。 错误:(21、9)错误:找不到符号类ContactListActivityBinding build.gradle(模块:应用) apply plugin: 'com.android.application' android { compileSdkVersion 23 buildToolsVersion "23.0.2" defaultConfig { applicationId "com.letsnurture.ln_202.databindingdemo" minSdkVersion 15 targetSdkVersion 23 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } dataBinding { enabled = true } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) testCompile 'junit:junit:4.12'
  • Binding keyboard events in AngularJS
    What is the ideal way to bind Keyboard keypress events, if you're using AngularJS? Right now I'm setting the mapping the keyboard events inside of a controller... ngApp.controller('MainController', function MainController($scope) { $scope.keyEvents = function() { if($('calculator').hasClass('open')) { switch(e.keyCode) { case 8: calc.deleteDigit(); return; case 13: calc.equals(); *etc., etc.* } } var $article = $("article"); var $articleScrollTop = $article.scrollTop(); //PageDown if(e.keyCode == 34) { $('article').animate({ scrollTop: ($articleScrollTop + 480 + i++) }, 500); } //PageUp if(e
  • Error in styles_base.xml file - android app - No resource found that matches the given name 'android:Widget.Material.ActionButton'
    Ok, so im a beginner in android development and I just created the hello world app. But it's giving me errors in styles_base.xml file of appcompat_v7 library. error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton'. styles_base.xml /appcompat_v7/res/values-v21 AAPT Problem How do i take care of this error? Also why is the appcompat_v7 library being used when I don't want it? I mean how do I create the hello world app without using the appcompat_v7 library? This is the styles_base.xml file which is giving the above error.
  • Hello World Android应用程序,错误:工作空间\ appcompat_v7 \ res \ values-v21 \ styles_base.xml未找到与给定名称匹配的资源(Hello World Android App, Error: workspace\appcompat_v7\res\values-v21\styles_base.xml No resource found that matches the given name)
    问题 我是一个刚接触Android开发的新手。 我正在通过官方Android开发人员网页上的"Building your first app ”教程。 我遵循了所有说明,但是在Eclipse中向我显示了此错误代码。 该错误消息很长,我想我的设置,SDK或环境中肯定有问题。 有人可以帮我解决这个问题吗? 供您参考,我的目标SDK是API19 ,我也正在使用API19对其进行API19 [2014-10-22 17:13:51 - appcompat_v7] WARNING: unable to write jarlist cache file C:\Users\Cliff\workspace\appcompat_v7\bin\jarlist.cache [2014-10-22 17:13:51 - appcompat_v7] WARNING: unable to write jarlist cache file C:\Users\Cliff\workspace\appcompat_v7\bin\jarlist.cache [2014-10-22 17:13:51 - appcompat_v7] WARNING: unable to write jarlist cache file C:\Users\Cliff\workspace\appcompat_v7\bin\jarlist
  • 无法运行 ActionBarSherlock(unable to run ActionBarSherlock)
    问题 我有一个 2.2 android 项目,我想添加 ActionBarSherlock。 当我运行我的项目时,出现此错误; C:\Users\vitaly\Downloads\ActionBarSherlock-4.2.0\ActionBarSherlock-4.2.0\library\res\values-v14\abs__styles.xml:4: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.ActionBar'. [2012-11-09 13:54:53 - testApp] C:\Users\vitaly\Downloads\ActionBarSherlock-4.2.0\ActionBarSherlock-4.2.0\library\res\values-v14\abs__styles.xml:6: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.ActionBar.Solid'. [2012-11-09 13:54:53 -
  • 膨胀类CollapsingToolbarLayout时出错(Error inflating class CollapsingToolbarLayout)
    问题 我的CollapsingToolbarLayout因错误膨胀了类android.support.design.widget.CollapsingToolbarLayout而崩溃。 我上周末更新了android studio。 在更新之前,它可以正常工作。 更新后,它崩溃了。 但是,我尝试将其降级到2.0.0版本,并且不再起作用。 我的同事对CollapsingToolbarLayout没问题。 我不确定发生了什么。 错误是: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.test.android/com.test.android.ui.activity.RandomActivity}: android.view.InflateException: Binary XML file line #22: Error inflating class android.support.design.widget.CollapsingToolbarLayout at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2325) at android.app.ActivityThread
  • 检索父项时出错-Android Studio(Error retrieving parent for item - Android Studio)
    问题 在尝试刷新,构建或清理我的项目时,下载了New L SDK和20 SDK之后,我得到了一个 Error:Error retrieving parent for item: No resource found that matches the given name '@android:TextAppearance.Material.SearchResult.Subtitle'. Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Title'. Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Menu'. Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material
  • Android Studio 3.0布局编辑器中的渲染错误(Render error in Android Studio 3.0 Layout Editor)
    问题 我刚刚开始学习Kotlin进行android开发,并开始了一个空项目并添加了一个活动。 如Kotlin文档中所述,我已经添加了必需的gradle依赖项。 默认情况下,MainActivity的xml文件仅包含一个TextView。 但是,当我尝试在布局编辑器中预览xml时,它显示了“渲染错误” Render problem Failed to load AppCompat ActionBar with unknown error. 我也得到这个 The following classes could not be instantiated: - android.support.v7.widget.AppCompatImageView (Open Class, Show Exception, Clear Cache) - android.support.v7.widget.ActionBarContainer (Open Class, Show Exception, Clear Cache) - android.support.v7.widget.Toolbar (Open Class, Show Exception, Clear Cache) - android.support.v7.widget.AppCompatTextView (Open Class, Show
  • Error retrieving parent for item: No resource found that matches the given name '@android:style/TextAppearance.Holo.Widget.ActionBar.Title'
    I am implementing ActionBar to set the color for text using this style script in xml but getting error when I run my application time does anybody have idea what I have missing this is my style.xml file <!-- Start with the Holographic Light theme --> <style name="Theme.IOSched" parent="android:style/Theme.Holo.Light"> <item name="android:windowBackground">@drawable/window_background</item> <item name="android:actionBarStyle">@style/ActionBar</item> <!-- custom attributes <item name="textHeaderMaxLines">@integer/text_header_max_lines</item> <item name="trackAbstractMaxLines">@integer/track
  • 自从应用兼容后,Searchview无法正常工作(Searchview doesn't work since app compat)
    问题 由于我不赞成应用兼容,因此我的搜索视图不再起作用: Process: com.laurenswuyts.witpa, PID: 26666 java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.widget.SearchView.setSearchableInfo(android.app.SearchableInfo)' on a null object reference at com.laurenswuyts.witpa.Activities.Events.EventActivity.onCreateOptionsMenu(EventActivity.java:75) at android.app.Activity.onCreatePanelMenu(Activity.java:2820) at android.support.v4.app.FragmentActivity.onCreatePanelMenu(FragmentActivity.java:275) at android.support.v7.app.ActionBarActivity.superOnCreatePanelMenu(ActionBarActivity.java:276)
  • Error retrieving parent for item - Android Studio
    After downloading the New L SDK and 20 SDK when trying to refresh, build, or clean my project i get a Error:Error retrieving parent for item: No resource found that matches the given name '@android:TextAppearance.Material.SearchResult.Subtitle'. Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Title'. Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Menu'. Error:Error retrieving parent for item: No resource found that
  • jsp:param with Java class
    I have a JSP file that includes another JSP file. The first JSP should pass an instance of a Java class (widget) to the second JSP file. This is what I have: The first JSP: <jsp:include page="/container/SpecialWidget.jsp"> <jsp:param name="widget" value="${widget}"/> // widget is a .Java POJO </jsp:include> The second JSP: ${param.widget.id} The problem is that this code gives an error (it says it doesn't know ID). If I omit the ".id" part, the page prints the Java code for the Java class, which means the class has been transferred correctly. If I change the ${widget} rule of the first page in
  • React Native: error: resource android:style/TextAppearance.Material.Widget.Button.Borderless.Colored not found
    I am trying to get Facebook Login for my React Native Android project and when I try to build it with react-native run-android I am getting this error. I thought at first it was an issue with my Gradle version as React Native comes with Gradle 2.14 installed and I since upgraded to Gradle 4.4. I went back through the Facebook installation guide multiple times and I am still getting this error. I also triple checked my code to make sure I am not using any bad font/fontWeight/fontStyle. The only thing I can think of is the Facebook button that comes from the standard component has unsupported
  • 如何使JSON.NET忽略对象关系?(How do I make JSON.NET ignore object relationships?)
    问题 我正在从事一个Entity Framework项目。 我想序列化一堆实体类实例。 我将它们绑定到一个容器类中: public class Pseudocontext { public List<Widget> widgets; public List<Thing> things; 等等…这是我尝试序列化的此类的一个实例。 我希望JSON.NET序列化每个实际上是基础数据库中的列的每个实体类实例的成员。 我什至不希望它尝试序列化对象引用。 特别是,我的实体类具有虚拟成员,这些成员使我能够编写C#代码来导航我所有的实体之间的关系,而不必担心实际的键值,联接等,并且我希望JSON.NET忽略我的实体的关联部分类。 从表面上看,似乎有一个JSON.NET配置选项可以完全满足我的要求: JsonSerializer serializer = new JsonSerializer(); serializer.PreserveReferencesHandling = PreserveReferencesHandling.None; 不幸的是,JSON.NET似乎忽略了上面的第二条语句。 我实际上找到了一个网页(http://json.codeplex.com/workitem/24608),其中有人将相同的问题引起了James Newton-King本人的注意,他的回答(全部)是