RE: css resources location

2010-03-26 Thread corneliu.petrescu
Hmm...
 Open the resulting war file and check that the path is correct.
 At the project im working on the CSS file is outside the
WEB-INF/classes folder and with the aproach i mentioned it works.
 war structure is like this: 
project.war -> css
-> WEB-INF
-> ...

Hope it helps.
 
 
 
On Thu, 2010-03-25 at 18:23 -0300, Matias Pansa wrote:
> Thanks for the quick response , i try this way and it's not working . 
> The href is correct but the css file it's not loaded , even try using the 
> same lines included in the wicket example app for netbeans 
> using StyleSheetReference (...) and nothing.
> In the example app the style.css file is in the same folder with the java and 
> html files , the example works ok.
> 
> By now i just forget the images , just trying to make de css file work ,  
> href="resources/com.com.myapp.HomePage/My.css" 
> but the page is not showin the css atributes.
>  
> 
> 
> 
> > Subject: Re: css resources location
> > From: corneliu.petre...@theredpoint.ro
> > To: users@wicket.apache.org
> > Date: Thu, 25 Mar 2010 19:25:03 +0200
> > 
> > You've probably got the path wrong.
> > Try: 
> >  String contextPath =
> > ((WebRequest)getRequest()).getHttpServletRequest().getContextPath();
> >  construct path like this
> >  String path = contextPath + relative_css_path;
> > CSSPackageResource.getHeaderContribution(path);
> > 
> > 
> > On Thu, 2010-03-25 at 14:08 -0300, Matias Pansa wrote:
> > 
> > > 
> > > 
> > > Hi , i'm new to wicket . I been searching in the list archive for css 
> > > resource problems but i can't found a solution .
> > > My app is developed under netbeans and there's no way to make de css ( 
> > > file or html embedded ) to work with wicket .
> > > I try almost every way that i found on the archive of this list , but 
> > > nothing work.
> > > When i preview the html in the browser everything is ok , css ,images etc 
> > > , but when i deploy to tomcat only css is rendered ok , images are not 
> > > showed.
> > > 
> > > here is what i've used :
> > > 
> > > 1 - css embedded in the html file , css is ok but images are no showed , 
> > > i try almost every path ( background-image : url(" ") ... ) posible to 
> > > the images , same as the html and java  files , web folder , web-inf , 
> > > image folder , resources ,etc. I check that resource images are in the 
> > > war file.
> > > 
> > > 2-  tag with headercontributor.forcss(...) , css and images 
> > > not working at all in every folder of the app.
> > > 
> > > 
> > > I try almost every solution found on the mail list , nothing works to 
> > > show the images , so now i'm lost , the most basic solution was put all 
> > > the css code in the html file and nothing.
> > > 
> > > here is the tree of the app in netbeans :
> > > 
> > > Shirosecurity -
> > > 
> > >   -web pages
> > > 
> > >-meta-inf
> > >-web-inf
> > > 
> > >   -configuration files
> > > 
> > >   -server resources
> > >  
> > >   -sourcepackages
> > > 
> > >-com.myapp.wicket
> > > 
> > >--- java and html files
> > > 
> > >   -test packages
> > > 
> > >   -libraries
> > > 
> > > 
> > > i would apreciate any help on this.
> > > 
> > > 
> > > 
> > > 
> > >  
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > _
> > > Mirá tus emails ¡cuando te llegan! Hotmail actualiza tu bandeja de 
> > > entrada automáticamente. Ver más
> > > http://www.descubrewindowslive.com/hotmail/actualizacion-guardado.asp
> > 
> > 
> 
> _
> Mirá tus emails ¡cuando te llegan! Hotmail actualiza tu bandeja de entrada 
> automáticamente. Ver más
> http://www.descubrewindowslive.com/hotmail/actualizacion-guardado.asp



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



Re: Ajax refresh problem with WebMarkupContainer and CSS class in DeploymentMode

2010-03-26 Thread PDiefent

Because it is urgent, I tried some changes without success. 
It seems to be the AjaxFallBackLink in the dataview, wich causes the table
not to be shown when the page shows up. 
Is there any other possibility to show a modal window without an AjaxLink?

