Re: integrating extjs with wicket

2008-01-10 Thread Matt Jensen


I would be willing to contribute to this project, but I don't have the 
knowledge of Wicket internals (nor ExtJS internals, really) to pull off 
the core design.  If somebody starts this, he/she can count on a couple 
hours per week from me.


Martijn Dashorst wrote:

Sounds like a good wicketstuff project... Do you care to start one?

Martijn

On Jan 9, 2008 7:02 PM, Paolo Di Tommaso <[EMAIL PROTECTED]> wrote:
  

This is really an interesting topic!

I've made some Wicket-Extjs integration tests and I haven't found any
particular issues to make them work smoothly together.

Extjs UI widgets can be created dynamically or can be attach to existing
HTML elements using the element IDs.

Following the latter approach is quite easy integrate Extjs with Wicket.

The simplest way I've tried is using a behavior to 'attach' an Extjs widget
to Wicket component.

For example:

public class ExtDateFieldBehavior extends ExtAbstractBehavior{

@Override
String getExtjsClassName() {
return "Ext.form.DateField";
}

}

public abstract class ExtAbstractBehavior extends AbstractBehavior {


/**
 * Used to add all common Extjs required JavaScript and CSS resources
 */
@Override
public void bind(Component component) {
if( component == null ) throw new IllegalArgumentException("Argument
cannot be null");
component.setOutputMarkupId(true);
component.add(HeaderContributor.forCss( Extjs.Css.EXT_ALL ));
component.add(HeaderContributor.forJavaScript( Extjs.Js.EXT_BASE ));
component.add(HeaderContributor.forJavaScript(
Extjs.Js.EXT_ALL_DEBUG ));
}


abstract String getExtjsClassName();

abstract String getOptions();

@Override
public void onRendered( Component component ) {
/* create a copy of options */
Config options = new Config( config );
/* initialization */
config(component,options);
/* get the string version */
String sConfig = Extjs.serialize(options);

String extjs = "new " + getExtjsClassName() + "(" + getOptions() +
");";
//TODO log here

Response r = component.getResponse();
r.write( JavascriptUtils.SCRIPT_OPEN_TAG );
r.write( extjs );
r.write( JavascriptUtils.SCRIPT_CLOSE_TAG );
}
}


That's all!

Obviously this is just a simple test but it works and can be extended easily
for other widgets.


What I've found not trivial is to pass/define the Extjs widget
property/configuration in a easy/elegant way.

Would be interesting discuss this...

-- Paolo





On Jan 9, 2008 6:25 PM, Jeremy Fergason <[EMAIL PROTECTED]> wrote:



wicket seems to provide some nice management classes like TextField, that
do
things like set the value for you, I don't see how to integrate this with
a
javascript solution like ExtJs which does not use an 
wrote:

  

What is keeping you from building it?

Martijn

On Jan 9, 2008 6:15 PM, Reinout van Schouwen <[EMAIL PROTECTED]> wrote:


Op woensdag 09-01-2008 om 09:07 uur [tijdzone -0700], schreef Jeremy
Fergason:

  

I'm just starting out with wicket and I would like to use a


client-side


javascript library--ExtJs, to enhance the end user experience.


+1

At my company we use Ext2 and are very enthousiastic about it.
I want to move us from Struts to Wicket but lack of support for Ext2
would be a roadblock...

--
Reinout van Schouwen




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  


--
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







  




Converting tag names in a Panel

2008-03-11 Thread Matt Jensen


Hopefully this is an easy one.  Why does Wicket convert this:



...into this:



...and how do I make it stop doing that?  The key part here is the 
conversion of "fb:tab-item" into "fb:tab_item".


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Converting tag names in a Panel

2008-03-11 Thread Matt Jensen


Oops, looks like Wicket might not be the culprit...

Matt Jensen wrote:


Hopefully this is an easy one.  Why does Wicket convert this:



...into this:



...and how do I make it stop doing that?  The key part here is the 
conversion of "fb:tab-item" into "fb:tab_item".


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How do I force evaluate in a Wizard steps condition to run?

2007-10-01 Thread Matt Jensen


You would probably have to subclass WizardModel, or come up with a new 
IWizardModel implementation completely.  The former will probably 
suffice, unless some strategic methods are declared final.


lizz wrote:

I really dont want to add more steps that the ones I already have. for the
case when step c is no longer valid I woild like the next button to be
disabled and the finish button to be enabled. Isn't there a method for
updating the button panel? 




Kent Tong wrote:
  

lizz wrote:


I have three wizard steps A, B and C
In step B I have a drop down choice. Whether step c is valid or not
depends on the selection in the drop down choice in step B.

Everytime the user changes the selection in the drop down choice the
wizard must be updated (the evaluate method must be run) since for some
selections the next button will be disabled since step b is the last
step, while for other selections c is the last step and the next button
is enabled.

  

When I'd suggest you add an artificial step D as the final step saying
"You're completed the whole process".
This step is always enabled. Then no matter step C should be enabled or
not, the user will always see
a "Next" button.

Another option is try enabling wantOnSelectionChangedNotifications() to
refresh the whole page.




  




Re: Ext-JS 1.1.1 and Wicket 1.3

2007-10-02 Thread Matt Jensen


I mulled it over, but at this point I do not know enough about Wicket or 
Ext-JS to pull it off acceptably.  If such a project were to get 
started, I would probably be willing to contribute down the road.


Sean Sullivan wrote:

Is anybody using Ext-JS 1.1.1 with Wicket 1.3?

Is anybody planning to start a wicket-stuff project that supports Ext-JS 1.1.1
or Ext-JS 2?

Sean

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Empty ListChoice

2007-10-10 Thread Matt Jensen


Is there any way to get a ListChoice to render as empty (no options) 
when its choice model is empty?  By default, "Choose One" appears.  If I 
set nullValid to true, an empty item appears which is still selectable.  
I would like to have the list come up completely empty if the choice 
model is empty, and I'd like to do it without creating a new component 
(though obviously I will do that if it is what is needed.)


--Matt


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Empty ListChoice

2007-10-12 Thread Matt Jensen


I believe that doing this causes the list to contain one empty, but 
still selectable, element.  That is what I am trying to avoid--I just 
want a plain empty list.  I'm starting to wonder whether empty lists are 
considered to not be the "Wicket way," as it seems like it should be 
easier than this.  Does ListChoice *intentionally* not allow for an 
empty list?  I expected to find something like 
"allowEmpty(boolean)"...but no dice.


I could see this being a technical issue since the whole "Choose 
One"/empty item thing will cause a request parameter to be submitted 
with a form, whereas an empty list would submit no parameter at 
all...possibly making it difficult/impossible to determine when a null 
must be applied to the model during form processing.  Does that have 
anything to do with it?


That aside...thanks very much for your response, Kent.
--Matt

Kent Tong wrote:

Matt Jensen-2 wrote:
  
Is there any way to get a ListChoice to render as empty (no options) 
when its choice model is empty?  By default, "Choose One" appears.  If I 
set nullValid to true, an empty item appears which is still selectable.  
I would like to have the list come up completely empty if the choice 
model is empty, and I'd like to do it without creating a new component 
(though obviously I will do that if it is what is needed.)





Try:

ListChoice lc = new ListChoice("lc", ...) {
protected CharSequence getDefaultChoice(Object selected) {
return "";
}
};

-
--
Kent Tong
Wicket tutorials freely available at http://www.agileskills2.org/EWDW
  




Re: Session Objects Approach

2007-10-16 Thread Matt Jensen


Another potential gotcha with detachable models is that they can make 
versioning/optimistic locking a bit more difficult to use.  Unless you 
cache the base version of your entity in the detachable model and do 
your own version checking, the typical implementations that I have seen 
will happily reload and overwrite whatever version happens to be in the 
database at the time of a request.  This means, for example, that the 
user might see a form that is initialized with version 1 of your object, 
and then update version 2 if somebody else comes along and makes changes 
before they submit, potentially wiping out the other user's changes.


Obviously, this only affects you if you are versioning your objects.  
It's just a nice tidbit to have in the knowledge base...and again, you 
can design your detachable models around it.  You just end up with a 
little duplication of effort, as Hibernate/JPA/etc. already does this 
for you elsewhere.



Ayodeji Aladejebi wrote:

thanks eelco i get your point. deciding what to sacrifice in design whether
memory or cpu/db traffic is always some challenge for most developers but if
I dont want my DB crying  then its probably time to buy more RAM

  




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Session Objects Approach

2007-10-16 Thread Matt Jensen


Just trying to be helpful. :-)


