Return-Path: Delivered-To: apmail-myfaces-dev-archive@www.apache.org Received: (qmail 14004 invoked from network); 15 May 2010 00:02:44 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 15 May 2010 00:02:44 -0000 Received: (qmail 16270 invoked by uid 500); 15 May 2010 00:02:44 -0000 Delivered-To: apmail-myfaces-dev-archive@myfaces.apache.org Received: (qmail 16226 invoked by uid 500); 15 May 2010 00:02:44 -0000 Mailing-List: contact dev-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Development" Delivered-To: mailing list dev@myfaces.apache.org Received: (qmail 16219 invoked by uid 99); 15 May 2010 00:02:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 15 May 2010 00:02:44 +0000 X-ASF-Spam-Status: No, hits=2.1 required=10.0 tests=AWL,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of aliok@aliok.com.tr designates 74.125.82.53 as permitted sender) Received: from [74.125.82.53] (HELO mail-ww0-f53.google.com) (74.125.82.53) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 15 May 2010 00:02:38 +0000 Received: by wwb39 with SMTP id 39so2127236wwb.12 for ; Fri, 14 May 2010 17:02:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.187.7 with SMTP id x7mr1226333wem.134.1273881734622; Fri, 14 May 2010 17:02:14 -0700 (PDT) Received: by 10.216.18.136 with HTTP; Fri, 14 May 2010 17:02:14 -0700 (PDT) X-Originating-IP: [88.255.65.194] Date: Sat, 15 May 2010 03:02:14 +0300 Message-ID: Subject: [GSOC-HTML5] ClientBehavior and ClientBehaviorHolder's attributes From: Ali Ok To: MyFaces Development Content-Type: multipart/alternative; boundary=001485f44a30472eed048696b4e4 --001485f44a30472eed048696b4e4 Content-Type: text/plain; charset=ISO-8859-1 Hi, I am trying to write some prototypes about DnD support. I want to use ClientBehaviors for this issue. I wonder if a code like can produce
What I need is, having a ClientBehavior setting an HTML5 element's "draggable" attribute set to "true". Thanks to ClientBehaviors, I can easily set 'ondragstart' and 'ondragend' (in the FaceletHandler of my using clientBehaviorHolder.addClientBehavior("dragstart", clientBehavior);) However, producing "draggable=true" is not that straightforward. On , I need to check if there is a child. At the components that I cannot modify, things got worse. I can never set "draggable=true" on them: And, I don't want to use something like: since the information about the component being draggable is written twice. Anyway, is this possible without parent component checking children? It would be nice if we have a chance allowing ClientBehaviors to set some allowed logical and plain attributes just like the events. Any discussions about something like that on jsr314-open or elsewhere? Greetings, Ali -- My Blog: http://blog.aliok.com.tr Twitter: http://twitter.com/aliok_tr --001485f44a30472eed048696b4e4 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi,

I am trying to write some prototypes abou= t DnD support. I want to use ClientBehaviors for this issue.

I wonder if a code like

<xx:somePanel ...>
<fx:dragSupportClientBe= havior =A0.../> =A0 =A0 =A0<!-- This is A ClientBehavior -->
=
</xx:somePanel>
=

can produce

<div draggable=3D"true"<= /b>=A0
ondragstart=3D= "return dragStart(event)"
ondragend=3D"return d= ragEnd(event)">
</div>


What I n= eed is, having a ClientBehavior setting an HTML5 element's "dragga= ble" attribute set to "true".

Thanks to ClientBehaviors, I can easily set 'ondrag= start' and 'ondragend' =A0

(in the Fac= eletHandler of my <fx:dragSupportClientBehavior> using=A0
<= span class=3D"Apple-style-span" style=3D"font-family: 'courier new'= , monospace; ">clientBehaviorHolder.addClientBehavior("dragstart"= , clientBehavior);)

However, producing "draggable=3Dtrue" is not = that straightforward. On <xx:somePanel>, I need to check if there is = a <fx:dragSupportClientBehavior> child.

At t= he components that I cannot modify, things got worse. I can never set "= ;draggable=3Dtrue" on them:

=A0=A0 =A0 =A0 =A0<h:inputText>
<fx:dragSupportClientBehavior =A0..= ./>
=A0=A0 =A0 =A0 =A0</h:inputText>


And, I don't want to use something like:

= =A0=A0 =A0 =A0 =A0<xx:somePanel draggable=3D"true" ...>
<fx:dragSupportClient= Behavior =A0.../>
</xx:somePanel>
=

since the information about the component being d= raggable is written twice.

Anyway, is this possibl= e without parent component checking children?

It would be nice if we have a chance allowing ClientBeh= aviors to set some allowed logical and plain attributes just like the event= s. Any discussions about something like that on jsr314-open or elsewhere?

Greetings,
Ali
--001485f44a30472eed048696b4e4--