Re: custom component using jQuery in modal window

2015-05-29 Thread Erik de Hair


On 05/18/2015 03:46 PM, Dan Haywood wrote:

If you fancy sharing your code on github, we could make it available as an
isisaddon (or bring into Isis proper?)
Will do that. Need to refactor a bit because of used package names and 
some code smells.


cheers
Dan

On 18 May 2015 at 14:13, Erik de Hair e.deh...@pocos.nl wrote:


I created a component StringPanelWithInstruction with following html

div class=stringPanel scalarNameAndValueComponentType
 label for=scalarValue wicket:id=scalarIfRegular
   span wicket:id=scalarName
class=scalarName[Label text]/span
   span class=scalarValue
   input type=text name=scalarValue
wicket:id=scalarValue /
   span wicket:id=instructionPanel
class=instructionPanel/span
   span wicket:id=feedback/span
 span wicket:id=additionalLinks/
   /span
 /label
 label wicket:id=scalarIfCompact/label

 wicket:fragment wicket:id=tooltip-fragment
 span wicket:id=content[content]/span
 /wicket:fragment
 /div
 /wicket:panel

The instructionPanel got rendered with the correct background-icon and the
tooltip showed up on entity pages and view models. This didn't happen in
modal windows (when starting an action). I thought this had to do with some
jQuery code not being added to the html, but in the wicket debugger the
jquery-code did show up.

It appeared the tooltip didn't show up because of the large z-index of the
modal dialog. I've got it working now.

Erik


On 05/18/2015 01:07 PM, Martin Grigorov wrote:


Hi,

What exactly you have tried?
Please show us some code.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Mon, May 18, 2015 at 1:19 PM, Erik de Hair e.deh...@pocos.nl wrote:

  Hi,

I've written a custom component for displaying a 'help'-icon with a
tooltip (using [1]) next to a String-field. This does work when the
String-panel is rendered in an entity form or view model. When rendered
in
a modal window though (after calling an action with params), the icon is
shown but the tool tip isn't. It looks like no jquery-code for attaching
the tooltip to the component is added to the html in this case.

I tried to do this like the JodaLocalDatePanel but with no effect. Any
idea?

Thanks,
Erik

[1] http://www.7thweb.net/wicket-jquery-ui/tooltip/CustomTooltipPage






Re: custom component using jQuery in modal window

2015-05-18 Thread Erik de Hair

I created a component StringPanelWithInstruction with following html

div class=stringPanel scalarNameAndValueComponentType
label for=scalarValue wicket:id=scalarIfRegular
  span wicket:id=scalarName 
class=scalarName[Label text]/span

  span class=scalarValue
  input type=text name=scalarValue 
wicket:id=scalarValue /
  span wicket:id=instructionPanel 
class=instructionPanel/span

  span wicket:id=feedback/span
span wicket:id=additionalLinks/
  /span
/label
label wicket:id=scalarIfCompact/label

wicket:fragment wicket:id=tooltip-fragment
span wicket:id=content[content]/span
/wicket:fragment
/div
/wicket:panel

The instructionPanel got rendered with the correct background-icon and 
the tooltip showed up on entity pages and view models. This didn't 
happen in modal windows (when starting an action). I thought this had to 
do with some jQuery code not being added to the html, but in the wicket 
debugger the jquery-code did show up.


It appeared the tooltip didn't show up because of the large z-index of 
the modal dialog. I've got it working now.


Erik

On 05/18/2015 01:07 PM, Martin Grigorov wrote:

Hi,

What exactly you have tried?
Please show us some code.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Mon, May 18, 2015 at 1:19 PM, Erik de Hair e.deh...@pocos.nl wrote:


Hi,

I've written a custom component for displaying a 'help'-icon with a
tooltip (using [1]) next to a String-field. This does work when the
String-panel is rendered in an entity form or view model. When rendered in
a modal window though (after calling an action with params), the icon is
shown but the tool tip isn't. It looks like no jquery-code for attaching
the tooltip to the component is added to the html in this case.

I tried to do this like the JodaLocalDatePanel but with no effect. Any
idea?

Thanks,
Erik

[1] http://www.7thweb.net/wicket-jquery-ui/tooltip/CustomTooltipPage





Re: custom component using jQuery in modal window

2015-05-18 Thread Martin Grigorov
Hi,

What exactly you have tried?
Please show us some code.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Mon, May 18, 2015 at 1:19 PM, Erik de Hair e.deh...@pocos.nl wrote:

 Hi,

 I've written a custom component for displaying a 'help'-icon with a
 tooltip (using [1]) next to a String-field. This does work when the
 String-panel is rendered in an entity form or view model. When rendered in
 a modal window though (after calling an action with params), the icon is
 shown but the tool tip isn't. It looks like no jquery-code for attaching
 the tooltip to the component is added to the html in this case.

 I tried to do this like the JodaLocalDatePanel but with no effect. Any
 idea?

 Thanks,
 Erik

 [1] http://www.7thweb.net/wicket-jquery-ui/tooltip/CustomTooltipPage