Here is some code of the dataview with the link ...

dataView = new DataView("sorting", dp) {
private static final long serialVersionUID = 1L;

/*
 * (non-Javadoc)
 * @see 
org.apache.wicket.markup.repeater.data.DataViewBase#onDetach()
 */
@Override
protected void onDetach() {
super.onDetach();
}

/*
 * (non-Javadoc)
 * @see
org.apache.wicket.markup.repeater.RefreshingView#populateItem(org.apache.wicket.markup.repeater.Item)
 */
@Override
protected void populateItem(final Item item) {
WebConfig con = (WebConfig) 
item.getModelObject();
AjaxLink detailLink = new 
AjaxLink("detailLink") {
private static final long 
serialVersionUID = 1L;

@Override
public void onClick(AjaxRequestTarget 
target) {
WebConfig item = (WebConfig) 
getParent()
.getDefaultModelObject();
LOGGER.debug("show details " + 
item.getKey() + " ...");

modalNewConfig.setTitle("Configuration Parameter - Details");
modalNewConfig.setContent(new
NewConfigPanel(modalNewConfig.getContentId(),
item, true, 
feedback,modalNewConfig));
modalNewConfig.show(target);

target.appendJavascript("document.getElementById('inKey').focus()");
}
};
item.add(detailLink);

detailLink.add(new Label("key",con.getKey()));

...

Thanks in advance, Peter
-- 
View this message in context: 
http://old.nabble.com/Ajax-refresh-problem-with-WebMarkupContainer-and-CSS-class-in-DeploymentMode-tp27998174p28039133.html
Sent from the Wicket - User 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: Caching components

2010-03-26 Thread Martin Sachs
We have a lot of Repeating views, which containing a lot of components,
which also contains repeatingviews.

To know would should be rendered, we load some hopefully small
(listsizes, objectbyId, ...) datas from DB in the constructor and/or in
onBeforeRender and in isVisible. You are right, this is not a
recommented way. Most of the time is database-loading and wicket has no
performance-problem for us. We profile our application and never found
wicket-components as hotspots.

One reason for loading some data in contstructur or onBeforeRender is to
prevent creating huge hierarchies. This is faster than override
isVisible(), since isVisible would called more than one times.

For our usecase the responsetime is much faster with HTML-Caching,
because the Database-calls are minimized. We save the time for creating
componentshierarchies (all three categories) with loading data.


Martin

Jeremy Thomerson schrieb:
>
> On Wed, Mar 24, 2010 at 3:26 AM, Martin Sachs  > wrote:
>
> hi,
>
> we need caching of components, since the construction of huge
> hierarchies is not cheap. The rendering ist fast. We cache the
> rendered
> HTML of a hole component via a beheaviour and write them on the next
> requests into a Label (unescaped). So instead of creating the complete
> hierarchie on every request, we create a much smaller one. But you
> must
> check, that the cachable components are stateless. Also we have JQuery
> for client-effects in this components, this would also be cached.
>
> The performance is much better with that: approx. 10-50 times better:
>100ms with cache (the response time is not much depending on count
> of users)
>vs
>1500 ms without cache depending how many parallel user
>
>
> A 15x gain is a big statement to make.  Can you please break this
> 1500ms down into at least the following categories:
>
> 1 - time in IModel#getObject() and all child calls of this (IOW,
> loading data)
> 2 - time in constructor of components (without loading data in the
> constructor - hopefully you're not doing this)
> 3 - time in rendering of components
>
> That would be a much better number to give other users.  I have NEVER
> seen where creating / rendering components could take 1400ms - unless
> you're doing something wrong like database calls in your component
> constructors.  So, I suspect that most of that 1400ms (I would guess
> at least 1250ms) is in your model loading.
>
> The only time I've seen (or seen proof of) the component hierarchy
> actually be the slow part of a Wicket page is if you were displaying a
> repeating view of some sort with thousands of rows and each row had a
> bunch of components in it - leading to tens of thousands of components
> being built in the hierarchy.
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com


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



Re: DatePicker and visibility of the parent component

2010-03-26 Thread Leo . Erlandsson
We had the same problem. It probably can be solved in a better way (but 
that would require a RFE and changes to Wicket), but we used a quick and 
easy solution (tm).

Instead of actually setting isVisible() on the Date Picker, we just hide 
it using CSS. I don't know if this is applicable in your use case with 
wicket:enclosure.


@Override
public void onRendered(Component component) {
if (!isReadOnly()) {
super.onRendered(component);
} else {
Response response = component.getResponse();
response.write("\n");
super.onRendered(component);
response.write("\n");
}

}
});

