Re: Custom StringHeaderContributor

2007-08-18 Thread Igor Vaynberg
im not really sure how extensible it is.

but building your own is simple, just subclass abstractbehavior and override
renderHead()

-igor


On 8/18/07, Tauren Mills <[EMAIL PROTECTED]> wrote:
>
> I just checked in the 1.2 repo and couldn't find it either.  Maybe it
> is in a branch I didn't look at.
>
> Anyway, what about my original question?  Wouldn't having a custom
> headercontributor be the way to do this rather than a model that is
> passed to stringheadercontributor?  I don't want to redo everything
> that is in stringheadercontributor, but am not clear how to extend it
> to do what I want.  Just looking for any suggestions.
>
> Thanks!
> Tauren
>
>
> On 8/18/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> > hrm, i remember i added one there based on [1], but maybe it was removed
> due
> > to license incompatibilities before we moved to apache...
> >
> > [1] http://homepage.ntlworld.com/bobosola/pnghowto.htm
> >
> > -igor
> >
> >
> > On 8/18/07, Tauren Mills <[EMAIL PROTECTED]> wrote:
> > >
> > > Igor,
> > >
> > > Really?  I didn't see one.  Then again, ModalWindow uses transparent
> > > pngs and doesn't seem to have an issue.  But I didn't see any code to
> > > handle it in modal.js. Could you point me to where its at?
> > >
> > > If one doesn't exist, I'd be happy to contribute this.
> > >
> > > Tauren
> > >
> > >
> > > On 8/18/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> > > > there should already be a png fix for ie in extensions.
> > > >
> > > > -igor
> > > >
> > > >
> > > > On 8/18/07, Tauren Mills <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > > Maybe its just late and I'm not thinking straight, but I can't
> figure
> > > > > out the best way to create a custom StringHeaderContributor.  All
> I
> > > > > want it to is encapsulate some javascript that has some property
> > > > > replacements in it.
> > > > >
> > > > > I have it working with a custom model as such:
> > > > >
> > > > >   add(new StringHeaderContributor(new PngTransparency(this)));
> > > > >
> > > > > But I want it to look like this:
> > > > >
> > > > >   add(new PngTransparencyHeaderContributor(this));
> > > > >
> > > > > It's not really a big deal, but it seems like it would be cleaner
> that
> > > > > way.  Here is the model class:
> > > > >
> > > > > public class PngTransparency extends Model {
> > > > >
> > > > > public static final ResourceReference PNGFIX = new
> > > > > ResourceReference(PngTransparency.class, "PngTransparency.js");
> > > > > public static final ResourceReference TRANSPARENT_PIXEL =
> new
> > > > > ResourceReference(PngTransparency.class, "transparentpixel.gif");
> > > > >
> > > > > public PngTransparency(Component component) {
> > > > >
> > > > > String output =
> > > > > "\n";
> > > > > setObject(output);
> > > > > }
> > > > > }
> > > > >
> > > > > Any ideas?
> > > > >
> > > > > 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]
> > >
> > >
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Custom StringHeaderContributor

2007-08-18 Thread Tauren Mills
I just checked in the 1.2 repo and couldn't find it either.  Maybe it
is in a branch I didn't look at.

Anyway, what about my original question?  Wouldn't having a custom
headercontributor be the way to do this rather than a model that is
passed to stringheadercontributor?  I don't want to redo everything
that is in stringheadercontributor, but am not clear how to extend it
to do what I want.  Just looking for any suggestions.

Thanks!
Tauren


On 8/18/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> hrm, i remember i added one there based on [1], but maybe it was removed due
> to license incompatibilities before we moved to apache...
>
> [1] http://homepage.ntlworld.com/bobosola/pnghowto.htm
>
> -igor
>
>
> On 8/18/07, Tauren Mills <[EMAIL PROTECTED]> wrote:
> >
> > Igor,
> >
> > Really?  I didn't see one.  Then again, ModalWindow uses transparent
> > pngs and doesn't seem to have an issue.  But I didn't see any code to
> > handle it in modal.js. Could you point me to where its at?
> >
> > If one doesn't exist, I'd be happy to contribute this.
> >
> > Tauren
> >
> >
> > On 8/18/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> > > there should already be a png fix for ie in extensions.
> > >
> > > -igor
> > >
> > >
> > > On 8/18/07, Tauren Mills <[EMAIL PROTECTED]> wrote:
> > > >
> > > > Maybe its just late and I'm not thinking straight, but I can't figure
> > > > out the best way to create a custom StringHeaderContributor.  All I
> > > > want it to is encapsulate some javascript that has some property
> > > > replacements in it.
> > > >
> > > > I have it working with a custom model as such:
> > > >
> > > >   add(new StringHeaderContributor(new PngTransparency(this)));
> > > >
> > > > But I want it to look like this:
> > > >
> > > >   add(new PngTransparencyHeaderContributor(this));
> > > >
> > > > It's not really a big deal, but it seems like it would be cleaner that
> > > > way.  Here is the model class:
> > > >
> > > > public class PngTransparency extends Model {
> > > >
> > > > public static final ResourceReference PNGFIX = new
> > > > ResourceReference(PngTransparency.class, "PngTransparency.js");
> > > > public static final ResourceReference TRANSPARENT_PIXEL = new
> > > > ResourceReference(PngTransparency.class, "transparentpixel.gif");
> > > >
> > > > public PngTransparency(Component component) {
> > > >
> > > > String output =
> > > > "\n";
> > > > setObject(output);
> > > > }
> > > > }
> > > >
> > > > Any ideas?
> > > >
> > > > 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]
> >
> >
>

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



