On Wed, Mar 30, 2011 at 10:18 PM, Matthew Pennington <
m...@profounddecisions.co.uk> wrote:
> On 30/03/2011 19:44, Martin Grigorov wrote:
>
>> @Bruno: this is interesting question. You should ask it in scala-users@.
>> I
>> think this should be possible with some implicit declaration.
>>
>> @Matth
On 30/03/2011 19:44, Martin Grigorov wrote:
@Bruno: this is interesting question. You should ask it in scala-users@. I
think this should be possible with some implicit declaration.
@Matthew: Do you use org.apache.wicket.markup.html.form.FormComponentLabel ?
Going through the app and changing all
@Bruno: this is interesting question. You should ask it in scala-users@. I
think this should be possible with some implicit declaration.
@Matthew: Do you use org.apache.wicket.markup.html.form.FormComponentLabel ?
On Tue, Mar 29, 2011 at 11:29 AM, Matthew Pennington <
m...@profounddecisions.co.uk
I personally would suggest *not* having that second line
"component.setMarkupId(component.getId())" there. Let Wicket generate the
IDs for you so that they're all unique on a page. Your approach above
breaks using two EmailAddressTextField (fake example class) components on
the same page.
Des
On Sun, Mar 27, 2011 at 11:43 PM, Bruno Borges wrote:
> For now, I simply did this:
>
> object autoMarkupId extends IComponentInstantiationListener {
> def onInstantiation(component: Component) {
>if (component.isInstanceOf[FormComponent[_]]) {
> component.se
For now, I simply did this:
object autoMarkupId extends IComponentInstantiationListener {
def onInstantiation(component: Component) {
if (component.isInstanceOf[FormComponent[_]]) {
component.setOutputMarkupId(true)
component.setMarkupId(com
You could use an aspect. However, the calling of the
IComponentInstantiationListeners already occurs in-line during the
constructor execution, so adding your logic (which is merely setting a
flag) shouldn't be too much overhead, really. It shouldn't be any
different (other than pushing a stack fr
If this is specific to a particular form you could use A formcompoment
visitor to iterate over each child and call setOutputMarkupId
On Sunday, March 27, 2011, Bruno Borges wrote:
> I was looking for a better way (optimized too) to achieve this, considering
> that I'm using Scala.
>
> I admit I'm
I was looking for a better way (optimized too) to achieve this, considering
that I'm using Scala.
I admit I'm not an expert on Scala though. :-)
Bruno Borges
www.brunoborges.com.br
+55 21 76727099
"The glory of great men should always be
measured by the means they have used to
acquire it."
-
A quick way to set it by default would be to use a
IComponentInitializationListener.
On Sun, Mar 27, 2011 at 8:52 PM, Bruno Borges wrote:
> I'm developing a project with Scala + Wicket and I wanted to set that all
> form components have their markup id output automatically
> (setOutputMarkupId(tr
I'm developing a project with Scala + Wicket and I wanted to set that all
form components have their markup id output automatically
(setOutputMarkupId(true)).
Any idea?
Cheers,
Bruno Borges
www.brunoborges.com.br
+55 21 76727099
"The glory of great men should always be
measured by the means th
11 matches
Mail list logo