custom-component

Swift Thread 1: Fatal error: init(coder:) has not been implemented (Calling super solution doesn't work)

巧了我就是萌 提交于 2019-12-01 11:03:00
问题 Hey guys I have searched all around and still cannot find a solution to my problem. I have a custom class here : import UIKit /** DatasourceController is simply a UICollectionViewController that allows you to quickly create list views. In order to render our items in your list, simply provide it with a Datasource object. */ open class DatasourceController: UICollectionViewController, UICollectionViewDelegateFlowLayout { open let activityIndicatorView: UIActivityIndicatorView = { let aiv =

What is the difference between Custom Components and Composite Components?

帅比萌擦擦* 提交于 2019-12-01 10:57:34
What is the difference between JSF Custom Components and Facelets Composite Components? BalusC JSF custom components are Java classes which extend UIComponent . Facelets composite components are XHTML files which use http://java.sun.com/jsf/composite namespace. See also: When to use <ui:include>, tag files, composite components and/or custom components? 来源: https://stackoverflow.com/questions/5704620/what-is-the-difference-between-custom-components-and-composite-components

JavaFx: how to reference main Controller class instance from CustomComponentController class?

主宰稳场 提交于 2019-12-01 10:52:21
问题 WHAT I HAVE is a standard JavaFX application: Main.java, MainController.java & main.fxml . To add custom component, I created CustomComponentController.java and custom_component_controller.fxml . PROBLEM is that in CustomComponentController methods I need to reference other methods and standard components from MenuController . I add public static MainController mc; to MainController class body, so that it can be seen from CustomComponentController ( MainController.mc.neededMethod() ). Then I

Component Initialization - Runtime vs. Designtime

[亡魂溺海] 提交于 2019-12-01 06:31:04
I have a series of visual compound components that I'm building, which use similar / common "connect" methods, which fire up there internal tables, etc. I am automating some of the connection stuff to connect automatically at runtime. How do I tell, at the component level, if the current state is runtime or designtime? Herbert Sitz I think you want to check if the csDesigning flag is present in the component's ComponentState property: if csDesigning in ComponentState then // designtime else // not designtime 来源: https://stackoverflow.com/questions/691997/component-initialization-runtime-vs

JSF custom component: support for arguments of custom types, the attribute setter is never invoked

北城余情 提交于 2019-12-01 05:43:42
I've created my custom JSF component according to one of many tutorials (I'm using PrimeFaces ), I've added an argument which was successfully passed to component. <c:custom command="command"/> public void setCommand(String command) { log.debug("setCommand {}", command); this.command = command; } But I need the argument of custom type, and that's something that I couldn't find in tutorials, which are handling only the most trivial cases. <c:custom image="#{currentImageBean.image}"/> public void setImage(Object image) { log.debug("setImage {}", image); this.image = (Image) image; } The bean is

JSF custom component: support for arguments of custom types, the attribute setter is never invoked

时光毁灭记忆、已成空白 提交于 2019-12-01 01:58:58
问题 I've created my custom JSF component according to one of many tutorials (I'm using PrimeFaces ), I've added an argument which was successfully passed to component. <c:custom command="command"/> public void setCommand(String command) { log.debug("setCommand {}", command); this.command = command; } But I need the argument of custom type, and that's something that I couldn't find in tutorials, which are handling only the most trivial cases. <c:custom image="#{currentImageBean.image}"/> public

Custom JSF component which adds new child to page “head” facet

最后都变了- 提交于 2019-11-30 23:51:08
I want to create custom component which adds new child to page "head" facet. This custom component is based on h:selectOneMenu. When used on jsf page, user can simply change the current theme. What I need this component to do is to add stylesheet child to head facet. My component has backing java. I tried to modify "head" in encodeBegins() method, but my child is not rendered at all. Take a look at the implementation: @FacesComponent(value = "com.ramps.util.ThemeSelector") public class ThemeSelector extends UIInput implements NamingContainer { public void encodeBegin(FacesContext context)

Adding forms and frames to packages

一笑奈何 提交于 2019-11-30 20:39:15
问题 I am developing a package of IDE-registered components, most of which are derived from a base TFrame class. There are also various custom dialog forms that are called by these components, included in the package. I'm working in Delphi 2007. I'm noticing that sometimes frame and form units, which normally have an associated DFM file, do not always show the DFM file "underneath" (accessible via the little [+] treeview node expander) underneath them. If I add an existing form-based PAS file, for

Custom JSF component which adds new child to page “head” facet

自闭症网瘾萝莉.ら 提交于 2019-11-30 18:34:08
问题 I want to create custom component which adds new child to page "head" facet. This custom component is based on h:selectOneMenu. When used on jsf page, user can simply change the current theme. What I need this component to do is to add stylesheet child to head facet. My component has backing java. I tried to modify "head" in encodeBegins() method, but my child is not rendered at all. Take a look at the implementation: @FacesComponent(value = "com.ramps.util.ThemeSelector") public class

How can I implement my own custom property editor for all instances of a certain type?

烂漫一生 提交于 2019-11-30 12:57:08
问题 I have followed a few tutorials on creating a custom property editor dialog, but there are so many things involved that I could not get it to work right. What I am trying to accomplish is a custom form with a date picker (calendar), a time picker, and OK and Cancel buttons. The form is no problem at all, but how would I go about implementing this so that I can publish a property in any component of a certain type with a button to launch the property editor? I would like to completely override