Re: Can we do straight print in a java web application?

2007-08-18 Thread dtoffe

I don't know what exactly are you trying to print, but take a look at
jasperreports, it's awesome.

Hope this helps,

Daniel



Eko S.W. wrote:
> 
> Dear all,
> 
> I would like to found out about something : can we do straight print in a
> java web application?
> That is, we do not rely on window.print(), because we rely on browser to
> print them.
> 
> I have an idea, silly perhaps, that we build another "daemon" that listen
> to
> something.
> That daemon wait, and when printing request from java web application does
> occur, it will do the printing.
> 
> Is it applicable?
> Because as a matter of moving from desktop to web, maybe printing is one
> aspect that as an application developer, will be of some challenge.
> 
> Thanks in advance
> 
> -- 
> Best wishes,
> Eko SW
> http://swdev.blogs.friendster.com/my_blog/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Can-we-do-straight-print-in-a-java-web-application--tf4289452.html#a12219283
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Template tags

2007-08-18 Thread Carlos Pita
Yes more or less like that. But I was thinking in terms of onRender or
onComponentTagBody because I didn't know of the transformer behavior, which
looks pretty elegant. And I would also add a couple of constructors that
take one or two mappings parameters as the model to make the common case a
oneliner (I think they do that with spring mvc models). Thanks for the
example.

On 8/18/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
>
> you mean something like
>
> class Template extends WebMarkupContainer {
> public Template(String id, IModel model) {
> super(id, model);
> add(new AbstractTransformerBehavior() {
>public CharSequence transform(Component c, CharSequence output) {
>   return new
> TextTemplate(output).asString((Map)Template.this.getModelObject());
>}
>  });
>   }
> }
>
> -igor
>
>
> On 8/18/07, Carlos Pita <[EMAIL PROTECTED]> wrote:
> >
> > Hi all,
> > one need that repeatedly araises in our project is the one to write some
> > javascript support code to be called from event behaviors or to
> integrate
> > external libraries. Often these code fragments need to reference other
> > wicket managed tags that have their own auto generated ids. So normally
> we
> > divide the code a bit unnaturally in a way that code with id references
> is
> > programatically generated and the rest, static one, resides at the
> markup
> > file. IMO a nifty solution to keep all the code in one place could be to
> > write a component that simply treats its content as a template and
> > replaces
> > placeholders with values passed as a model (say a Map) to its
> constructor.
> > So the template can be a snippet of javascript, and the model just the
> > mapping id -> target.getMarkupId(). The same idea could be extended to a
> > template system as velocity or freemarker that does more than
> placeholder
> > filling, but I think that would be way too much. What I would like to
> know
> > is if someone has faced a similar concern, what solution did he find,
> > whether or not there is provided component with the proposed behavior
> > (although it would be trivial to implement a home brew one), and your
> > opinions in general.
> > Thank you in advance
> > Regards,
> > Carlos
> >
>


Forward of moderated message

2007-08-18 Thread wicket-user-bounces
--- Begin Message ---

I have one doubt in wicket with excel code.

you have createLoop(). right?

I want to call one function in before/after createLoop(). How?

"grid.add(createLoop());"

And how create Loop works.

Please explain and let me know.