We're using isReadOnly() (non-standard Wicket method) to determine if 
DatePicker should be visible or not. You probably could be using 
setVisible() isVisible() using overrides and some tweaks.

>Hi,

>I have date picker added to a date field.

>DateTextField field = new DateTextField("field", "-MM-dd");

>field1.add(new DatePicker());

>If the section the date picker is in is visible there is no problem. If 
the
>section is not visible using wicket:enclosure, I get an error:
>
http://localhost:8080/resources/org.apache.wicket.extensions.yui.YuiLib/calendar/calendar.jsUncaught

>TypeError: Cannot read property 'id' of null


Re: Inject Dao ( with JPA impl) into Wicket without Spring ?

2010-03-26 Thread Per Lundholm
We have put all lookup in the wicket application class. Thus all pages
do: getApplication().getWhatEverService().

I belive this make unit testing a bit easier since you mock the
application the same way every time.

/Per

On Tue, Mar 23, 2010 at 6:05 PM, smallufo  wrote:
> 2010/3/24 smallufo 
>
>> Thank you , I tried it , and it can successfully
>> inject EntityManagerFactory into a WebPage ,
>> But it seems unable to inject EntityManager , is it because of some
>> thread-safe limitation here ?
>>
>>
> Sorry , I meant wicket-contrib-javaee here.
>
>
>
>>  2010/3/23 Major Péter 
>>
>>> I think yes, Wicket is already depending on cglib, so you could create
>>>
>>> something like this:
>>>
>>> http://fisheye6.atlassian.com/browse/wicket/branches/wicket-1.4.x/wicket-spring/src/main/java/org/apache/wicket/spring/SpringBeanLocator.java?r=HEAD
>>> or for non-spring code check out the wicketstuff javaee-inject project.
>>>
>>> Best Regards,
>>> Peter
>>>
>>
>

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



Re: AjaxSubmitLink not calling the onsubmit event handler

2010-03-26 Thread Anantha Kumaran
Did you get a resolution to this issue? I have the same problem.


currently i am using this techniques to do the my stuff.But it
breaks when the user press return key.

  // save this so we can call it later
var wicketOnClick = ajaxSubmitLink.onclick;
ajaxSubmitLink.onclick = function() {
 // do your stuff
 return wicketOnClick();
};

Is this expected behavior I wonder, or a bug?

>
> SubmitLink will call the 's onsubmit='???' handler,
> AjaxSubmitLink does not.
>
>
AFAIK AjaxSubmitLink doesn't fire the submit event. Is serializes the form
data and then makes a post call. I guess this
 can't be fixed easily because wicket is using *inline event registration
model*.