Igor Vaynberg wrote:

I think what you all are missing in this discussion is that ldms are
mostly uss for read only data, not for forms.

-igor
  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: OT: API to calculate distances from zip code

2007-10-27 Thread Matt Jensen


If you want to implement this for yourself, you need to start with two 
pieces: a database of zip code data including latitude/longitude, and 
(to make things as simple as possible) an OpenGIS extension package for 
your database.  This gives you the ability to index on 
latitude/longitude and do quick lookups using a "distance" function in 
the WHERE clause of your query.  The implementation for PostgreSQL is 
called PostGIS (http://www.postgis.org); if you're using some other 
database then you will have to find the equivalent extension on your 
own.  I wouldn't be surprised if some high end databases have this 
functionality built in.


Zip code databases are available from about a million different 
sources.  I was most pleased with the offering from 
http://www.zipcodeworld.com, but I'm sure that I did not investigate 
them all.  In my experience, the data is a bit shoddy in all of these 
collections.  You may not have problems with that until you try to 
combine it with something like gazetteer data.  In about 2,000 cases, 
that becomes a nightmare.  If you can avoid that...do!


I have an SQL INSERT script which was generated off of the September 
topical gazetteer and zip code databases, but with everything pulled in 
I believe it weighs in at something like 40MB. :-/


Tauren Mills wrote:

I apologize for this being off topic, but I have a feeling some of you
might have some ideas for me.

I'd like to implement a feature that will search for all physical
locations in my database that are within a radius of a zip code.  In
other words, the user enters a zip code and selects a distance from a
drop down list (5 mi, 10 mi, 25 mi, 50 mi, etc.) and a list of all
locations within that distance of the zip code will be displayed.  You
can see something similar to this at:
http://www.restaurant.com/

Are there any web services out there that would simplify this task?  I
have been looking at the Google Geocoding API
(http://www.google.com/apis/maps/documentation/services.html), but am
not sure how much it will help.  I could geocode locations as they are
added to my database and store the lat/long, but I get fuzzy on how to
proceed from there.  Somehow my SQL query (using hibernate) would need
to do some computation to see if the lat/long stored in the DB is
within the specified radius from the lat/long of the specified zip
code.

I guess I mostly want to hear from others if this would be the way
they would do it, or if there is some other way that would work better
or be simpler.

Thanks!
Tauren

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: facebook support

2007-11-08 Thread Matt Jensen


I am working on this, though I'm trying to leave the door open to also 
supporting MySpace in the future.  I have not done much yet--and nothing 
Wicket-specific--but I do plan to include a Wicket module.


Jonathan Locke wrote:

I'd like to get facebook support into Wicket.  If anyone out there has
interest and would like to cooperate(particularly anyone with Facebook
experience), please get in touch with me.  Thanks.
  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: facebook support

2007-11-08 Thread Matt Jensen


Wasn't aware of its existence.  If it is relatively feature rich and 
integrates well with Java...it's possible that it could save me a lot of 
work.  Always a good thing!


I'll check it out.

--Matt

Kent Tong wrote:

Matt Jensen-2 wrote:
  
I am working on this, though I'm trying to leave the door open to also 
supporting MySpace in the future.  I have not done much yet--and nothing 
Wicket-specific--but I do plan to include a Wicket module.





Have you considered Google's OpenSocial API?

-
--
Kent Tong
Wicket tutorials freely available at http://www.agileskills2.org/EWDW
  




Re: facebook support

2007-11-09 Thread Matt Jensen


Can't speak for anyone but myself, but I couldn't use any solution that 
does not give me access to at least the lowest common denominator of 
data for these sites: users, groups, contacts, etc.  Just about every 
useful application that I can think of involves mixing in with these 
constructs and possibly extending them with additional functionality.


I'm hoping that Open Social provides access to this information in an 
abstract way.  If it does, I might be able to shelve my current project 
and move right into building end user applications.


Mats Norén wrote:

What kind of support are we talking about?
Being able to build applications or retrieving information from FB or MySpace?
Or both?

/Mats

On Nov 9, 2007 9:16 AM, Stefan Fußenegger <[EMAIL PROTECTED]> wrote:
  

I'd be interested in Facebook and Open Social support. However, I don't have
any experience with either of them.

It would be extremely cool to have a common interface for both of them -
write once run everywhere.

I would also help implementing it. I don't have much time to spend tough.
For my project, facebook and open social support won't be required within
the next 6 month. (But it would be cool to have.)

-- Stefan




Jonathan Locke wrote:


I'd like to get facebook support into Wicket.  If anyone out there has
interest and would like to cooperate(particularly anyone with Facebook
experience), please get in touch with me.  Thanks.

  

-
---
Stefan Fußenegger
http://talk-on-tech.blogspot.com // looking for a nicer domain ;)
--
View this message in context: 
http://www.nabble.com/facebook-support-tf4773546.html#a13662919

Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  




Re: CAPTCHA clarity in post 1.2.6 releaes

2007-11-10 Thread Matt Jensen


It is still pretty nasty in the 1.3 series.  I got around the issue 
somewhat by throwing out several letters that could be indistinguishable 
after deformation.  Things like "h" and "n," "I" and "1," and "t" and 
"f."  But yeah, about 10% of the time, they get pretty bad.


Chris Colman wrote:

I'm using the wicket extensions CAPTCHA feature which works perfectly
except:

I know the purpose of CAPTCHA is to make the text unreadable to a
certain extent but it's *TOO* good at making the text unreadable - such
that humans often get it wrong too.

I have a client who has complained that while's it's good that a
computer can't decipher the letters it's bad that he has trouble doing
it. Dang those customers! Just think how much more successful we could
all be if it wasn't for those pesky customers... ;)

I am currently using wicket 1.2.6. I was wondering if any post 1.2.6
releases have "improved" (depending on your perspective) the capture
appearance to make it slightly more readable by humans.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: CAPTCHA clarity in post 1.2.6 releaes

2007-11-11 Thread Matt Jensen


Here is the complete list of characters that I am currently using.  I 
basically removed more and more over time as I experienced entry 
failures.  They seem to be pretty workable using these characters:


private static final char[] CAPTCHA_CHARS = 
"abcdefghkmnoprstuvwxz".toCharArray();


Chris Colman wrote:

It is still pretty nasty in the 1.3 series.  I got around the issue
somewhat by throwing out several letters that could be


indistinguishable
  

after deformation.  Things like "h" and "n," "I" and "1," and "t" and
"f."



Good idea! I tried throwing out all the letters and using only numbers
but even then there was a lot of ambiguity between 1 and 7.

I might try going back to letters and avoiding the letters that you
mention.

  

But yeah, about 10% of the time, they get pretty bad.



Yeah it gets so hard to read that you almost need software to do the
recognition for you =]

  

Chris Colman wrote:


I'm using the wicket extensions CAPTCHA feature which works
  

perfectly
  

except:

I know the purpose of CAPTCHA is to make the text unreadable to a
certain extent but it's *TOO* good at making the text unreadable -
  

such
  

that humans often get it wrong too.

I have a client who has complained that while's it's good that a
computer can't decipher the letters it's bad that he has trouble
  

doing
  

it. Dang those customers! Just think how much more successful we
  

could
  

all be if it wasn't for those pesky customers... ;)

I am currently using wicket 1.2.6. I was wondering if any post 1.2.6
releases have "improved" (depending on your perspective) the capture
appearance to make it slightly more readable by humans.
  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  




Re: [OT] where is JPA 2.0 API spec in maven?

2010-09-08 Thread Matt Jensen


Group: org.hibernate.javax.persistence
Artifact: hibernate-jpa-2.0-api
Version: 1.0.0.Final

On 9/8/2010 8:35 AM, nino martinez wael wrote:

Sorry to spam but I am wondering where the JPA 2.0 Spec are cant find
it in maven...

regards Nino

-
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