Ayodeji Aladejebi wrote:
> 
> that should be simple, although my wicket is bit rusty at the moment, I
> think
> 
>  final TextField tx = new TextField("cell", new
> PropertyModel(values[row][col],"data"));
>   tx.add(new IValidator(){
>   public void validate(FormComponent fc){
> 
>   if(fc.getValue() is greater than 20){
> fc.add(new AttributeModifier("style",true, new
> Model("background-color: #FF;")));
> fc.error("error.toolongvalue",null);
>   }else{
>   fc.add(new AttributeModifier("style",true, new
> Model("background-color: normal-color;")));
>  }
> 
> }
>   });
>  item.add(tx);
> 
> 
> something like dat...just buzz around
> On 6/29/07, Edi <[EMAIL PROTECTED]> wrote:
>>
>>
>> Or, tell me how to validate, if the text box value exceeds 20 characters,
>> I
>> want to change the color of the text box. HOW?
>>
>>
>>
>> Ayodeji Aladejebi wrote:
>> >
>> > well,
>> > yu can use String.length to do dat. but be aware it might jumble your
>> > table
>> > because some Text will be *This is a very long text that can expand the
>> > Textfield too much* and some will be just "Hi".
>> >
>> > I had to make that trade off as well
>> >
>> > i am looking for some javascript technique maybe yu can show me if yu
>> > find.
>> >
>> > Look for a javascript library that can allow a user to dynamically
>> expand
>> > the textfield lenght with his mouse. so that we can attach that
>> Behavior
>> > to
>> > each Textfield
>> >
>> >
>> >
>> > On 6/29/07, Edi <[EMAIL PROTECTED]> wrote:
>> >>
>> >>
>> >> Hi,
>> >>
>> >> In your sample code,
>> >>
>> >> tx.add(new AttributeModifier("size",true, new Model(String.valueOf
>> (8;
>> >> It shows all the size of textbox is same.
>> >>
>> >> I want to change the size of text box value according to text each
>> >> contents
>> >>
>> >>
>> >>
>> >> Ayodeji Aladejebi wrote:
>> >> >
>> >> > meanwhile,
>> >> > if yu look at this code in the Wicket - JExcel example
>> >> >
>> >> > Cell cell = sheet.getCell(col, row);
>> >> > values[row][col] = new
>> XCell(row,
>> >> > col,cell.getContents());
>> >> >
>> >> > return
>> values[row][col].getData();
>> >> >
>> >> >
>> >> > The Cell object is from JExcel and its where Datatype should be
>> >> retrieved
>> >> > from
>> >> >
>> >> > 2. To validate,
>> >> >
>> >> > You can write a default wicket validator (See Validator examples),
>> >> > The validator can access the Textfield arrays and then check for
>> >> validity
>> >> >
>> >> > its shouldn't be too difficult anyway
>> >> >
>> >> >
>> >> >
>> >> > On 6/28/07, Ayodeji Aladejebi <[EMAIL PROTECTED]> wrote:
>> >> >>
>> >> >> I think that is within the scope of the JExcel API and not a wicket
>> >> >> thing.
>> >> >> Refer to the JExcel API doc first
>> >> >>
>> >> >> On 6/28/07, Edi < [EMAIL PROTECTED]> wrote:
>> >> >> >
>> >> >> >
>> >> >> > Hi,
>> >> >> >
>> >> >> > I am Newbie of Wicket. I have downloaded sample example to read
>> XLS
>> >> >> file
>> >> >> >
>> >> >> > using Wicket with JExcel.
>> >> >> > It's working fine.
>> >> >> >
>> >> >> > My doubt is 1.How can I retrieve the datatype of each cell? and
>> 2.
>> >> How
>> >> >> > to
>> >> >> > validate the each cell values?
>> >> >> >
>> >> >> > Please give me some Suggestions.
>> >> >> >
>> >> >> > Thanking You.
>> >> >> > Regards,
>> >> >> > Edi
>> >> >> > --
>> >> >> > View this message in context:
>> >> >> > http://www.nabble.com/Wicket-with-JExcel-tf3994102.html#a11342103
>> >> >> > Sent from the Wicket - User mailing list archive at Nabble.com.
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >>
>> >>
>> -
>> >> >> > This SF.net email is sponsored by DB2 Express
>> >> >> > Download DB2 Express C - the FREE version of DB2 express and take
>> >> >> > control of your XML. No limits. Just data. Click to get it now.
>> >> >> > http://sourceforge.net/powerbar/db2/
>> >> >> > ___
>> >> >> > Wicket-user mailing list
>> >> >> > [EMAIL PROTECTED]
>> >> >> > https://lists.sourceforge.net/lists/listinfo/wicket-user
>> >> >> >
>> >> >>
>> >> >>
>> >> >>
>> >> >> --
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >>
>> -
>> >> > This SF.net email is sponsored by DB2 Express
>> >> > Download DB2 Express C - the FREE version of DB2 express and take
>> >> > control of your XML. No limits. Just data. Click to get it now.
>> >> > http://sourceforge.net/powerbar/db2/
>> >> > ___
>> >> > Wicket-user mailing list
>> >> > [EMAIL PROTECTED]
>> >> > https://lists.sourceforge.

Re: Template tags

2007-08-18 Thread Igor Vaynberg
you mean something like

class Template extends WebMarkupContainer {
 public Template(String id, IModel model) {
super(id, model);
add(new AbstractTransformerBehavior() {
   public CharSequence transform(Component c, CharSequence output) {
  return new
TextTemplate(output).asString((Map)Template.this.getModelObject());
   }
 });
  }
}

-igor


On 8/18/07, Carlos Pita <[EMAIL PROTECTED]> wrote:
>
> Hi all,
> one need that repeatedly araises in our project is the one to write some
> javascript support code to be called from event behaviors or to integrate
> external libraries. Often these code fragments need to reference other
> wicket managed tags that have their own auto generated ids. So normally we
> divide the code a bit unnaturally in a way that code with id references is
> programatically generated and the rest, static one, resides at the markup
> file. IMO a nifty solution to keep all the code in one place could be to
> write a component that simply treats its content as a template and
> replaces
> placeholders with values passed as a model (say a Map) to its constructor.
> So the template can be a snippet of javascript, and the model just the
> mapping id -> target.getMarkupId(). The same idea could be extended to a
> template system as velocity or freemarker that does more than placeholder
> filling, but I think that would be way too much. What I would like to know
> is if someone has faced a similar concern, what solution did he find,
> whether or not there is provided component with the proposed behavior
> (although it would be trivial to implement a home brew one), and your
> opinions in general.
> Thank you in advance
> Regards,
> Carlos
>


Template tags

2007-08-18 Thread Carlos Pita
Hi all,
one need that repeatedly araises in our project is the one to write some
javascript support code to be called from event behaviors or to integrate
external libraries. Often these code fragments need to reference other
wicket managed tags that have their own auto generated ids. So normally we
divide the code a bit unnaturally in a way that code with id references is
programatically generated and the rest, static one, resides at the markup
file. IMO a nifty solution to keep all the code in one place could be to
write a component that simply treats its content as a template and replaces
placeholders with values passed as a model (say a Map) to its constructor.
So the template can be a snippet of javascript, and the model just the
mapping id -> target.getMarkupId(). The same idea could be extended to a
template system as velocity or freemarker that does more than placeholder
filling, but I think that would be way too much. What I would like to know
is if someone has faced a similar concern, what solution did he find,
whether or not there is provided component with the proposed behavior
(although it would be trivial to implement a home brew one), and your
opinions in general.
Thank you in advance
Regards,
Carlos


Re: generic validator questions

2007-08-18 Thread Igor Vaynberg
im not sure exactly what your usecase is.

we have something that is kind of similar, namely new TextField("number",
Integer.class); which would type convert the entered string into an Integer
and error out if the conversion could not be performed.

but i dont think this is the exact match to whatever it is you are trying to
achieve.

-igor


On 8/18/07, Stojce Dimski <[EMAIL PROTECTED]> wrote:
>
> Hi Igor,
>
> First thing, thanks, your hints gave me the direction and I solved the
> issue... I like the approach 'Classname.Key' and I think it's right for
> this category of generic validators as are those in 'validator'
> package.
> It was just a question of overriding one method:
>
> @Override
> public void error (final IValidatable validatable, final String
> resourceKey) {
> super.error(validatable, resourceKey() + "." + resourceKey);
> }
>
> and everything worked like a charm ;-)
>
> What do you think of adding this validator in trunk ?
>
> Cheers,
> Stojce
>
>
>
>   ___
> L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail:
> http://it.docs.yahoo.com/nowyoucan.html
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: generic validator questions

2007-08-18 Thread Stojce Dimski
Hi Igor,

First thing, thanks, your hints gave me the direction and I solved the
issue... I like the approach 'Classname.Key' and I think it's right for
this category of generic validators as are those in 'validator'
package.
It was just a question of overriding one method:

@Override
public void error (final IValidatable validatable, final String
resourceKey) {
super.error(validatable, resourceKey() + "." + resourceKey);
}

and everything worked like a charm ;-)

What do you think of adding this validator in trunk ?

Cheers,
Stojce



  ___ 
L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: 
http://it.docs.yahoo.com/nowyoucan.html

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



Re: Slider Component

2007-08-18 Thread Samanth Bapu
Thank you. I appreciate your quick inputs.

Samanth

On Sat, 2007-08-18 at 12:02 -0700, Igor Vaynberg wrote:

> any javascript slider can be easily integrated into wicket, in fact most
> javascript libs can be. see wicket-stuff for inspiration, there are
> integrations for animator.js, mootools, yui, scriptaculous, etc.
> 
> -igor
> 
> 
> On 8/18/07, Samanth Bapu <[EMAIL PROTECTED]> wrote:
> >
> > All,
> >
> > I am relatively new to Wicket and just hooked to it. Thanks for creating
> > such a good framework without any messy xml or configuration files.
> >
> > I just wanted to know if there are any good open source Slider component
> > available and can be integrated with Wicket? I have found ZK, Prototype
> > & GI slider components but not sure if they can be integrated with
> > Wcket.
> >
> > Any other suggestions would be of great help.
> >
> > Thanks
> > Samanth Bapu
> >
> >

Thanks
Samanth Bapu
CircleSource Software Technologies
Ph: +91 934.107.8771 (M) +91 803.028.0212


Re: Slider Component

2007-08-18 Thread Eelco Hillenius
> I am relatively new to Wicket and just hooked to it. Thanks for creating
> such a good framework without any messy xml or configuration files.
>
> I just wanted to know if there are any good open source Slider component
> available and can be integrated with Wicket? I have found ZK, Prototype
> & GI slider components but not sure if they can be integrated with
> Wcket.

There's a slider component from YUI in wicket-stuff's yui project
(https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-contrib-yui)

Eelco

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



Re: Slider Component

2007-08-18 Thread Igor Vaynberg
any javascript slider can be easily integrated into wicket, in fact most
javascript libs can be. see wicket-stuff for inspiration, there are
integrations for animator.js, mootools, yui, scriptaculous, etc.

-igor


On 8/18/07, Samanth Bapu <[EMAIL PROTECTED]> wrote:
>
> All,
>
> I am relatively new to Wicket and just hooked to it. Thanks for creating
> such a good framework without any messy xml or configuration files.
>
> I just wanted to know if there are any good open source Slider component
> available and can be integrated with Wicket? I have found ZK, Prototype
> & GI slider components but not sure if they can be integrated with
> Wcket.
>
> Any other suggestions would be of great help.
>
> Thanks
> Samanth Bapu
>
>


Slider Component

2007-08-18 Thread Samanth Bapu
All,

I am relatively new to Wicket and just hooked to it. Thanks for creating
such a good framework without any messy xml or configuration files. 

I just wanted to know if there are any good open source Slider component
available and can be integrated with Wicket? I have found ZK, Prototype
& GI slider components but not sure if they can be integrated with
Wcket.

Any other suggestions would be of great help.

Thanks
Samanth Bapu



Re: Acegi and Wicket-auth-roles

2007-08-18 Thread Erik van Oosten

Hi Ian,

Indeed, the Wicket base class from Wicket-auth-roles does keep the 'is 
signed in' state. This is okay; it is the intention that you invalidate 
the session upon logout. This should of course happen automatically on a 
timeout after you close the browser.


If the browser did not keep the cookie, you should have gotten a new 
session in which isSigned() should return false. If this is really the 
case, then this sounds like a bug in Wicket core and not in 
Wicket-auth-roles.


If your browser /did/ keep the cookie and brought you back to the same 
session, you should also have gotten the security context from Acegi.
It this is the case the problem is either (again) a Wicket bug, or a 
problem with the session authentication store of Acegi. Please 
investigate whether you configured the Acegi filter on all relevant URLs.


Regards,
Erik.


Ian Godman wrote:

Hi

I am trying to get Acegi (Spring Security) working with Wicket.

It almost works except that if I close the browser and reopen the page I get a 
null pointer exception because the 
SecurityContextHolder.getContext().getAuthentication() is null in the 
getRoles() method of the appSession, which is actually what I would expect as 
the use should not be logged on because the browser was closed.

It appears to me that Wicket-auth-roles is not noticing that the user is not 
authenticated (its remembering the previous authentication) so checks to see if 
they have the role required to access the page and because the authentication 
does not exist in the security context I get NullPointerException.

Been going around this all morning, completely out of ideas.


Ian





  ___
Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
now.
http://uk.answers.yahoo.com/ 
  


--
Erik van Oosten
http://2008.rubyenrails.nl/
http://www.day-to-day-stuff.blogspot.com/


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



Re: Custom StringHeaderContributor

2007-08-18 Thread Igor Vaynberg
hrm, i remember i added one there based on [1], but maybe it was removed due
to license incompatibilities before we moved to apache...

[1] http://homepage.ntlworld.com/bobosola/pnghowto.htm

-igor


On 8/18/07, Tauren Mills <[EMAIL PROTECTED]> wrote:
>
> Igor,
>
> Really?  I didn't see one.  Then again, ModalWindow uses transparent
> pngs and doesn't seem to have an issue.  But I didn't see any code to
> handle it in modal.js. Could you point me to where its at?
>
> If one doesn't exist, I'd be happy to contribute this.
>
> Tauren
>
>
> On 8/18/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> > there should already be a png fix for ie in extensions.
> >
> > -igor
> >
> >
> > On 8/18/07, Tauren Mills <[EMAIL PROTECTED]> wrote:
> > >
> > > Maybe its just late and I'm not thinking straight, but I can't figure
> > > out the best way to create a custom StringHeaderContributor.  All I
> > > want it to is encapsulate some javascript that has some property
> > > replacements in it.
> > >
> > > I have it working with a custom model as such:
> > >
> > >   add(new StringHeaderContributor(new PngTransparency(this)));
> > >
> > > But I want it to look like this:
> > >
> > >   add(new PngTransparencyHeaderContributor(this));
> > >
> > > It's not really a big deal, but it seems like it would be cleaner that
> > > way.  Here is the model class:
> > >
> > > public class PngTransparency extends Model {
> > >
> > > public static final ResourceReference PNGFIX = new
> > > ResourceReference(PngTransparency.class, "PngTransparency.js");
> > > public static final ResourceReference TRANSPARENT_PIXEL = new
> > > ResourceReference(PngTransparency.class, "transparentpixel.gif");
> > >
> > > public PngTransparency(Component component) {
> > >
> > > String output =
> > > "\n";
> > > setObject(output);
> > > }
> > > }
> > >
> > > Any ideas?
> > >
> > > 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: Custom StringHeaderContributor

2007-08-18 Thread Tauren Mills
Igor,

Really?  I didn't see one.  Then again, ModalWindow uses transparent
pngs and doesn't seem to have an issue.  But I didn't see any code to
handle it in modal.js. Could you point me to where its at?

If one doesn't exist, I'd be happy to contribute this.

Tauren


On 8/18/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> there should already be a png fix for ie in extensions.
>
> -igor
>
>
> On 8/18/07, Tauren Mills <[EMAIL PROTECTED]> wrote:
> >
> > Maybe its just late and I'm not thinking straight, but I can't figure
> > out the best way to create a custom StringHeaderContributor.  All I
> > want it to is encapsulate some javascript that has some property
> > replacements in it.
> >
> > I have it working with a custom model as such:
> >
> >   add(new StringHeaderContributor(new PngTransparency(this)));
> >
> > But I want it to look like this:
> >
> >   add(new PngTransparencyHeaderContributor(this));
> >
> > It's not really a big deal, but it seems like it would be cleaner that
> > way.  Here is the model class:
> >
> > public class PngTransparency extends Model {
> >
> > public static final ResourceReference PNGFIX = new
> > ResourceReference(PngTransparency.class, "PngTransparency.js");
> > public static final ResourceReference TRANSPARENT_PIXEL = new
> > ResourceReference(PngTransparency.class, "transparentpixel.gif");
> >
> > public PngTransparency(Component component) {
> >
> > String output =
> > "\n";
> > setObject(output);
> > }
> > }
> >
> > Any ideas?
> >
> > 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: generic validator questions

2007-08-18 Thread Igor Vaynberg
On 8/18/07, Stojce Dimski <[EMAIL PROTECTED]> wrote:
>
> Hi Igor
>
> The error message says:
>
> Could not locate error message for error:
> [org.apache.wicket.validation.ValidationError message=[null],
> keys=[notFound, ClassValidator], variables=[]]


the problem looks like is that its looking for a "notFound" key or a
"ClassValidator" key, not for a "ClassValidator.notFound" key. so just
adjust your code.

-igor


notFound - is my key
> ClassValidator - is the name of the class
>
> the .propeties file is together with .class file and and have identical
> names...
>
> inside .properties i have a row like this:
>
> ClassValidator.notFound=${input} cannot be found on a classpath.
>
> What is wrong with this ?
>
> Thanks,
> Stojce
>
>
>
>   ___
> L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail:
> http://it.docs.yahoo.com/nowyoucan.html
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: generic validator questions

2007-08-18 Thread Stojce Dimski
Hi Igor

The error message says:

Could not locate error message for error:
[org.apache.wicket.validation.ValidationError message=[null],
keys=[notFound, ClassValidator], variables=[]]

notFound - is my key
ClassValidator - is the name of the class

the .propeties file is together with .class file and and have identical
names...

inside .properties i have a row like this:

ClassValidator.notFound=${input} cannot be found on a classpath.

What is wrong with this ?

Thanks,
Stojce



  ___ 
L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: 
http://it.docs.yahoo.com/nowyoucan.html

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



Re: generic validator questions

2007-08-18 Thread Igor Vaynberg
hmm, im not sure. debug and see what key it is actually constructing. tbh i
dont use abstractvalidator, just dont see the value it brings.

-igor


On 8/18/07, Stojce Dimski <[EMAIL PROTECTED]> wrote:
>
> Thanks Igor,
>
> I tried with 'application-scoped .properties' by putting
> 'WebAppName'.properties in the same package as my app class with
> content as:
> ClassValidator.notValid=...
> ClassValidator.notFound=...
>
> but it didn't worked, where I am wrong ?
>
>
>
>   ___
> L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail:
> http://it.docs.yahoo.com/nowyoucan.html
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: generic validator questions

2007-08-18 Thread Stojce Dimski
Thanks Igor,

I tried with 'application-scoped .properties' by putting
'WebAppName'.properties in the same package as my app class with
content as:
ClassValidator.notValid=...
ClassValidator.notFound=...

but it didn't worked, where I am wrong ?



  ___ 
L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: 
http://it.docs.yahoo.com/nowyoucan.html

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



Re: generic validator questions

2007-08-18 Thread Igor Vaynberg
right now you have a few choices:
you can load that .properties file yourself from inside your validator
you can put these properties into application-scoped .properties file.

you can also add an rfe into our jira to allow validators to have their own
.properties bundles.

-igor


On 8/18/07, Stojce Dimski <[EMAIL PROTECTED]> wrote:
>
> Hi I am new to wicket and during my studying phase (1.3b2) I wrote a
> small validator for my pilot project.
> Validator checks that class indicated by some control implements
> specified interface or is subclass of specified class. It works like
> charm.
> But I have a big problems locating the messages for display purposes.
> What is the correct way to make a _generic_ validator (like
> 'PatternValidator') not tied to any form and specify his messages in
> some .properties file ???
> Can some kind soul enlight me ?
>
>
>
> import org.apache.wicket.validation.*;
> import org.apache.wicket.validation.validator.*;
>
> public class ClassValidator extends AbstractValidator {
> private static final long serialVersionUID = 1L;
> private final Class  validClass;
>
> public ClassValidator (final Class  validClass) {
> this.validClass = validClass;
> }
>
> @Override
> protected void onValidate (final IValidatable validatable) {
> final String validatableClassName = (String)
> validatable.getValue();
> try {
> final Class  validatableClass =
> Class.forName(validatableClassName);
> final Object validatableInstance =
> validatableClass.newInstance();
> if (!validClass.isInstance(validatableInstance))
> error(validatable, "notValid");
> } catch (ClassNotFoundException problem) {
> error(validatable, "notFound");
> } catch (InstantiationException problem) {
> error(validatable, "instantiation");
> } catch (IllegalAccessException problem) {
> error(validatable, "illegalAccess");
> }
> }
> }
>
>
>
>   ___
> L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail:
> http://it.docs.yahoo.com/nowyoucan.html
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Custom StringHeaderContributor

2007-08-18 Thread Igor Vaynberg
there should already be a png fix for ie in extensions.

-igor


On 8/18/07, Tauren Mills <[EMAIL PROTECTED]> wrote:
>
> Maybe its just late and I'm not thinking straight, but I can't figure
> out the best way to create a custom StringHeaderContributor.  All I
> want it to is encapsulate some javascript that has some property
> replacements in it.
>
> I have it working with a custom model as such:
>
>   add(new StringHeaderContributor(new PngTransparency(this)));
>
> But I want it to look like this:
>
>   add(new PngTransparencyHeaderContributor(this));
>
> It's not really a big deal, but it seems like it would be cleaner that
> way.  Here is the model class:
>
> public class PngTransparency extends Model {
>
> public static final ResourceReference PNGFIX = new
> ResourceReference(PngTransparency.class, "PngTransparency.js");
> public static final ResourceReference TRANSPARENT_PIXEL = new
> ResourceReference(PngTransparency.class, "transparentpixel.gif");
>
> public PngTransparency(Component component) {
>
> String output =
> "\n";
> setObject(output);
> }
> }
>
> Any ideas?
>
> Tauren
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Can I HTTP Post from static html page to a Wicket page?

2007-08-18 Thread Igor Vaynberg
sure, set the form's action to point to the bookmarkable page.
mount the bookmarkable page with querystringurlcodingstrat
give it a (PageParameters params) constructor
and you are good to go, you can pull out the submitted values out of params.

-igor

On 8/18/07, Chris Lintz <[EMAIL PROTECTED]> wrote:
>
>
> Hi all,
> I want to post to a Bookmarkable page from a static (non-Wicket page).  I
> am
> having a tough time figuring out exactly how this can be done.  For
> example,
> I simply want a static home page  to contain a basic form with the form
> action="/auth/login" .
>
> Is this possible with a Wicket page?  I can't find any examples for pure
> http posts to a wicket page/form.
>
> thanks
>
>
> chris
> --
> View this message in context:
> http://www.nabble.com/Can-I-HTTP-Post-from-static-html-page-to-a-Wicket-page--tf4289562.html#a12211582
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Two questions: Roadmap and Editable Grids

2007-08-18 Thread Igor Vaynberg
On 8/18/07, dtoffe <[EMAIL PROTECTED]> wrote:

I wonder if is it possible to create a custom component that behaves
> like an editable grid. For example, I want a flexible grid like those in
> Visual Basic or Delphi, in which I can set some cells as editable, some
> fixed, some in other colour, is this feasible ??


 yes it is possible/feasible

How hard it would be ??


that depends on you :)

   As I understood, I could control all of these behaviours in the Java
> code, is this right ??


correct, see wicket-examples. there is an editable treetable that can give
you some clues.

-igor

Thanks in advance !!
>
> Daniel
>
> --
> View this message in context:
> http://www.nabble.com/Two-questions%3A-Roadmap-and-Editable-Grids-tf4289464.html#a12211258
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Can we do straight print in a java web application?

2007-08-18 Thread Igor Vaynberg
i think its a little out of scope of wicket :)

