To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.
I'm trying to use an Embedded() with a FileResource. The Design View seems only to support ExternalResource and/or things with http:// and theme://.
If I edit the @AutoGenerated to use a FileResource things work the way I like, but I can't use the design view any more because it won't parse.
What are my options? I want to keep using the design view, but after losing many hours trying to get the supported design view elementsto work with my file location I had to give up.
Here's my code that plugs in a Resource that isn't one of those supported by the design editor:
// item_image item_image = new Embedded(); item_image.setImmediate(false); item_image.setDescription("image item in detail panel"); item_image.setWidth("220px"); item_image.setHeight("220px"); item_image.setSource(getItemImageFileResource("void-320-DSC_0315.JPG")); item_image.setType(1); item_image.setMimeType("image/jpeg"); place_thing_connection_detail_layout.addComponent(item_image);
The problem is on the setSource() call. One line messing me up for design view.