> On 4 January 2010 23:05, Anantha Kumaran  wrote:
> > hi pieter
> >
> > my problem is that the AjaxSubmitLink is not behaving like the SubmitLink
> > which calls the onsubmit before submitting
> > the form.currently i am using the mousedown(can't use onclick) of the
> > AjaxSubmitLink to do the validation stuffs but it breaks when the user
> > submit the form by pressing the return.
> >
> >
> >
> >
> > On Mon, Jan 4, 2010 at 12:03 AM, Pieter Degraeuwe <
> > pieter.degrae...@systemworks.be> wrote:
> >
> >> If you want to do some additional stuff, you can do it in the form a a
> >> Behaviour.. I did use such behaviour to ask a javascript confirm. If
> user
> >> does not confirm, the form is not submitted.
> >>
> >> new AttributeModifier("onclick", true, new Model("if
> (!confirm('" +
> >> msg + "')) { /* do some additional stuff if not confirmed*/return;} else
> {
> >> /*do some stuff beform submitting the form*/}")) {
> >>@Override
> >>protected String newValue(String currentValue, String
> >> replacementValue) {
> >>return replacementValue + currentValue;
> >>}
> >>};
> >>
> >> On Mon, Jan 4, 2010 at 5:30 AM, Anantha Kumaran <
> ananthakuma...@gmail.com
> >> >wrote:
> >>
> >> > is there any way to do this on the client side.I want to do some
> client
> >> > side
> >> > stuff before submitting the form.
> >> >
> >> > On Sun, Jan 3, 2010 at 9:36 AM, Mathias Nilsson <
> >> > wicket.program...@gmail.com
> >> > > wrote:
> >> >
> >> > >
> >> > > form.add ( new AjaxSubmitLink(){
> >> > >
> >> > > protected void onSubmit(AjaxRequestTarget target, Form form){
> >> > >   // Add  feedback and do ajax stuff.
> >> > > }
> >> > >
> >> > > protected void onError(AjaxRequestTarget target, Form form){
> >> > >   // Add FeedbackPanel here
> >> > >   target.add( feedback );
> >> > > }});
> >> > > --
> >> > > View this message in context:
> >> > >
> >> >
> >>
> http://old.nabble.com/AjaxSubmitLink-not-calling-the-onsubmit-event-handler-tp2718p27002962.html
> >> > > Sent from the Wicket - User 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
> >> > >
> >> > >
> >> >
> >>
> >>
> >>
> >> --
> >> Pieter Degraeuwe
> >> Systemworks bvba
> >> Belgiëlaan 61
> >> 9070 Destelbergen
> >> GSM: +32 (0)485/68.60.85
> >> Email: pieter.degrae...@systemworks.be
> >> visit us at http://www.systemworks.be
> >>
> >
>
>
>
> --
> Richard Nichols :: http://www.visural.com/ ::
> http://www.richardnichols.net/
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 

Anantha Kumaran(http://ananthakumaran.github.com)


Re: RE: RE: RE: Regarding TreeTable Horizontal Scrollbar

2010-03-26 Thread KameshBh

Hi,

I am new to the Wicket and am trying out the TreeTable example. I am facing
a more fundmental issue. I am unable to give a fixed width to the middle
columns. I can only specify the Unit as Proportional which is dividing the
columns proportionally within the available space. Because of this I don't
even see where horizontal scrollbar can be used with the table. The total
width of the table seems to remain same no matter how many coloumns I add.
Is there a way to change this behaviour so that I can specify fixed widths
to all the columns?

regards,
Kamesh


Leo Erlandsson wrote:
> 
> Hi,
> 
> Still a CSS issue, not a Wicket one ;)
> 
> I used Google to search for "css table locked column scroll"
> 
> First result was a good StackOverflow-question:
> http://stackoverflow.com/questions/296020/how-can-i-lock-the-first-row-and-first-column-of-a-table-when-scrolling-possibly
> 
> Try the Horizontal Scrollbar in the example mentioned in the Accepted 
> StackOverflow answer:
> http://www.cubido.at/Portals/7/docs/Blog/Karin/HTML%20and%20Javascript/ResizeColumns/Table.htm
> 
> Source here: 
> http://www.cubido.at/Portals/7/docs/Blog/Karin/HTML%20and%20Javascript/ResizeColumns.zip
> 
> 
> Seems to be what you're looking for. 
> 
> 
> 
>>Thanks to have your valuable reply & effort you made to answer my query. 
> But let me to explain you again my problem statement because this solution 
>>won't help me to fix the issue I have. I need a CSS style at TreeTable 
> markup level so that the Horizontal Scrollbar would be a part of TreeTable 
>>component. Here is my problem statement:
> 
>>In my application, there are two scenarios: 
> 
>>1) I need an entire table to be scrollable horizontally &
>>2) Horizontal scrolling on entire table except the tree node column.
> 
>>Now I tried with changing both TreeTable markup & CSS attribute but 
> couldn't get success. I am using wicket 1.4.5 version.
> 
>>Actually the problem statement is, in my application, I need a TreeTable 
> where first column should contain the data in a tree structure & rest 
> others >column will be the simple one. So, I used TreeTable 
> wicket-extension component to get the requirement fulfill but the problem 
> arises when table has >many number of columns then the table should be 
> horizontally scrollable. And as per my analysis, this existing treetable 
> component doesn't provide >this feature.
> 
>>Could you please let me know that whether it's possible to customize 
> component for above mentioned requirement? And if yes, then guide me to do 
> this >otherwise please let me know what would be the other approach.
> 
> 
> 
> -
> ---
> Leo Erlandsson, M. Sc.
> 

-- 
View this message in context: 
http://old.nabble.com/Regarding-TreeTable-Horizontal-Scrollbar-tp27901312p28039590.html
Sent from the Wicket - User 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: Caching components

2010-03-26 Thread Jan Kriesten

Hi Martin,

> One reason for loading some data in contstructur or onBeforeRender is to
> prevent creating huge hierarchies. This is faster than override
> isVisible(), since isVisible would called more than one times.

why are you loading data in the component at all? There is this nice
'LoadableDetachableModel' which could/should wrap that...

Best regards, --- Jan.


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



Re: Re: RE: RE: RE: Regarding TreeTable Horizontal Scrollbar

2010-03-26 Thread Leo . Erlandsson
Take a look at

http://www.wicketframework.org/wicket-extensions/apidocs/wicket/extensions/markup/html/tree/table/ColumnLocation.html

Specifying fixed size column should be no harder than adding them as LEFT 
or RIGHT columns instead of MIDDLE Column. MIDDLE column cannot have a 
fixed width.

You should, however, be aware of a JavaScript i TreeTable that does 
resizing, see method init() in TreeTable:

// Attach the javascript that resizes the header according to the body
// This is necessary to support fixed position header. The header does
// not
// scroll together with body. The body contains vertical scrollbar. The
// header width must be same as body content width, so that the columns
// are properly aligned.

Maybe you need to remove this, or at least modify the behavior...

Or, you could always do as I did in my example - specify the width of the 
treetable greater than the size of the enclosing div (see earlier 
examples).



>Hi,

>I am new to the Wicket and am trying out the TreeTable example. I am 
facing
>a more fundmental issue. I am unable to give a fixed width to the middle
>columns. I can only specify the Unit as Proportional which is dividing 
the
>columns proportionally within the available space. Because of this I 
don't
>even see where horizontal scrollbar can be used with the table. The total
>width of the table seems to remain same no matter how many coloumns I 
add.
>Is there a way to change this behaviour so that I can specify fixed 
widths
>to all the columns?

regards,
Kamesh


Re: Caching components

2010-03-26 Thread Martin Sachs
Yes we use LoadableDetachableModel. But we also do some times
getModel().getObject() deeper in hierarchy inside the construction, to
e.g. set the visibility of a panel or to create just the right panel,
instead of creating e.g. ten panels and implement isVisible().

Martin
   

Jan Kriesten schrieb:
> Hi Martin,
>
>   
>> One reason for loading some data in contstructur or onBeforeRender is to
>> prevent creating huge hierarchies. This is faster than override
>> isVisible(), since isVisible would called more than one times.
>> 
>
> why are you loading data in the component at all? There is this nice
> 'LoadableDetachableModel' which could/should wrap that...
>
> Best regards, --- Jan.
>
>
>   


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



Re: Caching components

2010-03-26 Thread Martijn Dashorst
I'd wrap the getModel().getObject() in accessor methods to hide the
fact that you do that. getContract() is so much more legible than
getModel().getObject()

Martijn

On Fri, Mar 26, 2010 at 10:59 AM, Martin Sachs  wrote:
> Yes we use LoadableDetachableModel. But we also do some times
> getModel().getObject() deeper in hierarchy inside the construction, to
> e.g. set the visibility of a panel or to create just the right panel,
> instead of creating e.g. ten panels and implement isVisible().
>
> Martin
>
>
> Jan Kriesten schrieb:
>> Hi Martin,
>>
>>
>>> One reason for loading some data in contstructur or onBeforeRender is to
>>> prevent creating huge hierarchies. This is faster than override
>>> isVisible(), since isVisible would called more than one times.
>>>
>>
>> why are you loading data in the component at all? There is this nice
>> 'LoadableDetachableModel' which could/should wrap that...
>>
>> Best regards, --- Jan.
>>
>>
>>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.4 increases type safety for web applications
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4

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



Re: Wicket JavaScript Library Integration - A Common Base

2010-03-26 Thread Uwe Schäfer

Uwe Schäfer schrieb:

Hi Cemal,


I was thinking that it could possibly be sensible to have another
project where we abstract out the mechanisms wiQuery provides for
resources and JavaScript statements. 


to keep that topic alive: do you agree that providing a unified way for 
component authors to contribute standard libs to the page, as well as 
coordinating these dependencies on the page level is a primary goal of 
creating this lib?


cu uwe


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



testing JS in WicketTester

2010-03-26 Thread Pierre Goupil
Good morning,

Is there any way to test JavaScript code in WicketTester? I know of
Selenium-based solutions, but I think that's too much heavyweight. Plus, I'd
really like to unit test my rendering & JS behavior. In a similar way than
with YUI test, but for my homegrown JS.

A recommandation, anyone?

Thanks in advance,

Pierre

-- 
Les deux règles universelles du bide :

1) on n'explique pas un bide

2) dans le futur, un bide sera toujours un bide.