prob what you would need is a browser plugin

-igor


On 8/18/07, Eko S.W. <[EMAIL PROTECTED]> wrote:
>
> Dear all,
>
> I would like to found out about something : can we do straight print in a
> java web application?
> That is, we do not rely on window.print(), because we rely on browser to
> print them.
>
> I have an idea, silly perhaps, that we build another "daemon" that listen
> to
> something.
> That daemon wait, and when printing request from java web application does
> occur, it will do the printing.
>
> Is it applicable?
> Because as a matter of moving from desktop to web, maybe printing is one
> aspect that as an application developer, will be of some challenge.
>
> Thanks in advance
>
> --
> Best wishes,
> Eko SW
> http://swdev.blogs.friendster.com/my_blog/
>


generic validator questions

2007-08-18 Thread Stojce Dimski
Hi I am new to wicket and during my studying phase (1.3b2) I wrote a
small validator for my pilot project.
Validator checks that class indicated by some control implements
specified interface or is subclass of specified class. It works like
charm.
But I have a big problems locating the messages for display purposes.
What is the correct way to make a _generic_ validator (like
'PatternValidator') not tied to any form and specify his messages in
some .properties file ???
Can some kind soul enlight me ?



import org.apache.wicket.validation.*;
import org.apache.wicket.validation.validator.*;

