<div dir="ltr">Hey Michal,<div><br></div><div>I have reviewed your impl quickly</div><div><br></div><div>and there is one conceptual problem I have found:</div><div><br></div><div>in order to achieve as slick performance as possible on client-side,</div>


<div>we should prefer CSS-only components over JS+CSS ones.</div><div><br></div><div>I believe ButtonGroup is a sample of component that doesn&#39;t have to use JS (Widget Factory)</div><div>at all.</div><div><br></div><div>


(Note that JSF Bridge code may be required though).</div><div><br></div><div>Even in case where JS is required, it is good practice to build whole component on simple and CSS-styled markup</div><div>and the continue to tie in JS things like event handling.</div>

<div><br></div><div>~ Lukas</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Nov 27, 2013 at 5:21 PM, Michal Petrov <span dir="ltr">&lt;<a href="mailto:richfaces-dev@lists.jboss.org" target="_blank">richfaces-dev@lists.jboss.org</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
<br>
I&#39;ve created a button group widget (the branch is here (<a href="https://github.com/richwidgets/richwidgets/tree/buttongroup)" target="_blank">https://github.com/richwidgets/richwidgets/tree/buttongroup)</a>). Based on what&#39;s showcased on the Bootstrap site (<a href="http://getbootstrap.com/components/#btn-groups" target="_blank">http://getbootstrap.com/components/#btn-groups</a>) I&#39;ve implemented sizing, justification, vertical grouping and button styling. The widget also turns nested lists into dropdowns (which I guess can be expanded to process any nested elements).<br>


<br>
I&#39;d ask for a code review (since this is my first work on RichWidgets) and I also have a few questions:<br>
* How much styling are we expecting on user side? Right now I&#39;m only applying style to buttons if they weren&#39;t styled already (and if they aren&#39;t styled the group doesn&#39;t work).<br>
* Should I write any tests?<br>
* Any other functionality to add?<br>
<br>
Michal<br>
<br>
Posted by forums<br>
Original post: <a href="https://community.jboss.org/message/847489#847489" target="_blank">https://community.jboss.org/message/847489#847489</a><br>
_______________________________________________<br>
richfaces-dev mailing list<br>
<a href="mailto:richfaces-dev@lists.jboss.org">richfaces-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/richfaces-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/richfaces-dev</a><br>
</blockquote></div><br></div>