Two BwuDatagrids on one page - dart

I have polymer paper layout with paper-drawer-panel and two Polymer components contains BwuDatagrid elements. And I get some troubles when two components with bwu-datagrid tags rendered on one page:
But if didn't render component in paper-drawer-panel it's worked like so:
What it can be? And how I can fix that?

This is a known issue. There is a pull request https://github.com/bwu-dart/bwu_datagrid/pull/112 but I planned to implement this a bit differently.
I just didn't do it yet :-/
Thanks for using BWU Datagrid btw :)

Related

JSF/Primefaces components in VIEWMODE, EDITMODE, CREATEMODE

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?

extend rich:select / h:select to have multiple selections

Is it possible to extend rich:select or h:selectOneMenu to enable multiple selection? I am looking for a jsf component which looks like the jQuery Chosen plugin.
The component should let me select multiple options from the drop down.
Please note that I can not use h:selectManyMenu or list box because of the specific requirement.
Note: just saw the tags field below the description box while posting a question. I am looking exactly for the same functionality, except that I want a JSF component, not a js plugin.
Any suggestion is highly appreciated. Thanks in advance.
I would use that jQuery Chosen plugin and do something like this:
use jQuery to apply it to your select
use jQuery to get the selected data
pass the data to the backing bean via a hidden input field
There may be 'pure JSF' ways but it looks like more work. If you find something interesting let me know.

Using DOM Buttons in dojox.mobile

I have a question on the DOM Buttons technique explained by Yoshiroh Kamiyama in this Article :-
http://www.ibm.com/developerworks/mobile/library/mo-dojo-mobile-performance/index.html
Where can I find documentation on the various DOM button classes that I can use ?
I don't think there is any explicit documentation on this, but you can run the dojox/mobile/tests/test_domButtons.html test case that shows the available DOM buttons classes.

jquery.sortable driving me nuts

i'm trying to make a set of elements sortable. Each element is created after an ajax request, so basically nothing in the DOM is available to bind sortable() on DOM ready.
I managed to set a callback occuring after my json manipulations have ended and the dom is updated.
Here's a preview of what i'm doing now.
http://jsfiddle.net/zrFsT/
Am I missing something ? What could it be ? Thanks for the help.
You were missing jquery-ui from the jsfiddle.
I've added it here: http://jsfiddle.net/zrFsT/
And updated your question.
Is this all that was wrong or are you trying to accomplish more?
Update: http://jsfiddle.net/zrFsT/1/
Removed multiple "lines" and the connect with feature usage.

Should I make a ImageHelper in this situation?

Hi I'm working with a project (asp.net mvc) where I need to show pictures on one site. They gone have jquery and be surrounded by a div like <div><img/></div>
I'm relatively new on MVC so I'm not sure what ways are the best to work in it yet. Should I do a ImageHelper so i can access it like <% Html.ImageJquery() %> or should i just do it plain in the view
what are your thoughts on this?
I am not sure if there is any single best practice for this case. As you already said you could create an extension method on a HtmlHelper or just put the code in the view.
Because the "added" code is a very simple (just two divs) I would skip extension method and just add the divs in the view. But if the code is actually more complex I would create a helper.
Cheers!
It depends how often you would use the helper. If it is used in a couple of places it would make sense, because it helps you to reduce redundant code.
The other option you have are partials.
I would go with an Extension method on the HTMLHelper , so that it accepts the 'src' value as a parameter and constructs the image tag accordingly.
Regarding Rendering of UI elements , i did read a blog post on 'Conditional Rendering' which i thought you would find it interesting .
please check the link below .
Conditional Rendering
Thanks ,
Vijay.

Resources