public class ClassValidator extends AbstractValidator {
private static final long serialVersionUID = 1L;
private final Class  validClass;

public ClassValidator (final Class  validClass) {
this.validClass = validClass;
}

@Override
protected void onValidate (final IValidatable validatable) {
final String validatableClassName = (String)
validatable.getValue();
try {
final Class  validatableClass =
Class.forName(validatableClassName);
final Object validatableInstance =
validatableClass.newInstance();
if (!validClass.isInstance(validatableInstance))
error(validatable, "notValid");
} catch (ClassNotFoundException problem) {
error(validatable, "notFound");
} catch (InstantiationException problem) {
error(validatable, "instantiation");
} catch (IllegalAccessException problem) {
error(validatable, "illegalAccess");
}
}
}



  ___ 
L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: 
http://it.docs.yahoo.com/nowyoucan.html

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



Re: Wicket with Excel

2007-08-18 Thread Edi


I have a grid form
Form grid = new Form("gridform")

add 
grid.add(createLoop());

actually createLoop is a ListView

It looks like 
private ListView createLoop()
{}

createLoop returns the cell row value and column values.

I have put one method in after createLoop() ListView, But that method have
called first. And 2nd createLoop have executed.

My question is
1. I want to call one function in before/after createLoop(). How? 
2. What is 
grid.add(createLoop());




