Hello All
I am using smart gwt 2.2, Operating system is Windows xp and browser is Mozilla Firefox.
Before working on the smart gwt I worked on smart gwt-ext.
In gwt-ext I used HTMLTable to give html view to my form. But after using HTMLTable I found TableLayout in gwt-ext, which is more easy to use and manage.
Because for putting element in HTMLTable I have to write complex for loop,
But the TableLayout is rich enough to handle this type of coding.
So I searched some type of Table Layout component in the smart gwt, But not succeeded yet.
So I just want to know that I have a form and for HTML preview Is there better way than HTML Table in smart gwt.
My form will be like this:
If there is 3 text fields then In the first column of the HTML Table will be Label
column on in the second column the control (i.e Text Field) will be putted.
Thanks in advance
Hello All
Chapter 6 "Layout" from the SmartGWT Quick Start Guide.There is Form Layout in the Smart GWT
which also provide the method named RowSpan , ColSpan, NumOfColumns.
So Form Layout can be a substitute of Table Layout (in gwt-ext) in smart gwt.
I asked the exact same question (HTML Table-like Layout) on the SmartGWT forums and never got a reply. I think we're stuck with HLayout, VLayout, HStack and VStack. See Chapter 6 "Layout" from the SmartGWT Quick Start Guide.
You could add HTML Layout to their Wishlist.
Related
From this question (Hyperlink inside label field in Vaadin 12) I was able to use Vaadin's HTML component to create custom html code (and it worked fine, including putting in ahref links etc.)
However, Vaadin provides the "Anchor" component which appears to be the far more powerful (and potentially more secure) way of creating links that can be used to navigate to either other classes I built or to external website (or even to download dynamically generated data in a streaming fashion).
However, what if I want to have both normal "label-like" text and an achor link all appear in a single paragraph? For example, in "normal html", I could just do this:
<p>
This is my normal text.
Download <a href="/resources/excelTemplate.xlsx" download> this Excel file</a>
and follow the instructions therein
</p>
and it would create the link somewhere within my <p>...</p> paragraph. How can I do this in Vaadin with the Anchor object? The best I came up with thus far is to use Horizontal Layout and then add a label, an achor, and then another label -- but that is really really ugly and doesn't technically have the same effect (it won't wrap properly.) The other option is to NOT use "Anchor" but instead just use "HTML" component and just create ahref links everywhere, but that seems a tiny big ugly too (though I suppose it's an ok workaround.). (I'm assuming I can call any UI I build by sticking the url links in the ahref calls....) Thoughts on the "right Java Vaadin" way to do this?
Paragraph p = new Paragraph("para");
Anchor a = new Anchor("go", "www.go.com");
p.add(a);
p.addClickListener(e-> UI.getCurrent().navigate(a.getHref()));
Vaadin 10+ offers you (atleast) three ways to handle this kind of case. You mentioned two of the..
Make composition of components in Java. Instead of VerticalLayout you could wrap the content in Div and using Text component also in Div instead of Label. You can make this kind of custom component by extending Composite.
The second alternative is to use HTML component as you mentioned.
The third alternative is to create custom html polymer template and connect to it with PolymerTemplate class. That will result in custom component that behaves like the custom component of the first option. It is just different way of implementation.
Which one of the three is a correct way. From framework perspective all of them. Which one is correct for you depends on your preference and application.
[Stackoverflow disallows the word help in the title. Hence the h3lp]
We are in the proces of moving our code from Orbeon 3.9 to Orbeon 4.x. One of the many things that changed is the behavior for display of xforms:alert and xforms:help. Example code:
<xforms:input ref="#code">
<xforms:alert ref="$resources/required-field"/>
<xforms:help ref="$helptext"/>
</xforms:input>
In Orbeon 3.9 the alert is displayed as a red img with a white exclamation mark that has the text as tooltip, only if the binding fails. The help is displayed as a blue-ish image with a question that activated a tiny pseudo window containing the (potentially large) help text.
In Orbeon 4.7 the alert text is displayed as-is, no image and no condition based on binding. This interferes with a carefully designed interface as it takes up a lot more space. The help text is not displayed at all because .xforms-help has display: none;. Overriding that doesn't work because the text would then just be displayed inline.
I could not find documentation for these changes. Does anyone know the rationale and how to make "alert" and "help" useful yet again?
There are two changes with Orbeon Forms 4.x which might be relevant to this:
The HTML layout of elements has changed a bit. This means existing CSS might have to be adapted. You can check this by comparing the HTML produced by 3.9 vs. 4.x for a given page. With 4.x, all form elements, for example, are wrapped within a <span> or <div> element.
Form Runner uses Twitter Bootstrap as a CSS library. But the Bootstrap CSS files are also included for non-Form Runner pages.
This said, "red icon" alerts should still work, see for example the good old Espresso Order or Bookcast demos.
If you see alerts inline and unconditionally, it means that somehow the proper CSS doesn't apply, either because of the HTML layout change mentioned above, or because some CSS files are missing.
Look at this post : http://blog.orbeon.com/2014/01/improving-how-we-show-help-messages.html
and this : http://discuss.orbeon.com/how-to-use-the-quot-new-quot-xforms-help-in-4-5-td4658348.html
julien
I am using ASP.NET MVC with Kendo UI. I want to export grid to an HTML page and print it. Online help is not available. What have your done previously. Thanks in advance.
Did you find a solution to this? I'm looking at the same thing currently and have found a couple of options:
Firstly Telerik have a Javascript example which renders your grid to a new print window, see https://docs.telerik.com/kendo-ui/controls/data-management/grid/print-export
Just alter the name of
var gridElement = $('#grid'),
to your own existing grid name and omit the function:
$(function () {
var grid = $('#grid').kendoGrid({
...
};
};
However, this only renders what is currently displayed on screen (so if your grid has multi pages it may not be suitable).
The second option that I'm exploring is exporting to pdf (and then user can then print that if they wish). There are example of this at
https://demos.telerik.com/aspnet-mvc/grid/pdf-export and https://docs.telerik.com/kendo-ui/controls/data-management/grid/pdf-export
This does have multi-page printing support (although I haven't got it to work just yet, they have examples which show it working). They do mention potential problems if you have a lot of data as it needs to load all the data on the client side (even if you have paging). There are some example projects to work on data server side in the above links.
In the end our requirements didn't need the paging but I've gone with the pdf option as that delivers quite a nice layout that you can template further.
I have around 10 tables in my database. Building CRUD’s for these are easy with ie. reverse engineering in Netbeans, and with Netbeans 8 the pages look great thanks to primefaces.
So now I have 4 pages per entity; list, create, edit and view. Create and edit are similar except they bind to a new respective an existing entity. View is similar to edit, except it is readonly. The available buttons change too, of course, and there are probably other minor differences.
What I would like is to keep it down to 2 components per entity; 1 for the list and 1 for an instance. The latter should come in 3 flavours; editmode, createmode and viewmode. These components should be includeable in other pages, preferably both as dialogs and “raw” imports.
Anyone have an idea whether this is possible? Do I need to create my own set of renders, which can ie. render an inputText-component and a selectOneMenu as an outputText? As an example my first try with an inputText was just to write disabled=”true”, which renders the inputtext as non-editable. It becomes too greyish, but I guess that would be fixable by overriding the style. But preferrably it should render as a real outputText would when in viewmode. Maybe some clever use of css could do the job instead of renders.
Maybe the easiest way would be to store the viewmode of the composite component in the componenttree. Is this possible? I guess any component would have to look up in the tree in the render phase, to see how it should render.
For the buttons I could maybe do with just the rendered attribute.
Is it possible to go this route, or has anyone already made a framework for this? Or is it stretching JSF too far?
i'm trying to display html i.e. rich text within a wicket element dynamically. An example is like displaying a rich text email within a div tag. how can i get this done with wicket. the wicket Label component doesn't seem to support this. is there a component that does
Found this in the excellent Manning Wicket in Action:
add(new Label("markup", "<h1>Hello!</h1>").setEscapeModelStrings(false));
The call to setEscapeModelStrings tells Wicket not to escape the contents of the provided string, and to render the contents into the resulting markup. This does the trick, as you can see in the right screenshot in figure 5.4. Note that this setting is available on all Wicket components, but it’s primarily useful on labels.
As the book also notes however, you should be aware of script-injection attacks..