AjaxFormComponentUpdatingBehavior

2010-03-26 Thread Björn T .
Hello,

 

thanx for wicket!!! it is a joy working with this great framework!

 

I would need some help with an Ajax enabled table. It would be very great if 
some one could give me a hint on this.

 

I have a DateTextField with a DatePicker, once the content is changed i want 
the tabelcontent (rows) to be updated.

 

I added a AjaxFormComponentUpdatingBehavior("onchange") to my textfield.

 

...

travelstartDateTextField.add(new AjaxFormComponentUpdatingBehavior("onchange") {
    @Override
    protected void onUpdate(AjaxRequestTarget target) {
   if (target != null) {
 target.addComponent(StartPageForm.this.availableCategoriesContainer);
  }
   }
});

...

 

the availableCategoriesContainer contains the AjaxFallbackDefaultDataTable. A 
"SortableDataProvider" feeds the data to the table. The method getting the rows 
for the tabel is sometimes slow...

 

The table contains an action panel to select one of the rows...

 

now: everything work just fine normaly... but...

 

sometimes I get this strange error:

WicketMessage: org.apache.wicket.WicketRuntimeException: component 
inputForm:availableCategoriesContainer:table:rows:1:cells:4:cell:select not 
found on page de.rbag.web.reservation.pages.StartPage[id = 23], listener 
interface = [RequestListenerInterface name=ILinkListener, method=public 
abstract void org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()]

 