Edi wrote:
> 
> I have one doubt in wicket with excel code.
> 
> you have createLoop(). right?
> 
> I want to call one function in before/after createLoop(). How?
> 
> "grid.add(createLoop());"
> 
> And how create Loop works.
> 
> Please explain and let me know.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Wicket-with-Excel-tf4289686.html#a12213463
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Custom StringHeaderContributor

2007-08-18 Thread Tauren Mills
Maybe its just late and I'm not thinking straight, but I can't figure
out the best way to create a custom StringHeaderContributor.  All I
want it to is encapsulate some javascript that has some property
replacements in it.

I have it working with a custom model as such:

  add(new StringHeaderContributor(new PngTransparency(this)));

But I want it to look like this:

  add(new PngTransparencyHeaderContributor(this));

It's not really a big deal, but it seems like it would be cleaner that
way.  Here is the model class:

public class PngTransparency extends Model {

public static final ResourceReference PNGFIX = new
ResourceReference(PngTransparency.class, "PngTransparency.js");
public static final ResourceReference TRANSPARENT_PIXEL = new
ResourceReference(PngTransparency.class, "transparentpixel.gif");

public PngTransparency(Component component) {

String output =
"\n";
setObject(output);
}
}

Any ideas?

Tauren

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



Wicket with Excel

