onclick ajax event stops working when adding onmouseover

2011-07-17 Thread rebecca
Hello friends,

I have a problem i don't understand:
I have a list view of columns (inside a list view of rows). When i add an
ajaxEventBehaviour("onckick") to each col item - it works.
When i add another ajaxEventBehaviour("onmouseover") - the mouse over works
but the onclick stops working (it does not enter the onEvent()).

What am i doing wrong?

here's my code:

timeSlotsListView = new ListView>(
"timeSlotsLists", new PropertyModel(this, 
"timeSlotsLists")) {

@Override
public void populateItem(final 
ListItem>
row) {

List timeSlotsPerDate = 
row.getModelObject();
row.add(new AttributeModifier("class", true, new
AbstractReadOnlyModel() {

@Override
public String 
getObject() {

return 
(row.getIndex() % 2 == 1) ? "even" : "odd";
}
}));

row.add(new 
ListView("timeSlotsPerDate",
timeSlotsPerDate) {

@Override
protected void populateItem(final 
ListItem col) {

final MeetingTimeSlot 
meetingTimeSlot = (MeetingTimeSlot)
col.getModelObject();
final WebMarkupContainer 
timeSlotContainer = new
WebMarkupContainer("timeSlotContainer");
Label timeRangeLabel = new 
Label("timeRangeLabel",
meetingTimeSlot.getTimeRange());

timeSlotContainer.add(timeRangeLabel);


timeSlotContainer.setOutputMarkupId(true);
timeSlotContainer.add(new 
AjaxEventBehavior("onclick") {

protected void 
onEvent(AjaxRequestTarget target) {


System.out.println("in timeSlotContainer onclick");


prevTimeSlotContainer.add(new SimpleAttributeModifier("style",
"color: #6A6A6A"));

target.addComponent(prevTimeSlotContainer);


getPanelModelObject().setMeetingTimeSlot(

(MeetingTimeSlot) col.getModelObject());

getPanelModelObject().setMeetingBranchLogin(branchAvailabilityData.getBranchLogIn());

selectedMeetingDateContainer.setVisibilityAllowed(true);

target.addComponent(selectedMeetingDateContainer);


timeSlotContainer.add(new SimpleAttributeModifier("style", "color:
red;"));

target.addComponent(timeSlotContainer);

prevTimeSlotContainer = timeSlotContainer;
};

});

timeSlotContainer.add(new 
AjaxEventBehavior("onmouseover") {

protected void 
onEvent(AjaxRequestTarget target) {


System.out.println("in timeSlotContainer onmouseover");

timeSlotContainer.add(new AttributeModifier("class", true, new
Model("even")));

target.addComponent(timeSlotContainer);
};

});

timeSlotContainer.add(new 
AjaxEventBehavior("onmouseout") {

protected void 
onEvent(AjaxRequestTarget target) {


System.out.println("in timeSlotContainer onmouseout");
String bgStyle 
= (row.getIndex() % 2 == 1) ? "even" : "odd";

timeSlotContainer.add(new AttributeModifier("class", tru

Re: Loading wicket components from javascript

2011-07-17 Thread msj121
I am not sure if it is still true, but if you have the label added, just the
visibility is false from the beginning, then in older versions of wicket it
would not actually put the component, even the placeholder. I dealt with
this before, but I think in newer versions presumably this was changed
In theory a good way to check if this is an issue is to setvisible to true
in the beginning and alternate.


If your trying to add a new markup that never existed in html to the page,
it should throw an error, and then you will need to use ListViews etc... as
described above.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Loading-wicket-components-from-javascript-tp3673381p3674372.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How to change the tag proceduced by

2011-07-17 Thread Clint Checketts
Mount your page to give it a custom URL.

Not sure if you wanted an answer to your email subject since this email
isn't related to the email subject(maybe I'm missing some previous messages
and context?)

-Clint

On Sun, Jul 17, 2011 at 9:44 AM, mrblobby  wrote:

> I cant get this to work.  The maven dir structure is :
> src/main/java/com/mydomain/myweb/pages
>
> So what should I put instead of package1? I have tried:
>
> pages/MyPage.html
>
> I dont want to have to put: com/mydomain/myweb/pages/MyPage.thml because on
> the production system, the webapp will be renamed to ROOT before deployment
> to tomcat. and the example dont do this.
>
> any ideas?
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/How-to-change-the-em-tag-proceduced-by-wicket-link-tp1870756p3673524.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Problem with SCRIPT Tag in Ajax-Response in Wicket 1.5 RC5.1

2011-07-17 Thread Sergiy Barlabanov
Done:
https://issues.apache.org/jira/browse/WICKET-3912


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Problem-with-SCRIPT-Tag-in-Ajax-Response-in-Wicket-1-5-RC5-1-tp3667783p3673964.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Loading wicket components from javascript

2011-07-17 Thread Michael Petritsch
Thanks, gonna try this.

I hope this also works for adding Components with subcomponents (e.g.
Tables, Panels etc.) and I don't have to manually
Wicket...appendChild() all the subcomponents in js.

On Sun, Jul 17, 2011 at 5:38 PM, Bertrand Guay-Paquet
 wrote:
> Hi,
>
> Have you seen
> http://wicketinaction.com/2008/10/repainting-only-newly-created-repeater-items-via-ajax/
> ? I used this method to add form inputs via ajax. If I understand correctly
> what you want to do, you should be able to use this for adding labels.
>
> Bertrand
>
> On 17/07/2011 9:23 AM, Michael Petritsch wrote:
>>
>> Hi,
>>
>> is there a way to load wicket components from javascript? I tried the
>> https://cwiki.apache.org/WICKET/calling-wicket-from-javascript.html
>> approach. I tried to add a Label but it wasn't visible on the page. I
>> tried to add a Panel but it never replaced the markupPlaceHolder I
>> added for it. All I can do is send some js back via
>> target.appendJavascript. Am I using it wrong or is there another way
>> to do this?
>>
>> regards,
>> Michael
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Loading wicket components from javascript

2011-07-17 Thread Bertrand Guay-Paquet

Hi,

Have you seen 
http://wicketinaction.com/2008/10/repainting-only-newly-created-repeater-items-via-ajax/ 
? I used this method to add form inputs via ajax. If I understand 
correctly what you want to do, you should be able to use this for adding 
labels.


Bertrand

On 17/07/2011 9:23 AM, Michael Petritsch wrote:

Hi,

is there a way to load wicket components from javascript? I tried the
https://cwiki.apache.org/WICKET/calling-wicket-from-javascript.html
approach. I tried to add a Label but it wasn't visible on the page. I
tried to add a Panel but it never replaced the markupPlaceHolder I
added for it. All I can do is send some js back via
target.appendJavascript. Am I using it wrong or is there another way
to do this?

regards,
Michael

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How to change the tag proceduced by

2011-07-17 Thread mrblobby
I cant get this to work.  The maven dir structure is :
src/main/java/com/mydomain/myweb/pages

So what should I put instead of package1? I have tried:

pages/MyPage.html

I dont want to have to put: com/mydomain/myweb/pages/MyPage.thml because on
the production system, the webapp will be renamed to ROOT before deployment
to tomcat. and the example dont do this.

any ideas?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-change-the-em-tag-proceduced-by-wicket-link-tp1870756p3673524.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: best search engine framework to use with wicket

2011-07-17 Thread Chris Colman
We just use Nutch and let it crawl the site at the page level then it is
completely irrelevant how the data used to produce the pages is stored
or  retrieved.


>-Original Message-
>From: hariharansrc [mailto:hariharan...@gmail.com]
>Sent: Sunday, 17 July 2011 9:24 PM
>To: users@wicket.apache.org
>Subject: Re: best search engine framework to use with wicket
>
>Thank you, Peter i'll keep your valuable suggestion in mind i am having
>another clarification i am having many wicket maven projects each one
>having
>a particular feature how to integrate them all.
>
>--
>View this message in context: http://apache-
>wicket.1842946.n4.nabble.com/best-search-engine-framework-to-use-with-
>wicket-tp3671651p3673224.html
>Sent from the Users forum mailing list archive at Nabble.com.
>
>-
>To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>For additional commands, e-mail: users-h...@wicket.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Loading wicket components from javascript

2011-07-17 Thread Michael Petritsch
Hi,

is there a way to load wicket components from javascript? I tried the
https://cwiki.apache.org/WICKET/calling-wicket-from-javascript.html
approach. I tried to add a Label but it wasn't visible on the page. I
tried to add a Panel but it never replaced the markupPlaceHolder I
added for it. All I can do is send some js back via
target.appendJavascript. Am I using it wrong or is there another way
to do this?

regards,
Michael

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: best search engine framework to use with wicket

2011-07-17 Thread hariharansrc
Thank you, Peter i'll keep your valuable suggestion in mind i am having
another clarification i am having many wicket maven projects each one having
a particular feature how to integrate them all.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/best-search-engine-framework-to-use-with-wicket-tp3671651p3673224.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org