I gues it has something to do with the fact that the ajax hasn't finished yet...

 

what would be a good way to avoid, that users click on the select-button on a 
table-row before the ajax request is finished?

 

it would be very great to here from you, since i am almost finished with my app 
but this keeps me from enrolling...   :-(

 

Thanx a lot in advance

Cheers Björn
___
WEB.DE DSL: Internet, Telefon und Entertainment für nur 19,99 EUR/mtl.!
http://produkte.web.de/go/02/

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



Re: Wicket JavaScript Library Integration - A Common Base

2010-03-26 Thread nino martinez wael
I like the idea as well :)

2010/3/19 Cemal Bayramoglu :
> There's been plenty of encouraging feedback about wiQuery [1] and how
> cleanly it integrates jQuery and makes it easy to use in a Wicket app.
> We also get lots of questions, sometimes unrelated to wiQuery, about
> how to integrate other JavaScript libraries.
>
> I was thinking that it could possibly be sensible to have another
> project where we abstract out the mechanisms wiQuery provides for
> resources and JavaScript statements. People could then build on this
> base to integrate their preferred JavaScript libraries (eg YUI, extJS,
> Prototype ...). I would even see wiQuery being potentially refactored
> to use such a base framework.
>
> Any thoughts?
>
> Regards - Cemal
> jWeekend
> OO & Java Technologies, Wicket
> Consulting, Development, Training
> http://jWeekend.com
>
> [1] http://code.google.com/p/wiquery/
>
> -
> 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



Wicket on GAE with Facebook Connect - doesnt work after deploying / HTTP 500 error