2007-08-18 Thread Edi

I have one doubt in wicket with excel code.

you have createLoop(). right?

I want to call one function in before/after createLoop(). How?

"grid.add(createLoop());"

And how create Loop works.

Please explain and let me know.

-- 
View this message in context: 
http://www.nabble.com/Wicket-with-Excel-tf4289686.html#a12211891
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Can I HTTP Post from static html page to a Wicket page?

2007-08-18 Thread Chris Lintz

Hi all,
I want to post to a Bookmarkable page from a static (non-Wicket page).  I am
having a tough time figuring out exactly how this can be done.  For example,
I simply want a static home page  to contain a basic form with the form
action="/auth/login" .  

Is this possible with a Wicket page?  I can't find any examples for pure
http posts to a wicket page/form.

thanks 


chris
-- 
View this message in context: 
http://www.nabble.com/Can-I-HTTP-Post-from-static-html-page-to-a-Wicket-page--tf4289562.html#a12211582
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Two questions: Roadmap and Editable Grids

2007-08-18 Thread dtoffe

Hi !!

I'm completely new to Wicket, and I really like it compared to JSP/JSF
etc. I would like to know more about the project roadmap, what are the new
features that are coming, expected releases, etc.
I wonder if is it possible to create a custom component that behaves
like an editable grid. For example, I want a flexible grid like those in
Visual Basic or Delphi, in which I can set some cells as editable, some
fixed, some in other colour, is this feasible ??  How hard it would be ??
   As I understood, I could control all of these behaviours in the Java
code, is this right ??

Thanks in advance !!

Daniel

-- 
View this message in context: 
http://www.nabble.com/Two-questions%3A-Roadmap-and-Editable-Grids-tf4289464.html#a12211258
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Can we do straight print in a java web application?

2007-08-18 Thread Eko S.W.
Dear all,

I would like to found out about something : can we do straight print in a
java web application?
That is, we do not rely on window.print(), because we rely on browser to
print them.

I have an idea, silly perhaps, that we build another "daemon" that listen to
something.
That daemon wait, and when printing request from java web application does
occur, it will do the printing.

Is it applicable?
Because as a matter of moving from desktop to web, maybe printing is one
aspect that as an application developer, will be of some challenge.

Thanks in advance

-- 
Best wishes,
Eko SW
http://swdev.blogs.friendster.com/my_blog/