2010-03-26 Thread christoph glass
Hi everyone,

I'm trying to run a simple Wicket Application with Facebook Connect on
Google App Engine.

So far it runs local, but when I deploy to Google Facebook Connect wont
work.

I cant find any examples for using wicket with gae and facebook on the
web. Is anyone here who successfully made it?

Here is the output from ajax debug window:

---
INFO: Using XMLHttpRequest transport
INFO: 
INFO:
Initiating Ajax GET request on 
?wicket:interface=wicket-9:36:fbconnectpanel::IActivePageBehaviorListener:0:&wicket:ignoreIfNotActive=true&random=0.6834228196057528
INFO: Invoking pre-call handler(s)...
ERROR: Received Ajax response with code: 500
ERROR: 500 error had text: 


500 Server Error


Error: Server Error
The server encountered an error and could not complete your request.If 
the problem persists, please http://code.google.com/appengine/community.html";>report your problem 
and mention this error message and the query that caused it.



INFO: Invoking post-call handler(s)...
INFO: Invoking failure handler(s)...
---

FacebookConnectPanel.java -> took the most from
http://cwiki.apache.org/WICKET/adding-facebook-connect.html

---
package polizeiwache.sites.auth.facebookconnect;

import java.io.IOException;


import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.wicket.Page;
import org.apache.wicket.ajax.AbstractDefaultAjaxBehavior;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.behavior.SimpleAttributeModifier;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.protocol.http.WebResponse;
import org.apache.wicket.protocol.http.servlet.ServletWebRequest;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import
org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.GrantedAuthorityImpl;
import org.springframework.security.core.context.SecurityContext;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.core.context.SecurityContextImpl;

import pojos.FacebookUser;

//import com.facebook.api.FacebookException;
//import com.facebook.api.FacebookJsonRestClient;
//import com.facebook.api.FacebookWebappHelper;
//import com.facebook.api.ProfileField;

import com.google.code.facebookapi.FacebookException;
import com.google.code.facebookapi.FacebookJsonRestClient;
import com.google.code.facebookapi.FacebookWebappHelper;
import com.google.code.facebookapi.ProfileField;


//import
com.google.appengine.repackaged.org.apache.commons.logging.impl.LogFactoryImpl;

/**
 * @see http://cwiki.apache.org/WICKET/adding-facebook-connect.html
 * @author christoph
 *
 */

@SuppressWarnings("deprecation")
public class FacebookConnectPanel extends Panel 
{

/**
 * 
 */
private static final long serialVersionUID = -5912681574741410118L;

//private static final
com.google.appengine.repackaged.org.apache.commons.logging.Log log =
LogFactoryImpl.getLog(FacebookConnectPanel.class);
private WebMarkupContainer fbloginDiv;
private Label fblogin;

/**
 * 
 * @param id
 */

public FacebookConnectPanel(String id) {
super(id);
}

/**
 * This method will the panel
 */

public void createPanel() {
fbloginDiv = new WebMarkupContainer("fbloginDiv");
fbloginDiv.setOutputMarkupId(true).setMarkupId("fbloginDiv");
fblogin = new Label("fblogin", "");
fblogin.setEscapeModelStrings(false);
fblogin.setOutputMarkupId(true);
if (isAuthenticated()) 
{
fbloginDiv.add(new SimpleAttributeModifier("style",
"display:none;"));
}
fbloginDiv.add(fblogin);
addOrReplace(fbloginDiv);

/**
 * This will only be called after they're logged in via facebook
 */

final AbstractDefaultAjaxBehavior behave = new
AbstractDefaultAjaxBehavior() 
{
/**
 * 
 */
private static final long serialVersionUID = 
-486358491644699655L;

protected void respond(final AjaxRequestTarget target) 
{
// deal with facebook
try {

handleFacebookCallback(target.getPage());
} catch (IOException e) {
e.printStackTrace();
}
fbloginDiv.add(new SimpleAttributeModifier("style",
"display:none;"));
 

Re: Wicket and Reverse Proxy

2010-03-26 Thread T Ames
H... No responses.  Maybe I can attack this little by little.

When an AJAX response is sent back to the browser, is there a way to stop
Wicket from sending the 
elements?  These