Re: Framework sales pitch

2009-05-26 Thread Ricky
That would make sense, but personally I have not seen much of the articles
etc written on wicket by the framework developers themselves, So am I
missing something?

The word has to get out somehow at some point ... how does that happen? is
it random?

Regards
Vyas, Anirudh


On Sun, May 24, 2009 at 3:31 PM, Scott Swank scott.sw...@gmail.com wrote:

 I suspect that articles on broadly read sites, such as theserverside 
 dzone are significant vectors.

 Scott

 On Sun, May 24, 2009 at 11:37 AM, Ricky ricky...@gmail.com wrote:
  Hi,
 
  I am interested in knowing as to how does a framework reach its potential
  developers in open source, for example Wicket, it started out and so how
 do
  people know about it?
  1.) Is it that person A tells person B tells person C sort of chain?
  2.) Or is it well planned out? if so how?
 
  Just curious...
 
  Regards
  Vyas, Anirudh
  ||  ॐ  ||
 

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




Framework sales pitch

2009-05-24 Thread Ricky
Hi,

I am interested in knowing as to how does a framework reach its potential
developers in open source, for example Wicket, it started out and so how do
people know about it?
1.) Is it that person A tells person B tells person C sort of chain?
2.) Or is it well planned out? if so how?

Just curious...

Regards
Vyas, Anirudh
||  ॐ  ||


Re: toString( ) and naming conventions in Component class

2009-03-26 Thread Ricky
thanks, i'll create a JIRA issue and submit a patch tonight, appreciate your
time!

On Thu, Mar 26, 2009 at 8:31 AM, Johan Compagner jcompag...@gmail.comwrote:

 if you have a patch for better toString() impl be my guest and attach it to
 jira

 Those Changes classes are internal to component, they are inner classes of
 Component so they dont have to specify that extra name..
 Its just verbose. Also those 2 are protected final but i think they could
 be
 private if you ask me.
 So they are just internal

 On Thu, Mar 26, 2009 at 02:49, Ricky ricky...@gmail.com wrote:

  Hi,
 
  This concerns Wicket Version : 1.4-rc2
 
 
  In componentModelChange class, we see the following :
 @Override
 public String toString()
 {
 return ComponentModelChange[component:  + getPath() + ];
 }
 
  ComponentModelChange[ piece of it, in toString( ) shouldn't that be
  this.getClass().getSimpleName( ) + [ or something in those lines, I see
  that most of the component change classes are based on a format like that
  ... am i missing something? If we see the Behaviour Change code that
  follows
  , we use more dynamic this.getClass() to spit out toString( ); If I may
  ask,
  is the Behavior change toString ( ) and OtherChange format different by
  some
  agreeable convention ?  Also the toString( ) seems to be missing on
  ComponentBorderChange class.
 
  One more small observation, our naming conventions on Change class are
  inconsistent in many cases, for example, VisibilityChange and
 EnabledChange
  .. for what? question comes to mind, and the answer is component ... that
  to
  me infers that either it should be:
  1.) ChangeCOMPONENT extends Component
  if above is not acceptable, then
  2.) name it like ComponentEnabledChange or something in those lines?
 
  Just some thoughts.
  Sorry If questions have already been answered or are not appropriate,
  thought i'd ask the programming elites of wicket ;)
 
  Regards
  Vyas, Anirudh
  ||  ॐ  ||
 




-- 

Regards
Vyas, Anirudh
||  ॐ  ||


Re: toString( ) and naming conventions in Component class

2009-03-26 Thread Ricky
https://issues.apache.org/jira/browse/WICKET-2187

done. thank you.

On Thu, Mar 26, 2009 at 11:40 AM, Ricky ricky...@gmail.com wrote:

 thanks, i'll create a JIRA issue and submit a patch tonight, appreciate
 your time!


 On Thu, Mar 26, 2009 at 8:31 AM, Johan Compagner jcompag...@gmail.comwrote:

 if you have a patch for better toString() impl be my guest and attach it
 to
 jira

 Those Changes classes are internal to component, they are inner classes of
 Component so they dont have to specify that extra name..
 Its just verbose. Also those 2 are protected final but i think they could
 be
 private if you ask me.
 So they are just internal

 On Thu, Mar 26, 2009 at 02:49, Ricky ricky...@gmail.com wrote:

  Hi,
 
  This concerns Wicket Version : 1.4-rc2
 
 
  In componentModelChange class, we see the following :
 @Override
 public String toString()
 {
 return ComponentModelChange[component:  + getPath() + ];
 }
 
  ComponentModelChange[ piece of it, in toString( ) shouldn't that be
  this.getClass().getSimpleName( ) + [ or something in those lines, I
 see
  that most of the component change classes are based on a format like
 that
  ... am i missing something? If we see the Behaviour Change code that
  follows
  , we use more dynamic this.getClass() to spit out toString( ); If I may
  ask,
  is the Behavior change toString ( ) and OtherChange format different by
  some
  agreeable convention ?  Also the toString( ) seems to be missing on
  ComponentBorderChange class.
 
  One more small observation, our naming conventions on Change class are
  inconsistent in many cases, for example, VisibilityChange and
 EnabledChange
  .. for what? question comes to mind, and the answer is component ...
 that
  to
  me infers that either it should be:
  1.) ChangeCOMPONENT extends Component
  if above is not acceptable, then
  2.) name it like ComponentEnabledChange or something in those lines?
 
  Just some thoughts.
  Sorry If questions have already been answered or are not appropriate,
  thought i'd ask the programming elites of wicket ;)
 
  Regards
  Vyas, Anirudh
  ||  ॐ  ||
 




 --

 Regards
 Vyas, Anirudh
 ||  ॐ  ||




-- 

Regards
Vyas, Anirudh
||  ॐ  ||


Re: toString( ) and naming conventions in Component class

2009-03-26 Thread Ricky
 I tried to implement something like:

// java docs removed for clarity
public abstract class ChangeFORMER extends IClusterable implements
IClusterable {

private static final long serialVersionUID = 1L;

   // former type
public FORMER former;

protected Change(final FORMER former)
{
setFormer(former);
}
public final FORMER getFormer()
{
return former;
}
public final void setFormer(FORMER former)
{
this.former = former;
}

public abstract void undo();
}

Then i changed a sample Change class code to something like:  (renamed the
VisibilityChange to ComponentVisibility for more explicit name)
ComponentVisibilityChange implements ChangeComponent
{

protected ComponentVisibilityChage(final Component component)
{
   super(component);
}

public void undo()
{
  do something (getFormer() );
}
}
This reduces a lot state maintainence on part on concrete change classes and
makes their names more explicitly apparent based on FORMER parameter type
given to Change, hence my boiler plate code is less in concrete change
classes. But then i saw classes like CurrentPageChange where current page
type is given as an int ... =( and not something like new
ModelInteger(currentPage);

I thought IClusterable served as a namespace of sorts for everything
associated with wicket, especially for the change track bound entities type
...  (something better than just an int) ... ?

some thoughts/questions thought i'd ask.

Thanks for your time.
Regards
Vyas, Anirudh
On Thu, Mar 26, 2009 at 9:13 PM, Ricky ricky...@gmail.com wrote:

 https://issues.apache.org/jira/browse/WICKET-2187

 done. thank you.


 On Thu, Mar 26, 2009 at 11:40 AM, Ricky ricky...@gmail.com wrote:

 thanks, i'll create a JIRA issue and submit a patch tonight, appreciate
 your time!


 On Thu, Mar 26, 2009 at 8:31 AM, Johan Compagner jcompag...@gmail.comwrote:

 if you have a patch for better toString() impl be my guest and attach it
 to
 jira

 Those Changes classes are internal to component, they are inner classes
 of
 Component so they dont have to specify that extra name..
 Its just verbose. Also those 2 are protected final but i think they could
 be
 private if you ask me.
 So they are just internal

 On Thu, Mar 26, 2009 at 02:49, Ricky ricky...@gmail.com wrote:

  Hi,
 
  This concerns Wicket Version : 1.4-rc2
 
 
  In componentModelChange class, we see the following :
 @Override
 public String toString()
 {
 return ComponentModelChange[component:  + getPath() + ];
 }
 
  ComponentModelChange[ piece of it, in toString( ) shouldn't that be
  this.getClass().getSimpleName( ) + [ or something in those lines, I
 see
  that most of the component change classes are based on a format like
 that
  ... am i missing something? If we see the Behaviour Change code that
  follows
  , we use more dynamic this.getClass() to spit out toString( ); If I may
  ask,
  is the Behavior change toString ( ) and OtherChange format different by
  some
  agreeable convention ?  Also the toString( ) seems to be missing on
  ComponentBorderChange class.
 
  One more small observation, our naming conventions on Change class are
  inconsistent in many cases, for example, VisibilityChange and
 EnabledChange
  .. for what? question comes to mind, and the answer is component ...
 that
  to
  me infers that either it should be:
  1.) ChangeCOMPONENT extends Component
  if above is not acceptable, then
  2.) name it like ComponentEnabledChange or something in those lines?
 
  Just some thoughts.
  Sorry If questions have already been answered or are not appropriate,
  thought i'd ask the programming elites of wicket ;)
 
  Regards
  Vyas, Anirudh
  ||  ॐ  ||
 




 --

 Regards
 Vyas, Anirudh
 ||  ॐ  ||




 --

 Regards
 Vyas, Anirudh
 ||  ॐ  ||




-- 

Regards
Vyas, Anirudh
||  ॐ  ||


toString( ) and naming conventions in Component class

2009-03-25 Thread Ricky
Hi,

This concerns Wicket Version : 1.4-rc2


In componentModelChange class, we see the following :
@Override
public String toString()
{
return ComponentModelChange[component:  + getPath() + ];
}

ComponentModelChange[ piece of it, in toString( ) shouldn't that be
this.getClass().getSimpleName( ) + [ or something in those lines, I see
that most of the component change classes are based on a format like that
... am i missing something? If we see the Behaviour Change code that follows
, we use more dynamic this.getClass() to spit out toString( ); If I may ask,
is the Behavior change toString ( ) and OtherChange format different by some
agreeable convention ?  Also the toString( ) seems to be missing on
ComponentBorderChange class.

One more small observation, our naming conventions on Change class are
inconsistent in many cases, for example, VisibilityChange and EnabledChange
.. for what? question comes to mind, and the answer is component ... that to
me infers that either it should be:
1.) ChangeCOMPONENT extends Component
if above is not acceptable, then
2.) name it like ComponentEnabledChange or something in those lines?

Just some thoughts.
Sorry If questions have already been answered or are not appropriate,
thought i'd ask the programming elites of wicket ;)

Regards
Vyas, Anirudh
||  ॐ  ||


Re: toString( ) and naming conventions in Component class

2009-03-25 Thread Ricky
or better have a something like IChangeCLUSTERABLE extends IClusterable,
that would simply the change component type hierarchy and make our naming
conventions more apparent ... is that a valid opinion?

Regards
Vyas, Anirudh

On Wed, Mar 25, 2009 at 9:49 PM, Ricky ricky...@gmail.com wrote:

 Hi,

 This concerns Wicket Version : 1.4-rc2


 In componentModelChange class, we see the following :
 @Override
 public String toString()
 {
 return ComponentModelChange[component:  + getPath() + ];
 }

 ComponentModelChange[ piece of it, in toString( ) shouldn't that be
 this.getClass().getSimpleName( ) + [ or something in those lines, I see
 that most of the component change classes are based on a format like that
 ... am i missing something? If we see the Behaviour Change code that follows
 , we use more dynamic this.getClass() to spit out toString( ); If I may ask,
 is the Behavior change toString ( ) and OtherChange format different by some
 agreeable convention ?  Also the toString( ) seems to be missing on
 ComponentBorderChange class.

 One more small observation, our naming conventions on Change class are
 inconsistent in many cases, for example, VisibilityChange and EnabledChange
 .. for what? question comes to mind, and the answer is component ... that to
 me infers that either it should be:
 1.) ChangeCOMPONENT extends Component
 if above is not acceptable, then
 2.) name it like ComponentEnabledChange or something in those lines?

 Just some thoughts.
 Sorry If questions have already been answered or are not appropriate,
 thought i'd ask the programming elites of wicket ;)

 Regards
 Vyas, Anirudh
 ||  ॐ  ||



Re: how to build lastest 1.3.x jar

2009-03-08 Thread Ricky
Cant you enforce that in POM file (what version to use) so it doesn't
proceed at all ... (use jdk 5 or fail).

Regards
Vyas, Anirudh

On Sun, Mar 8, 2009 at 4:23 PM, Martijn Dashorst martijn.dasho...@gmail.com
 wrote:

 maven.test.skip=true was the first I needed to remember, so it is hard
 to get out of my head and replace it with -DskipTests

 You could also consider running the maven build with a Java 5 JDK
 instead of your Java 6 JDK. The tests shouldn't fail then (Java 6 has
 altered the internals of HashMap/HashSet causing differences in the
 order of attributes in the reference markup used in our tests).

 Martijn

 On Sun, Mar 8, 2009 at 8:58 PM, Dave Schoorl mailli...@cyber-d.com
 wrote:
  run mvn install -DskipTests
 
  The difference with mvn -Dmaven.test.skip=true install is that the test
  classes are compiled, but the tests just are not run. The option
  maven.test.skip=true prevents the compilation of the test classes and
 the
  absence of the test classes is what maven is complaining about.
 
 
 
  NHSoft.YHW wrote:
 
  I can not found where to get lastest 1.3.x jar file, so I build from
  source,
  but there always has error.
 
  check out lastest code from
  http://svn.apache.org/repos/asf/wicket/branches/wicket-1.3.x;, then
 build
  with mvn installl, but build failure because some test case run error.
  so
  I build with mvn -Dmaven.test.skip=true install as wicket site said,
 but
  there has some error, detail information
 
  INFO] [bundle:manifest {execution: bundle-manifest}]
  [WARNING] Warning in manifest for
  org.apache.wicket:wicket-extensions:jar:1.3-SN
  APSHOT : Superfluous export-package instructions: [org, org.apache,
  org.apache.w
  icket, org.apache.wicket.extensions.ajax,
  org.apache.wicket.extensions.ajax.mark
  up, org.apache.wicket.extensions.ajax.markup.html.form,
  org.apache.wicket.extens
  ions.ajax.markup.html.repeater,
  org.apache.wicket.extensions.ajax.markup.html.re
  peater.data, org.apache.wicket.extensions.markup,
  org.apache.wicket.extensions.m
  arkup.html, org.apache.wicket.extensions.markup.html.image,
  org.apache.wicket.ex
  tensions.markup.html.repeater,
  org.apache.wicket.extensions.markup.html.repeater
  .data, org.apache.wicket.extensions.util,
  org.apache.wicket.extensions.validatio
  n]
  [INFO] [resources:testResources]
  [INFO] Using default encoding to copy filtered resources.
  [INFO]
  
  [ERROR] BUILD ERROR
  [INFO]
  
  [INFO] Failed to resolve artifact.
 
  Missing:
  --
  1) org.apache.wicket:wicket:jar:tests:1.3-SNAPSHOT
 
   Try downloading the file manually from the project website.
 
   Then, install it using the command:
   mvn install:install-file -DgroupId=org.apache.wicket
  -DartifactId=wicket -
  Dversion=1.3-SNAPSHOT -Dclassifier=tests -Dpackaging=jar
  -Dfile=/path/to/file
 
   Alternatively, if you host your own repository you can deploy the file
  there:
 
   mvn deploy:deploy-file -DgroupId=org.apache.wicket
  -DartifactId=wicket
  -Dv
  ersion=1.3-SNAPSHOT -Dclassifier=tests -Dpackaging=jar
  -Dfile=/path/to/file
  -Dur
  l=[url] -DrepositoryId=[id]
 
   Path to dependency:
 1) org.apache.wicket:wicket-extensions:jar:1.3-SNAPSHOT
 2) org.apache.wicket:wicket:jar:tests:1.3-SNAPSHOT
 
  --
  1 required artifact is missing.
 
  for artifact:
   org.apache.wicket:wicket-extensions:jar:1.3-SNAPSHOT
 
  from the specified remote repositories:
   central (http://repo1.maven.org/maven2)
 
  anyone could help me how to build, or where to get lastest build jar
  files,
  thanks.
 
 
 
 
 
 
  -
  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.3.5 is released
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

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




Re: Javadoc for wicket 1.3.5 - how to include it in eclipse

2008-10-31 Thread Ricky
umm ... there is a -DdownloadJavaDocs=true ... u can use that too.

On Fri, Oct 31, 2008 at 4:58 AM, Martijn Dashorst 
[EMAIL PROTECTED] wrote:

 this is not for including javadoc, this is for generating it. Pieter
 wants to use the javadoc/source bundles we provide in the maven
 repository.

 mvn eclipse:eclipse -DdownloadSources=true

 should work (note the capital S)

 Martijn

 On Fri, Oct 31, 2008 at 9:41 AM, Xhelas [EMAIL PROTECTED] wrote:
 
  You have run run mvn javadoc:javadoc at the root of the source
 directory.
  This will generated all the javadoc. Then you have to associate each jar
  with its corresponding javadoc root directory.
 
  Regards,
 
  Alexandre
 
 
  Pieter Claassen wrote:
 
  What is the most effective way to get the documentation available
 offline
  for wicket 1.3.5 in Eclipse. I notice that mvn eclipse:eclipse
  -Ddownloadsources=true does not give javadocs.
 
  Regards,
  Pieter
 
 
 
  --
  View this message in context:
 http://www.nabble.com/Javadoc-for-wicket-1.3.5---how-to-include-it-in-eclipse-tp20261585p20261864.html
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



 --
 Become a Wicket expert, learn from the best: http://wicketinaction.com
 Apache Wicket 1.3.4 is released
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

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




-- 

Regards
Vyas, Anirudh
||  ॐ  ||


Re: Migration to 1.4 - generic headache

2008-10-30 Thread Ricky
I don't know if i should speak up amongst elite group of people discussing,
but hey i'll try ... :)

From what i understand most people have issues with readability of generics;
but as i have indicated time and again as java improves and generic types
become reified; and java becomes inferred static typed; generic notation
will be less DRY violating and more clear.

But its the conceptual approach that i am not sure I am following (which is
why said may be I shouldn't be posting this :)). A component has to have an
associated model type with it. Generifying models is mandatory... but from
what i see; not generifying components would be a big mistake.

I cannot see any model less component. A component interacts with underlying
application data using model wrapper ... that was the beauty of wicket that
i had come to love the most and if now we are saying that it is valid in
some cases and in some it isn't is contradictory. If anything; for
consistency sake we should go with component level generification. But i
guess i am in the minority in that issue.

Generics is something that java developers have to get used to and it takes
some time ... but just because it takes some time; we should choose a middle
ground solution isn't exactly right; may be more practical (oh well ;) ).

On Thu, Oct 30, 2008 at 2:34 PM, Johan Compagner [EMAIL PROTECTED]wrote:

 i agree and we only need 2 things to be fixed improved by sun and then all
 the current problems are completely gone
 But i guess we never get them
 Because they find JavaFX way more importand.. I am glad the focused on that
 because it gave us Java6U10 but that whole JavaFX i dont have much hope for
 that.

 johan


 On Thu, Oct 30, 2008 at 6:25 PM, Edward [EMAIL PROTECTED]
 wrote:

 
  Well I'll speak up and say I don't like generics in Wicket.  I like them
   in other places... just not here.  It is a lot of extra ugly code just
  to fix the rare occurrence that I have to cast the model object.
 
  Not to mention in my opinion it breaks the data abstraction the model
  provides.  Might as well get rid of the model all together.
 
  When I first started using Wicket I admit I was shocked there were no
  generics and I was accessing the model object all the time and casting.
   As I got better at using Wicket though I found better ways of doing
  things and I believe I haven't done a cast even once in the past 6
  months - and I have developed some fairly complicated apps in that time.
 
  I think 1.3 is designed very well and I like it a lot.
 
  Edward
 
 
 
  Jan Kriesten wrote:
 
  Hi Igor,
 
   you are against generics completely. but they are going to happen. the
  way they are now is not perfect, in 1.5 we will try to move them to a
  better place, but like it or not they are here to stay.
 
 
  huh - hell, no, I'm not against generics at all. Where do you get that
  from? I'm
  against generics on Components which are not FormComponents (or
  ListViews)!
 
  I'm using Wicket together with Scala and other than with Java, I can't
  just drop
  the generics attributes (and live with the warnings). And the Void is
  really a
  hell of a generic...
 
  Generics on Models are what is needed and if your vision to decouple
  models from
  the component and use introspection/reflection to support them comes
 true
  I'd be
  quite happy (and could use Scala's mixin-feature to have my model
  functionality
  on the components).
 
  Best regards, --- Jan.
 
 
 
  -
  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]
 
 




-- 

Regards
Vyas, Anirudh
||  ॐ  ||


setObject( ), getObject( )

2008-10-20 Thread Ricky
Hi,

Is there any reason getObject and setObject were not made final in Model
class? the reason why i am asking is that there might be the case when
people misuse this; for example (and i have seen this at my current
workplace);

Model xModel = new Model(new Long(1)) {

@Override
public Object getObject() {
// return super.getObject(); -- not calling this, instead i
return null
return null;
}
};

// some lines afterwards ... i need this model ... i use it
(expecting to get back object i set)
// instead i get null. Original intent was to set object passed in
and get the same thing ...
System.out.println(xModel.getObject());

Here i get null as the result.

Any suggestions?

Regards
Vyas, Anirudh


What to add in a page or a panel

2008-09-30 Thread Ricky
Hi,

My question has probably been asked before, but i just need some
clarification. This is pertinent from an architectural perspective. Are
pages, panels only holders of state for components or wicket models? Should
*ANY* logic (business, UI, Validation) be added directly to the pages? or
should it be delegated to another helper class (a term i am using loosely to
represent any class other than a wicket container) to do the dirty work?

Any advice would be appreciable.

Regards
Vyas, Anirudh
||  ॐ  ||


Crystal Reports with Wicket

2008-09-10 Thread Ricky
While using crystal report viewer to display reports; I use a method
getHtmlContent(  ) which calls getWriter(  ) on response, however as far as
i can make out, Wicket by default uses getOutputStream( ) on response,
therefore when getHtmlContent( ) is called on report view while displaying
report viewer in a pop-up window (or a page) it throws an exception instead
of producing a report on report viewer.

Is there a way to get around this issue? (meaning, is there a way to
suppress the usage of getOutputStream( ) and use getWriter( ) instead?).

Any suggestions would be appreciated.

Thanks in advance!
Regards
Vyas, Anirudh
|| ॐ ||


Re: Getting hold of Container's markup

2008-08-15 Thread Ricky
While using Wicket tester for starting a panel and then visiting the
components to extract and build the text out of it, we are encountering a
session expiration problem; Is it because of  DummyWebApplication and new
session being created by WicketTester? if so is there a workaround for this?

Appreciate your help!
Rick

On Mon, Jul 28, 2008 at 6:28 PM, Ricky [EMAIL PROTECTED] wrote:

 I'll give it a shot and see how it goes, thanks for your help Igor
 appreciate it!

 Regards
 Vyas, Anirudh


 On Fri, Jul 25, 2008 at 3:03 PM, Igor Vaynberg [EMAIL PROTECTED]wrote:

 my advice to you, if you want to go this way, is to use wickettester
 to render the component. it is really easy to pull out the output from
 that.

 -igor

 On Fri, Jul 25, 2008 at 11:51 AM, Ricky [EMAIL PROTECTED] wrote:
  Hi Igor,
  Thanks for replying again and bearing with me, appreciate your help.
 
  Here is what i have so far :
  ===
 public static final String generatePlainTextFromContainer(final
  MarkupContainer sourceContainer) {
 sourceContainer.visitChildren(new Component.IVisitor() {
 
  // Loop through each child of the markup container to do
  setRenderBodyOnly to true.
   public final Object component(final Component component) {
 if (component != null) {
 component.setRenderBodyOnly(true);
 }
 return CONTINUE_TRAVERSAL;
 }
 });
 
 if (!sourceContainer.hasBeenRendered()) {
 throw new IllegalStateException(Source container has not
 been
  rendered.); *//  Is this right?*
 }
 
  // uses REGEX to strip off all HTML etc.
 // container.getResponse( ) gives me the content and HTML that i
  need.
 return
  convertHTMLToPlainText(sourceContainer.getResponse().toString());
  }
 
  Now a part that i am missing is knowing WHEN and WHERE exactly
 should i
  call this method, so that a panel or Page can be converted to plain text
  (With COMPLETE markup). Right now, i get some markup, but some of the
 markup
  (ESPECIALLY refreshing views) are missing altogether.
 
  I tried to call it onBeforeRender( ) and as well as onAfterRender( );
 but it
  gives an empty response. I could replace if sourceContainer has not been
  rendered if block contents with sourceContainer.render( ) to forcefully
  render it, but it screws other things up in the page.
 
  My goal is have this method being passed any PANEL or Page and be able
 to
  generate plain text from it. When i pass in the panel it is UNABLE to
 get
  the page so it throws an exception. So in work around i am thinking if i
  create a Page and pass in the markup container to the constructor of the
  page, i could add that to the page hierarchy and then get what i what i
  want; but the issue with that is, that What ID will i put in my markup
  HTML??
 
 
  I would sincerely appreciate ideas / suggestion / responses on whether i
 am
  going on the right track or is there a better way??
 
  Thanks and Regards
  Vyas, Anirudh
 
  On Thu, Jul 24, 2008 at 1:47 PM, Igor Vaynberg [EMAIL PROTECTED]
 
  wrote:
 
  application.init() {
  getrequestcyclesettngs().addresponsefilter(new iresponsefilter() {
   public appendingatringbuffer filter(appendingstringbuffer
 responsebuffer)
  {
  return responsebuffer.append(!-- generated at: +new Date()+
 --);
   }
  }
 
  that is an example filter that adds a comment at the end of the html
 
  -igor
 
  On Thu, Jul 24, 2008 at 10:42 AM, Ricky [EMAIL PROTECTED] wrote:
   Hi Igor,
  
   Thanks for reply!
   My apologies, but could elaborate a little on IResponseFilter usage
  as a
   skeletal example. I am not following Java documentation's verbiage
 that
  well
   (sorry if i come across as dumb).
  
   Regards
   Vyas, Anirudh
  
   On Wed, Jul 23, 2008 at 11:40 AM, Igor Vaynberg 
 [EMAIL PROTECTED]
  
   wrote:
  
   see IResponseFilter.
  
   as far as spitting out text, wicket works with xml not plain text.
 but
   if you call setrenderbodyonly(true) on all components there wont be
   any xml tags left in the output.
  
   -igor
  
   On Wed, Jul 23, 2008 at 8:20 AM, Ricky [EMAIL PROTECTED] wrote:
Hi,
   
I have two questions (related) :
1.) Is there a way in wicket to get Not the raw markup but markup
*AFTER*the actual data has been inserted? (meaning the final HTML
 as
we see it on
the page?).
2.) Similar to above scenario, can you use container to spit out
  markup
   in
some other form, for example Plain Text or XML form ? (the markup
 with
actual data).
   
I prepared a test case for the same, which used a TestPage and
 Wicket
   Tester
to start the page and then called
 testPage.getAssociateMarkup(true);
   and
testPage.getMarkup(). I tried to call it after doing
 testPage.render()
   but
no change.
   
   
Regards
Vyas, Anirudh

Re: [announce] Wicket in Action e-book has been published!

2008-08-14 Thread Ricky
I enjoyed MEAP, and i like how slick and colorful ( ;=)  ) it looks right
now, i havent gone through the whole thing to know what are the major
changes if any from MEAP. IMHO this is a great book, although i'd love to
see a part ii (i dont know how soon that would be considering the effort it
took to have this book out and all the other peripheral issues with it that
i surely do understand =)  ... in particular chapters related to
DataProviders in an ellaborate manner would be cool).

But this book is just awesome!

Great Job Guys!!
Thanks,
Rick

On Thu, Aug 14, 2008 at 10:20 AM, greeklinux [EMAIL PROTECTED] wrote:


 Congratulation and thank you!

 I bought the book and it was very helpfull.





 Martijn Dashorst wrote:
 
  Almost 3 years of hard work, loosing friends, moving abroad, marrying
  lovely wives, late nights, early mornings, frustrated family, and all
  other bad (and good) things that cross one's life is now rewarded with
  the availability of the e-book edition of Wicket in Action. The print
  edition (also know as dead-tree edition) will be available in just
  over 2 weeks (estimated at Aug 29th).
 
  Eelco and I are *really*, *really* glad that the journey is finally
  over. We think it was worth it. Now we leave the book in your capable
  hands to make beautiful applications that make your boss and customers
  happy and we are sure you'll enjoy creating them.
 
  Eelco Hillenius  Martijn Dashorst
 
  About Wicket in Action
 
  Wicket in Action is a comprehensive guide for Java developers building
  Wicket-based web applications. It introduces Wicket's structure and
  components, and moves quickly into examples of Wicket at work. Written
  by core committers, this book shows you the how-to and the why of
  Wicket. You'll learn to use and customize Wicket components, to
  interact with Spring and Hibernate, and to implement rich Ajax-driven
  features.
 
  Some quotes of early access reviewers:
 
  Finally, the Web Framework of web framework, Apache Wicket, now has a
  bible of its own. - Per Ejeklint
 
  Without question, Wicket in Action... is the be-all and end-all when
  it comes to Wicket. - Geertjan Wielenga
 
  Wicket In Action glues the areas of web development with Apache
  Wicket together and gives a great overview of Apache Wicket...it will
  make a great compendium. - Nino Martinez Wael
 
  You can read full reviews here:
   - Nick Heudecker: Wicket In Action Book Review
 http://www.theserverside.com/news/thread.tss?thread_id=50326
 
   - Geertjan Wielenga: Wicket in Action: Undoubtedly The Wicket Bible
 http://blogs.sun.com/geertjan/entry/wicket_in_action_undoubtedly_the
 
  Free content
 
  If you don't think these reviewers are qualified to tell you to buy
  Wicket in Action, let these free samples convince you:
 
   * Chapter 1: http://www.manning.com/dashorst/ch01_dashorst.pdf
   * Chapter 8: http://www.manning.com/dashorst/ch08_dashorst.pdf
   * Excerpt: Creating Secure Web Applications with Apache Wicket
  (http://www.manning.com/free/excerpt_Wicket.html)
 
  MEAP readers
 
  If you bought the MEAP edition you'll receive a personal download link
  for the final e-book in your inbox today (or possibly tomorrow). We'd
  like to extend our gratitude to the MEAP readers - without you and
  your encouragements we would've given up.
 
  Limited summer discount
 
  There is a 35% discount when you buy Wicket in Action at the manning
  website before the end of August. For more details look here:
  http://manning.com/dashorst
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context:
 http://www.nabble.com/-announce--Wicket-in-Action-e-book-has-been-published%21-tp18971645p18982490.html
 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: passing objects between pages

2008-07-29 Thread Ricky
Hey,

so you've got a class CreateUser which is a factory that creates an Edit
Page? The name would be misleading i think. You could have something like
PageFactoryCONTAINERMODEL, CONTANER extends MarkupContainer, MODEL
extends IModel? (i kept capture (?) just as an example)  and throw in a
create method in there which is something like : createPage(final MODEL
model) { }.

But I am thinking that Wicket's idea was not to manage the life cycle of
objects to keep it simpler; otherwise its very easy to become Dependency
Injection type container to provide for things like above.

Just a thought, only Igor can verify that info, i could be plain wrong.

Regards,
Rick

On Tue, Jul 29, 2008 at 12:49 AM, Jeremy Thomerson 
[EMAIL PROTECTED] wrote:

 As far as the constructor problem is concerned, I may not fully understand
 your problem, but what about static factory methods?

 CreateUser.createEditPage(IModelGroup)
 CreateUser.createAddPage(IModelUser)

 --
 Jeremy Thomerson
 http://www.wickettraining.com

 On Thu, Jul 24, 2008 at 6:50 AM, John [EMAIL PROTECTED] wrote:

  hi Igor,
 
  i do have a detachable Group model so am now passing that into my
  CreateUser page - thank you
 
  that is a very interesting point regarding serialization... thank you
  for mentioning it!  i will have to bear that in mind.
 
  as i understand generics, the generic identity is lost at run time so
  you cannot have two constructors accepting different IModels like
  IModelGroup and IModelUser.  is there an obvious way around this
  that i have not spotted?  my CreateUser page is also an edit page...
  as the code is exactly the same i am reusing it... but a create would
  pass a IModelGroup but an edit would pass IModelUser, but it
  cannot!!!  i have passed in the user id instead, and am loading it
  manually inside the page even though i already have the User object
  inside a detachable model when i make the Link to the edit page.  does
  this sound correct?
 
  hi Thomas,
 
  those are good rules!  i have written many pages with ids being used
  in Links, so for easy access to the object inside the model, i have
  creating final references to the model object at the start of the
  constructor... and then just calling myobject.getId() where needed.  i
  am concerned that this might break your second rule, as the object
  inside the model may not be the same i think?
 
  i have read that for example new Label(myObject.getName()) is bad
  because the Label will be fixed as the name when the page was first
  constructed, but it will not change if the name changes but the page
  is redisplayed.  however i have a gap in my understanding regrding
  redisplay of the page...
 
  when does a page get redisplayed?  a page that displays a School
  information can not be re used for a different School i think as the
  IModelSchool or School id will be passed to the page constructor.
  so it will only be displayed for the one School...  does that mean
  that the School object that is inside the model on the page will
  always be the same or will that object change when the model is
  detached and reattached?  so my final reference to the School object
  is a bad bad thing?
 
  also... when you view a different School does the first page still
  exist?  i can see the first page can not be reused if i click a link
  to view the first School that is passing a IModelSchool into the
  constructor, but if I pass the School id number via a PageParameters
  will Wicket reuse a page if the PageParameters match?
 
  john...
 
 
 
  On Tue, Jul 22, 2008 at 9:41 AM, Thomas Mäder [EMAIL PROTECTED]
  wrote:
   I have three rules for directly referencing objects from pages
  
   1) It's serializable
   2) The valueis not going to change from the time I construct the page
   to when I use the object
   3) It doesn't matter if I get a copy of the object (because of
  deserialization).
  
   2  3 can be summarized as the object being a value object
  
   Thomas
  
  
   On Mon, Jul 21, 2008 at 6:25 PM, Igor Vaynberg 
 [EMAIL PROTECTED]
  wrote:
   the easiest thing to do is to pass the imodelgroup into the second
   page. i assume you already have a detachable group model that you are
   using to list users, so just pass it to the next page.
  
   in general keeping references to objects is safe for as long as the
   objects them selves are valid. the problem with hibernate objects is
   that although you have a reference that you can keep forever, the
   object's lifecycle is not tied to that reference. the object is tied
   to the session whose scope is usually a request, so the object itself
   is only valid during the request, which is why you have to use
   loadable detachable models.
  
   if you had an object that is not tied to any kind of lifecycle you
   could keep a reference indefinetely.
  
   once you start talking about objects that live across pages you run
   into another issue. wicket serializes each page individually. that
   means if you 

Re: Getting hold of Container's markup

2008-07-28 Thread Ricky
I'll give it a shot and see how it goes, thanks for your help Igor
appreciate it!

Regards
Vyas, Anirudh

On Fri, Jul 25, 2008 at 3:03 PM, Igor Vaynberg [EMAIL PROTECTED]wrote:

 my advice to you, if you want to go this way, is to use wickettester
 to render the component. it is really easy to pull out the output from
 that.

 -igor

 On Fri, Jul 25, 2008 at 11:51 AM, Ricky [EMAIL PROTECTED] wrote:
  Hi Igor,
  Thanks for replying again and bearing with me, appreciate your help.
 
  Here is what i have so far :
  ===
 public static final String generatePlainTextFromContainer(final
  MarkupContainer sourceContainer) {
 sourceContainer.visitChildren(new Component.IVisitor() {
 
  // Loop through each child of the markup container to do
  setRenderBodyOnly to true.
   public final Object component(final Component component) {
 if (component != null) {
 component.setRenderBodyOnly(true);
 }
 return CONTINUE_TRAVERSAL;
 }
 });
 
 if (!sourceContainer.hasBeenRendered()) {
 throw new IllegalStateException(Source container has not been
  rendered.); *//  Is this right?*
 }
 
  // uses REGEX to strip off all HTML etc.
 // container.getResponse( ) gives me the content and HTML that i
  need.
 return
  convertHTMLToPlainText(sourceContainer.getResponse().toString());
  }
 
  Now a part that i am missing is knowing WHEN and WHERE exactly should
 i
  call this method, so that a panel or Page can be converted to plain text
  (With COMPLETE markup). Right now, i get some markup, but some of the
 markup
  (ESPECIALLY refreshing views) are missing altogether.
 
  I tried to call it onBeforeRender( ) and as well as onAfterRender( ); but
 it
  gives an empty response. I could replace if sourceContainer has not been
  rendered if block contents with sourceContainer.render( ) to forcefully
  render it, but it screws other things up in the page.
 
  My goal is have this method being passed any PANEL or Page and be able to
  generate plain text from it. When i pass in the panel it is UNABLE to get
  the page so it throws an exception. So in work around i am thinking if i
  create a Page and pass in the markup container to the constructor of the
  page, i could add that to the page hierarchy and then get what i what i
  want; but the issue with that is, that What ID will i put in my markup
  HTML??
 
 
  I would sincerely appreciate ideas / suggestion / responses on whether i
 am
  going on the right track or is there a better way??
 
  Thanks and Regards
  Vyas, Anirudh
 
  On Thu, Jul 24, 2008 at 1:47 PM, Igor Vaynberg [EMAIL PROTECTED]
  wrote:
 
  application.init() {
  getrequestcyclesettngs().addresponsefilter(new iresponsefilter() {
   public appendingatringbuffer filter(appendingstringbuffer
 responsebuffer)
  {
  return responsebuffer.append(!-- generated at: +new Date()+
 --);
   }
  }
 
  that is an example filter that adds a comment at the end of the html
 
  -igor
 
  On Thu, Jul 24, 2008 at 10:42 AM, Ricky [EMAIL PROTECTED] wrote:
   Hi Igor,
  
   Thanks for reply!
   My apologies, but could elaborate a little on IResponseFilter usage
  as a
   skeletal example. I am not following Java documentation's verbiage
 that
  well
   (sorry if i come across as dumb).
  
   Regards
   Vyas, Anirudh
  
   On Wed, Jul 23, 2008 at 11:40 AM, Igor Vaynberg 
 [EMAIL PROTECTED]
  
   wrote:
  
   see IResponseFilter.
  
   as far as spitting out text, wicket works with xml not plain text.
 but
   if you call setrenderbodyonly(true) on all components there wont be
   any xml tags left in the output.
  
   -igor
  
   On Wed, Jul 23, 2008 at 8:20 AM, Ricky [EMAIL PROTECTED] wrote:
Hi,
   
I have two questions (related) :
1.) Is there a way in wicket to get Not the raw markup but markup
*AFTER*the actual data has been inserted? (meaning the final HTML
 as
we see it on
the page?).
2.) Similar to above scenario, can you use container to spit out
  markup
   in
some other form, for example Plain Text or XML form ? (the markup
 with
actual data).
   
I prepared a test case for the same, which used a TestPage and
 Wicket
   Tester
to start the page and then called
 testPage.getAssociateMarkup(true);
   and
testPage.getMarkup(). I tried to call it after doing
 testPage.render()
   but
no change.
   
   
Regards
Vyas, Anirudh
   
  
   -
   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

Feedback Message Levels : RFE

2008-07-28 Thread Ricky
Hi,

I was looking at Feedback Message and the levels defined as integers, in
move to Wicket 1.4, can we have an enumeration (or a class)  like
FeedbackMessageLevel, here's the example :

public enum FeedbackMessageLevel{

// Debug level
DEBUG(100),

// Error level
ERROR (400),

// fatal level
FATAL(500);

 ... // and so on.

}

Inside this enum we can have a method that compares levels. (something like
comparator).Should we want this to be more flexible, (because enumeration
limits us from using just finite states), we can go for a Level class may
be.
*What will this buy me?*
Type safety, you can do a lot of things using enumeration (comparison is one
example), if we have a level class it is very very flexible (similar in
concept to logging frameworks). Plus its not such a good idea to have small
ints as a message level.


I don't know just some inputs, Any thoughts??

Regards
Vyas, Anirudh
|| ॐ ||


Re: users, please give us your opinion: what is your take on generics with Wicket

2008-07-28 Thread Ricky
Menu is a good idea! I worked on this piece a little bit, (Took some cues
from Swing menu component), but i hit a dead end with keeping markup
consistent. Probably because i dont know wicket well enough; But i am pretty
sure it will be a good add on!.

Rick

On Thu, Jun 5, 2008 at 2:36 AM, [EMAIL PROTECTED] wrote:

 The way 1.3 works currently has been fine with me and any type mismatch
 in programming error usually result in crash with obvious location of error
  and easily fixed.
 So to me, it is optional  and not very important. Switching to java 5 does
 not mean wicket must include generics, there are many other features in java
 5 could be used to enhance wicket. and I feel the most helpful new
 facilities of wicket could be some powerful widgets, layouts, menus that one
 can use java api to produce (it could use any JS toolkits). Although it was
 contended that wicket is server side framework,  without those widgets, it
 would not help spread its use as a Java web toolkit. It is true one could
 write javascript for some of them,
 but integration with java api would distinguish wicket from the rest.
 I know there are some projects like this but it would be nice to have
 it in wicket core as a strategic effort.

 It might not be worth a huge undertaking for a web framework, considering
 there are so many other equally crucial factors such as the
 widget issue above to make a web app successful.



 Hi all,
 
 We have had several threads in this and the dev list, and some
 discussions in the public on how to incorporate generics in Wicket.
 
 I'd like to use this thread to gather the opinions of as many regular
 Wicket users as we can. Please help us get an impression of what our
 users think about the issue by completing this simple survey. Note
 that it is not a vote; we only want to get an idea of what you think.
 
 1) Generifying* Wicket
[ ] Can best be done like currently in the 1.4 branch, where models
 and components are both generified. I care most about the improved
 static type checking generified models and components give Wicket.
[ ] Can best be done in a limited fashion, where we only generify
 IModel but not components. I care more about what generifying can do
 for API clarity (declaring a component to only accept certain models
 for instance) than static type checking.
[ ] Should be avoided, I prefer the way 1.3 works. Because... (fill
 in your opinion here).
[ ]  (anything other than these choices?)
 
 2) How strongly do you feel about your choice above?
[ ] Whatever choice ultimately made, I'll happily convert/ start
 using 1.4 and up.
[ ] I might rethink upgrading if my choice doesn't win.
[ ] I definitively won't be using 1.4. if Wicket doesn't go for my
 preference.
 
 Thanks in advance for everyone participating, and pls feel free to
 explain yourself further beyond just answering these questions!
 
 Eelco
 
 p.s. I suggest that the core devs and most active participants and
 previous discussions wait a few days before giving their opinions so
 that we don't flood the thread right from the start.
 
 * Parameterizing would probably be the better word to use, but
 generifying seems to be the word that many people use.
 
 -
 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: passing objects between pages

2008-07-28 Thread Ricky
passing wicket models around is good. My point was that shouldn't a page
have : (Ideally)
1.) Either component as attributes
2.) Or Wicket Models as attributes, should we need to expose a getter from a
page, we could use final Model aWicketWrapperModel = new Model(); and then
setObject( ) on it ...

I meant, whats wrong IMHO is to use non wicket models (or i guess a VO or
TO) on pages and expose getter and setter); we could potentially use a
DataProvider (I use term DataProvider to mean DP that provides data to a
component (that could be a container, panel, page or whatever), this is
similar to whats there in Wicket already; and a DP we use (at our workplace)
is something like: DPVOMODEL). so at worst should be need to expose a
getter and setter for such a VO; we could use a DP and to pass the data
around. But we really shouldnt.

So a typical flow would be Page --- DataProviderForModelMODEL -- Biz
tier --- DAO tier.

Is that the right thinking?

Rick

On Mon, Jul 28, 2008 at 8:48 PM, Igor Vaynberg [EMAIL PROTECTED]wrote:

 whats wrong with passing models around?

 -igor

 On Mon, Jul 28, 2008 at 5:45 PM, Ricky [EMAIL PROTECTED] wrote:
  May be i am reading too much into this, but i thought the idea was that
  Wicket components deal with Wicket models that in turn deal with Customer
  (User / Application) models  (or VO or anything like that).
  Because to me, if we use Application / Non wicket models on components or
  pass them around like that, it just says that we are short circuiting to
  allow for components to directly deal with our application specific
 models
  instead of Wicket models. Am i incorrect in my understanding?
 
 
 
  On Thu, Jul 24, 2008 at 11:45 AM, Igor Vaynberg [EMAIL PROTECTED]
 wrote:
 
  sure you can have a constructor with a signature (IModelGroup,
  IModelUser) at runtime it will just look like (IModel,IModel) which
  is a perfectly good signature.
 
  -igor
 
  On Thu, Jul 24, 2008 at 4:50 AM, John [EMAIL PROTECTED] wrote:
   hi Igor,
  
   i do have a detachable Group model so am now passing that into my
   CreateUser page - thank you
  
   that is a very interesting point regarding serialization... thank you
   for mentioning it!  i will have to bear that in mind.
  
   as i understand generics, the generic identity is lost at run time so
   you cannot have two constructors accepting different IModels like
   IModelGroup and IModelUser.  is there an obvious way around this
   that i have not spotted?  my CreateUser page is also an edit page...
   as the code is exactly the same i am reusing it... but a create would
   pass a IModelGroup but an edit would pass IModelUser, but it
   cannot!!!  i have passed in the user id instead, and am loading it
   manually inside the page even though i already have the User object
   inside a detachable model when i make the Link to the edit page.  does
   this sound correct?
  
   hi Thomas,
  
   those are good rules!  i have written many pages with ids being used
   in Links, so for easy access to the object inside the model, i have
   creating final references to the model object at the start of the
   constructor... and then just calling myobject.getId() where needed.  i
   am concerned that this might break your second rule, as the object
   inside the model may not be the same i think?
  
   i have read that for example new Label(myObject.getName()) is bad
   because the Label will be fixed as the name when the page was first
   constructed, but it will not change if the name changes but the page
   is redisplayed.  however i have a gap in my understanding regrding
   redisplay of the page...
  
   when does a page get redisplayed?  a page that displays a School
   information can not be re used for a different School i think as the
   IModelSchool or School id will be passed to the page constructor.
   so it will only be displayed for the one School...  does that mean
   that the School object that is inside the model on the page will
   always be the same or will that object change when the model is
   detached and reattached?  so my final reference to the School object
   is a bad bad thing?
  
   also... when you view a different School does the first page still
   exist?  i can see the first page can not be reused if i click a link
   to view the first School that is passing a IModelSchool into the
   constructor, but if I pass the School id number via a PageParameters
   will Wicket reuse a page if the PageParameters match?
  
   john...
  
  
  
   On Tue, Jul 22, 2008 at 9:41 AM, Thomas Mäder [EMAIL PROTECTED]
  wrote:
   I have three rules for directly referencing objects from pages
  
   1) It's serializable
   2) The valueis not going to change from the time I construct the page
   to when I use the object
   3) It doesn't matter if I get a copy of the object (because of
  deserialization).
  
   2  3 can be summarized as the object being a value object
  
   Thomas
  
  
   On Mon, Jul 21, 2008 at 6:25 PM, Igor

Re: Getting hold of Container's markup

2008-07-25 Thread Ricky
Hi Igor,
Thanks for replying again and bearing with me, appreciate your help.

Here is what i have so far :
===
public static final String generatePlainTextFromContainer(final
MarkupContainer sourceContainer) {
sourceContainer.visitChildren(new Component.IVisitor() {

 // Loop through each child of the markup container to do
setRenderBodyOnly to true.
  public final Object component(final Component component) {
if (component != null) {
component.setRenderBodyOnly(true);
}
return CONTINUE_TRAVERSAL;
}
});

if (!sourceContainer.hasBeenRendered()) {
throw new IllegalStateException(Source container has not been
rendered.); *//  Is this right?*
}

 // uses REGEX to strip off all HTML etc.
// container.getResponse( ) gives me the content and HTML that i
need.
return
convertHTMLToPlainText(sourceContainer.getResponse().toString());
}

Now a part that i am missing is knowing WHEN and WHERE exactly should i
call this method, so that a panel or Page can be converted to plain text
(With COMPLETE markup). Right now, i get some markup, but some of the markup
(ESPECIALLY refreshing views) are missing altogether.

I tried to call it onBeforeRender( ) and as well as onAfterRender( ); but it
gives an empty response. I could replace if sourceContainer has not been
rendered if block contents with sourceContainer.render( ) to forcefully
render it, but it screws other things up in the page.

My goal is have this method being passed any PANEL or Page and be able to
generate plain text from it. When i pass in the panel it is UNABLE to get
the page so it throws an exception. So in work around i am thinking if i
create a Page and pass in the markup container to the constructor of the
page, i could add that to the page hierarchy and then get what i what i
want; but the issue with that is, that What ID will i put in my markup
HTML??


I would sincerely appreciate ideas / suggestion / responses on whether i am
going on the right track or is there a better way??

Thanks and Regards
Vyas, Anirudh

On Thu, Jul 24, 2008 at 1:47 PM, Igor Vaynberg [EMAIL PROTECTED]
wrote:

 application.init() {
 getrequestcyclesettngs().addresponsefilter(new iresponsefilter() {
  public appendingatringbuffer filter(appendingstringbuffer responsebuffer)
 {
 return responsebuffer.append(!-- generated at: +new Date()+ --);
  }
 }

 that is an example filter that adds a comment at the end of the html

 -igor

 On Thu, Jul 24, 2008 at 10:42 AM, Ricky [EMAIL PROTECTED] wrote:
  Hi Igor,
 
  Thanks for reply!
  My apologies, but could elaborate a little on IResponseFilter usage  as a
  skeletal example. I am not following Java documentation's verbiage that
 well
  (sorry if i come across as dumb).
 
  Regards
  Vyas, Anirudh
 
  On Wed, Jul 23, 2008 at 11:40 AM, Igor Vaynberg [EMAIL PROTECTED]
 
  wrote:
 
  see IResponseFilter.
 
  as far as spitting out text, wicket works with xml not plain text. but
  if you call setrenderbodyonly(true) on all components there wont be
  any xml tags left in the output.
 
  -igor
 
  On Wed, Jul 23, 2008 at 8:20 AM, Ricky [EMAIL PROTECTED] wrote:
   Hi,
  
   I have two questions (related) :
   1.) Is there a way in wicket to get Not the raw markup but markup
   *AFTER*the actual data has been inserted? (meaning the final HTML as
   we see it on
   the page?).
   2.) Similar to above scenario, can you use container to spit out
 markup
  in
   some other form, for example Plain Text or XML form ? (the markup with
   actual data).
  
   I prepared a test case for the same, which used a TestPage and Wicket
  Tester
   to start the page and then called testPage.getAssociateMarkup(true);
  and
   testPage.getMarkup(). I tried to call it after doing testPage.render()
  but
   no change.
  
  
   Regards
   Vyas, Anirudh
  
 
  -
  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: Getting hold of Container's markup

2008-07-24 Thread Ricky
Hi Igor,

Thanks for reply!
My apologies, but could elaborate a little on IResponseFilter usage  as a
skeletal example. I am not following Java documentation's verbiage that well
(sorry if i come across as dumb).

Regards
Vyas, Anirudh

On Wed, Jul 23, 2008 at 11:40 AM, Igor Vaynberg [EMAIL PROTECTED]
wrote:

 see IResponseFilter.

 as far as spitting out text, wicket works with xml not plain text. but
 if you call setrenderbodyonly(true) on all components there wont be
 any xml tags left in the output.

 -igor

 On Wed, Jul 23, 2008 at 8:20 AM, Ricky [EMAIL PROTECTED] wrote:
  Hi,
 
  I have two questions (related) :
  1.) Is there a way in wicket to get Not the raw markup but markup
  *AFTER*the actual data has been inserted? (meaning the final HTML as
  we see it on
  the page?).
  2.) Similar to above scenario, can you use container to spit out markup
 in
  some other form, for example Plain Text or XML form ? (the markup with
  actual data).
 
  I prepared a test case for the same, which used a TestPage and Wicket
 Tester
  to start the page and then called testPage.getAssociateMarkup(true);  and
  testPage.getMarkup(). I tried to call it after doing testPage.render()
 but
  no change.
 
 
  Regards
  Vyas, Anirudh
 

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




Getting hold of Container's markup

2008-07-23 Thread Ricky
Hi,

I have two questions (related) :
1.) Is there a way in wicket to get Not the raw markup but markup
*AFTER*the actual data has been inserted? (meaning the final HTML as
we see it on
the page?).
2.) Similar to above scenario, can you use container to spit out markup in
some other form, for example Plain Text or XML form ? (the markup with
actual data).

I prepared a test case for the same, which used a TestPage and Wicket Tester
to start the page and then called testPage.getAssociateMarkup(true);  and
testPage.getMarkup(). I tried to call it after doing testPage.render() but
no change.


Regards
Vyas, Anirudh


Re: ByteArrayResource's getCacheDuration( )

2008-07-15 Thread Ricky
Hi,

My apologies I did not follow up on this. I

On Sun, Jul 13, 2008 at 1:29 PM, greeklinux [EMAIL PROTECTED] wrote:


 Hello,

 reading the docs of ByteArrayResource I do not think it is dynamic.
 The generated resource is in memory.

 greetings



 Ricky-22 wrote:
 
  Hi,
 
  I want to be able to generate the byteArray (for MS - Excel report being
  passed to a byteArrayResource every time the resource link is clicked. I
  was
  trying to use getCacheDuration( ) for the same to allow for it to create
  ByteArray every time the resource link is clicked on the page.
 
  I have something like :
 
  final ByteArrayResource modelReportByteArrayResource = new
  ByteArrayResource(CONTENT_TYPE, createByteArray() ,FILE_NAME) {
 
  // java docs removed for clarity
  protected final int getCacheDuration() {
  return -1;  // -1 or 0 doesn't work. =(
  }
  };
 
  // add the resource.
  add(new ResourceLink(modelReportResource ));
 
  I tried to override :
  // java docs removed for clarity
  protected final void setHeaders(final WebResponse response) {
  response.setHeader(Cache-Control, no-cache,
  must-revalidate);
  }
 
  But I still get the same excel report over and over no matter how many
  times
  i click the link, despite me changing some data or the stream.
 
  Any suggestions / thoughts???
 
  Regards
  Vyas, Anirudh
 
 

 --
 View this message in context:
 http://www.nabble.com/ByteArrayResource%27s-getCacheDuration%28-%29-tp18406048p18431593.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




-- 

Regards
Vyas, Anirudh
|| ॐ ||


Re: ByteArrayResource's getCacheDuration( )

2008-07-15 Thread Ricky
err sorry for half reply, I didnt follow up on this, my apologies. I used a
WebResource and am setting setIsCacheable(false)  and also overriding
getResourceStream method of the same to return a custom IResourceStream
instance.

In IResourceStream i override, the getInputStream method to chain
ByteArrayOutputStream to get my data dynamically. I'll post the code
tommorrow, when i get to office.


Regards
Vyas, Anirudh

On Tue, Jul 15, 2008 at 8:25 PM, Ricky [EMAIL PROTECTED] wrote:

 Hi,

 My apologies I did not follow up on this. I


 On Sun, Jul 13, 2008 at 1:29 PM, greeklinux [EMAIL PROTECTED] wrote:


 Hello,

 reading the docs of ByteArrayResource I do not think it is dynamic.
 The generated resource is in memory.

 greetings



 Ricky-22 wrote:
 
  Hi,
 
  I want to be able to generate the byteArray (for MS - Excel report being
  passed to a byteArrayResource every time the resource link is clicked. I
  was
  trying to use getCacheDuration( ) for the same to allow for it to create
  ByteArray every time the resource link is clicked on the page.
 
  I have something like :
 
  final ByteArrayResource modelReportByteArrayResource = new
  ByteArrayResource(CONTENT_TYPE, createByteArray() ,FILE_NAME) {
 
  // java docs removed for clarity
  protected final int getCacheDuration() {
  return -1;  // -1 or 0 doesn't work. =(
  }
  };
 
  // add the resource.
  add(new ResourceLink(modelReportResource ));
 
  I tried to override :
  // java docs removed for clarity
  protected final void setHeaders(final WebResponse response)
 {
  response.setHeader(Cache-Control, no-cache,
  must-revalidate);
  }
 
  But I still get the same excel report over and over no matter how many
  times
  i click the link, despite me changing some data or the stream.
 
  Any suggestions / thoughts???
 
  Regards
  Vyas, Anirudh
 
 

 --
 View this message in context:
 http://www.nabble.com/ByteArrayResource%27s-getCacheDuration%28-%29-tp18406048p18431593.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




 --

 Regards
 Vyas, Anirudh
 || ॐ ||



Re: generics

2008-07-15 Thread Ricky
orginally said by Martijn:
We don't say that, but without the core committers, you won't have a
framework. Treat us gently and you'll get a lot done. :D

Ok, Please, can we generify components? :D

I have already stated my opinion, but i think we should not really be
bothered about generic notation, because anyways we will have some changes
coming up in Java 7 and with closures (which will be useful to wicket imho),
wicket HAS to change and use the new feature-set. At that point i know that
there will again be a debate whether we want to go with newer feature set
(especially closures etc) or not. Its just a matter of getting used to and
once you do, you will know how elegant generification really is.

Regards
Vyas, Anirudh
|| ॐ ||

On Tue, Jul 15, 2008 at 4:00 AM, Martijn Dashorst 
[EMAIL PROTECTED] wrote:

 You're right that 'slave' is too strong a word. I apologize.
 Wilhelmsen Tor Iver reconstructed my intent much better.

 Martijn

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




ByteArrayResource's getCacheDuration( )

2008-07-11 Thread Ricky
Hi,

I want to be able to generate the byteArray (for MS - Excel report being
passed to a byteArrayResource every time the resource link is clicked. I was
trying to use getCacheDuration( ) for the same to allow for it to create
ByteArray every time the resource link is clicked on the page.

I have something like :

final ByteArrayResource modelReportByteArrayResource = new
ByteArrayResource(CONTENT_TYPE, createByteArray() ,FILE_NAME) {

// java docs removed for clarity
protected final int getCacheDuration() {
return -1;  // -1 or 0 doesn't work. =(
}
};

// add the resource.
add(new ResourceLink(modelReportResource ));

I tried to override :
// java docs removed for clarity
protected final void setHeaders(final WebResponse response) {
response.setHeader(Cache-Control, no-cache,
must-revalidate);
}

But I still get the same excel report over and over no matter how many times
i click the link, despite me changing some data or the stream.

Any suggestions / thoughts???

Regards
Vyas, Anirudh


Re: Page refresh

2008-06-10 Thread Ricky
Ok, I have tried to keep it as simple as possible, hopefully this should
give enough details to know as to what is happening:

//  Page Code here ///
public ReviewPlanPage(final PageParameters pageParameters) {
// get MODEL from session, code removed for clarity.
setModel(new Model((MODELfromSession)));
final Form sectionAForm = new
Form(form-review-plan-page-section-a);
sectionAForm.add(new
SectionAPanel(panel-review-plan-page-section-a, MODEL));
add(sectionAForm);
final Form behaviorsForm = new Form(form-behavior-standards-b);
behaviorsForm.add(new SectionBPanel(panel-behaviors-section-b,
MODEL));
add(behaviorsForm);
}

public final boolean isVersioned() {
return true;
}

// Panel Code here ///
// Panel A Code
public SectionAPanel(final PageParameters pageParameters){
super(id);
setOutputMarkupId(true);
addDataView(reviewPlan);
// add buttons here.
}

// add data view code :
addPerspectiveDataView(createPerspectiveDataView(BACKINGModelList));
// in create Perspective Data View I have another refreshing view
createNestedDataView(NestedBackingModelListForPerspective);


Thanks
Rick

On Mon, Jun 9, 2008 at 8:20 PM, Igor Vaynberg [EMAIL PROTECTED]
wrote:

 paste your code

 -igor

 On Mon, Jun 9, 2008 at 3:34 PM, Ricky [EMAIL PROTECTED] wrote:
  Hi,
 
  My page class consists of :
  1.) Panel -A  2.) Panel - B.
 
  Just for FYI - Panel A has Refreshing View and a refreshing view nested
  within it (nested tables).
 
  When I do a refresh (F5 or simple refresh clicked on browser) on a page,
 and
  nothing seems to happen and all data that was present is lost in process.
  Nothing seems to happen as in:
  1.) No query is executed (it is expected to do thing that it was doing at
  the time of clicking the link to the page).
  2.) I put in debug points on the page constructor, refreshing views in
 the
  panel, panel constructor, but it doesn't go anywhere.
  3.) The page version doesn't seem to be changing either?! (it does show
  everything normally when i click the link to the page again).
 
  I am overriding isVersioned( ) on the page to return true but to no
 effect;
  ( I checked, all children components are getting isVersioned with the
 same).
  I tried isVersioned to false (just to see if something else happens :) ),
  but no change ...
  (the versionManager behaves as it should, meaning, when the page returns
  false, it is not added to the version manager).
 
  Am i missing something!!? any help would be appreciable.
 
  Thanks
  Rick
 

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




1.3.4 release

2008-06-10 Thread Ricky
Hi,

I know I have asked this question couple of times now, but is there a
fixed release date on this yet? sorry if it sounds like a duplicate
question; but we are being pushed to raise the concern over and over; Using
a 1.3-SNAPSHOT is not really a great idea, because if something changes at
wicket end which breaks our stuff it would end up being a bug on our plate
from users here ... Hopefully someone can give a definitive schedule for
release date. The original question was raised like a month back and the
response was that it will be sometime that week itself. apparently each
time the response has been the same.

My question is:
1.) Is it delayed?
2.) Is it canceled?
3.) Is it being replaced by 1.4? (in that there will be *NO* 1.3.4 anymore)

My apologies if i sound obstinate.

Thnx,
Rick.


Re: wicket generics

2008-06-10 Thread Ricky
I may be the dumb kid on the block, but why do we need to override
setModel and getModel( ) once it has already been done in Component class? (
meaning just have it in component class and then let all subclasses use the
same methods?)

Am i missing something?

Rick

On Sat, Jun 7, 2008 at 2:49 PM, Timo Rantalaiho [EMAIL PROTECTED]
wrote:

 On Sat, 07 Jun 2008, Igor Vaynberg wrote:
  i dont think listitem#setmodel is restricted in your example.to T in
 ListItemT
 
  public T ListItem setModel(IModelT model)
 
  the first T hides the T of ListItemT so you might as well have
  said X setModel(IModelX model)

 Heh, you're right of course.

 There doesn't seem to be an easy way out, if you want to
 bind the type of the component with the type of its model
 only in a part of the Component inheritance hierarchy.

 I still find loosening the model type checks also in
 parametrised subclasses of Component a viable alternative
 for 1.4 (with less reuse of type variable names than what
 I'm guilty of :)). That is if we want to provide a fairly
 compatible alternative for migrating from 1.3.

 But on longer term, decoupling IModel from Component might
 be the best thing to have come out of this generics episode.

 Best wishes,
 Timo

 --
 Timo Rantalaiho
 Reaktor Innovations OyURL: http://www.ri.fi/ 

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



Re: 1.3.4 release

2008-06-10 Thread Ricky
OK, thanks for your response guys. appreciate it; I understand that it is a
time consuming process and also takes time to check if release has any
impacts etc. I guess we'll have to go with 1.3-SNAPSHOT for now.

Thanks,
Rick

On Tue, Jun 10, 2008 at 11:39 AM, Martijn Dashorst 
[EMAIL PROTECTED] wrote:

 On Tue, Jun 10, 2008 at 5:03 PM, Martijn Dashorst
 [EMAIL PROTECTED] wrote:
  When someone actually finds the time to build
  the release.

 Our team has 2 guys that know the release procedure in and out, and
 we'd rather let one of them build the release as to not goof up
 anything. Both guys (me and Frank) have pressing stuff (non-Wicket) to
 do this week (and past weeks).

 It is not the ./release.sh call that takes the longest time, but
 ensuring the surrounding stuff of the release that is time consuming:
 release notes, tagging, uploading, JIRA issues reassignment, site
 updates, etc.

 Martijn

 --
 Become a Wicket expert, learn from the best: http://wicketinaction.com
 Apache Wicket 1.3.3 is released
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.3

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




Re: wicket generics

2008-06-10 Thread Ricky
I don't know if i was clear enough, sorry about that.

I meant if  you have something like :

public ComponentMODEL extends IMODELID, ID extends Serializable{

// getter here
 public MODEL getModel() { }

// setter here
public void setModel(final MODEL model){ }

}

then, you don't have to do anything, basically all your components like for
example listItem would be :

public ListItemMODEL extends IModelID,ID extends Serializable extends
ComponentMODEL, ID{


// DONT need to override anything here!!!

}


Instead of capture i used an ID, because it makes more sense to have a model
generically typed to a serializable id.
Just some thoughts.

Rick


Re: wicket generics

2008-06-10 Thread Ricky
Hmmph, a weird fact to consider though is that when you are
Non-generifying the Component class, it doesn't make sense as to why one
would have XXComponent  be generically typed to something, like a 'T' which
is also generic type for IModel, I mean the whole idea is to de-couple the
component class with the IModel in the first place; by keeping component
different from its children would infer from users standpoint at least
that children are somehow different.

I don't know just a thought.

Rick

On Tue, Jun 10, 2008 at 12:23 PM, Matej Knopp [EMAIL PROTECTED] wrote:

 which is exactly what we are trying to avoid - having generics in
 Component.

 -Matej

 On Tue, Jun 10, 2008 at 6:19 PM, Ricky [EMAIL PROTECTED] wrote:
  I don't know if i was clear enough, sorry about that.
 
  I meant if  you have something like :
 
  public ComponentMODEL extends IMODELID, ID extends Serializable{
 
  // getter here
   public MODEL getModel() { }
 
  // setter here
  public void setModel(final MODEL model){ }
 
  }
 
  then, you don't have to do anything, basically all your components like
 for
  example listItem would be :
 
  public ListItemMODEL extends IModelID,ID extends Serializable extends
  ComponentMODEL, ID{
 
 
  // DONT need to override anything here!!!
 
  }
 
 
  Instead of capture i used an ID, because it makes more sense to have a
 model
  generically typed to a serializable id.
  Just some thoughts.
 
  Rick
 

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




Re: Page refresh

2008-06-10 Thread Ricky
I just do a simple DB search to get the list of models. (calling business
tier -- to hibernate).

and then : * new RefreshingView(ID, MODELs){ };*

I tried, changing above to : *new RefreshingView(ID, new Model(
(Serializable) models) { };
*But to no effect. =(
*
Rick.
*
On Tue, Jun 10, 2008 at 11:13 AM, Igor Vaynberg [EMAIL PROTECTED]
wrote:

 you dont actually show how you feed data to these dataviews. my guess
 is that you cache the data you feed them and that is why it doesnt
 refresh.

 -igor

 On Tue, Jun 10, 2008 at 6:41 AM, Ricky [EMAIL PROTECTED] wrote:
  Ok, I have tried to keep it as simple as possible, hopefully this should
  give enough details to know as to what is happening:
 
  //  Page Code here ///
  public ReviewPlanPage(final PageParameters pageParameters) {
 // get MODEL from session, code removed for clarity.
 setModel(new Model((MODELfromSession)));
 final Form sectionAForm = new
  Form(form-review-plan-page-section-a);
 sectionAForm.add(new
  SectionAPanel(panel-review-plan-page-section-a, MODEL));
 add(sectionAForm);
 final Form behaviorsForm = new Form(form-behavior-standards-b);
 behaviorsForm.add(new SectionBPanel(panel-behaviors-section-b,
  MODEL));
 add(behaviorsForm);
 }
 
 public final boolean isVersioned() {
 return true;
 }
 
 // Panel Code here ///
 // Panel A Code
 public SectionAPanel(final PageParameters pageParameters){
 super(id);
 setOutputMarkupId(true);
 addDataView(reviewPlan);
 // add buttons here.
 }
 
 // add data view code :
 addPerspectiveDataView(createPerspectiveDataView(BACKINGModelList));
 // in create Perspective Data View I have another refreshing view
 createNestedDataView(NestedBackingModelListForPerspective);
 
 
  Thanks
  Rick
 
  On Mon, Jun 9, 2008 at 8:20 PM, Igor Vaynberg [EMAIL PROTECTED]
  wrote:
 
  paste your code
 
  -igor
 
  On Mon, Jun 9, 2008 at 3:34 PM, Ricky [EMAIL PROTECTED] wrote:
   Hi,
  
   My page class consists of :
   1.) Panel -A  2.) Panel - B.
  
   Just for FYI - Panel A has Refreshing View and a refreshing view
 nested
   within it (nested tables).
  
   When I do a refresh (F5 or simple refresh clicked on browser) on a
 page,
  and
   nothing seems to happen and all data that was present is lost in
 process.
   Nothing seems to happen as in:
   1.) No query is executed (it is expected to do thing that it was doing
 at
   the time of clicking the link to the page).
   2.) I put in debug points on the page constructor, refreshing views in
  the
   panel, panel constructor, but it doesn't go anywhere.
   3.) The page version doesn't seem to be changing either?! (it does
 show
   everything normally when i click the link to the page again).
  
   I am overriding isVersioned( ) on the page to return true but to no
  effect;
   ( I checked, all children components are getting isVersioned with the
  same).
   I tried isVersioned to false (just to see if something else happens :)
 ),
   but no change ...
   (the versionManager behaves as it should, meaning, when the page
 returns
   false, it is not added to the version manager).
  
   Am i missing something!!? any help would be appreciable.
  
   Thanks
   Rick
  
 
  -
  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]




Page refresh

2008-06-09 Thread Ricky
Hi,

My page class consists of :
1.) Panel -A  2.) Panel - B.

Just for FYI - Panel A has Refreshing View and a refreshing view nested
within it (nested tables).

When I do a refresh (F5 or simple refresh clicked on browser) on a page, and
nothing seems to happen and all data that was present is lost in process.
Nothing seems to happen as in:
1.) No query is executed (it is expected to do thing that it was doing at
the time of clicking the link to the page).
2.) I put in debug points on the page constructor, refreshing views in the
panel, panel constructor, but it doesn't go anywhere.
3.) The page version doesn't seem to be changing either?! (it does show
everything normally when i click the link to the page again).

I am overriding isVersioned( ) on the page to return true but to no effect;
( I checked, all children components are getting isVersioned with the same).
I tried isVersioned to false (just to see if something else happens :) ),
but no change ...
(the versionManager behaves as it should, meaning, when the page returns
false, it is not added to the version manager).

Am i missing something!!? any help would be appreciable.

Thanks
Rick


Re: Refreshing a List view

2008-06-06 Thread Ricky
Thanks for the help guys, but still cannot make it to work =(

Rick

On Fri, Jun 6, 2008 at 3:22 AM, Maurice Marrink [EMAIL PROTECTED] wrote:

 If that does not work you can also force the list to recreate all
 items by calling removeAll() after you have  deleted the object.

 Maurice

 On Thu, Jun 5, 2008 at 7:39 PM, Sam Barnum [EMAIL PROTECTED] wrote:
  Ricky, what are you using as the model for your refreshing view?
 
  You should be using some sort of detachable model that re-fetches the
 items
  for the list from the DB each time.
 
  --
  Sam Barnum
  360 Works
  http://www.360works.com
  415.865.0952
 
 
 
  On Jun 5, 2008, at 10:32 AM, Ricky wrote:
 
  Hi,
 
  I have a RefreshingView which has a delete button in it (this deletes
 the
  model present in the backing list for the view.) The problem is that
 when
  a
  delete is performed on DB, (see onSubmit( ) for
  *deletePlanObjectiveDetailButton
  below)  *the size of the list changes, Is there a way to refresh the
  view
  after I remove the model from the backing list (list.remove( xxx )) ??
  Here's a snippet of what i am doing:
 
  *new RefreshingView(refreshing-view-list) {
 
 // populate item.
 protected final void populateItem(final Item item) {
 final MODEL backingListModel = (backingListModel)
  item.getModelObject();
 
  item.add(new Label(label-objective-name,
  backingListModel.getName()));
 
 final Button deletePlanObjectiveDetailButton = new
  Button(button-delete-plan-objective-details) {
 private static final long serialVersionUID = 1L;
 
 // onSubmit.
 public final void onSubmit() {
 new
  ObjectiveMeasureDataProvider().deleteObjectiveMeasure(backingListModel);
 backingListModels.remove(  );  ///  Searches
  for backing Model deleted in current list based on id and removes it.
 // TODO Figure out a way to do list view refresh
  here.
   }
 };
   item.add(deletePlanObjectiveDetailButton);
 }
 };
 
  *Any Help would be appreciable!!???*
  *Rick
 
 

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




Re: Refreshing a List view

2008-06-06 Thread Ricky
Hey Guys,

FYI - instead of a simple button i created an AJAX link and then marked all
the components in the panel (which encloses the refreshing view) to true
(setOutputMarkupId(true)), and basically it refreshes just the view if a
delete happens. So its working now . Here's the simplified code for the
delete button:

final AjaxLink deletePlanObjectiveDetailButton = new
AjaxLink(button-delete-plan-objective-details) {

 public final void onClick(AjaxRequestTarget target) {
// Step 1 : Delete from DB, removed for clarity.

*// REMOVE THE ITEM from the list*
 modelList.remove( item.getIndex( ) );

// *Set the refreshing view model as a list.*
this.getParent().setModel(new
CompoundPropertyModel((Serializable) revPlanObjDetails));

// refreshing view cannot be a direct target for
AJAX updates, so we have to use
// next parent which is NOT  refreshing  view.

target.addComponent(this.getParent().getParent().getParent());
}
};

Once again, Thanks for your help guys.
Rick
On Fri, Jun 6, 2008 at 11:27 AM, Ricky [EMAIL PROTECTED] wrote:

 Thanks for the help guys, but still cannot make it to work =(

 Rick


 On Fri, Jun 6, 2008 at 3:22 AM, Maurice Marrink [EMAIL PROTECTED] wrote:

 If that does not work you can also force the list to recreate all
 items by calling removeAll() after you have  deleted the object.

 Maurice

 On Thu, Jun 5, 2008 at 7:39 PM, Sam Barnum [EMAIL PROTECTED] wrote:
  Ricky, what are you using as the model for your refreshing view?
 
  You should be using some sort of detachable model that re-fetches the
 items
  for the list from the DB each time.
 
  --
  Sam Barnum
  360 Works
  http://www.360works.com
  415.865.0952
 
 
 
  On Jun 5, 2008, at 10:32 AM, Ricky wrote:
 
  Hi,
 
  I have a RefreshingView which has a delete button in it (this deletes
 the
  model present in the backing list for the view.) The problem is that
 when
  a
  delete is performed on DB, (see onSubmit( ) for
  *deletePlanObjectiveDetailButton
  below)  *the size of the list changes, Is there a way to refresh the
  view
  after I remove the model from the backing list (list.remove( xxx )) ??
  Here's a snippet of what i am doing:
 
  *new RefreshingView(refreshing-view-list) {
 
 // populate item.
 protected final void populateItem(final Item item) {
 final MODEL backingListModel = (backingListModel)
  item.getModelObject();
 
  item.add(new Label(label-objective-name,
  backingListModel.getName()));
 
 final Button deletePlanObjectiveDetailButton = new
  Button(button-delete-plan-objective-details) {
 private static final long serialVersionUID = 1L;
 
 // onSubmit.
 public final void onSubmit() {
 new
 
 ObjectiveMeasureDataProvider().deleteObjectiveMeasure(backingListModel);
 backingListModels.remove(  );  /// 
 Searches
  for backing Model deleted in current list based on id and removes it.
 // TODO Figure out a way to do list view refresh
  here.
   }
 };
   item.add(deletePlanObjectiveDetailButton);
 }
 };
 
  *Any Help would be appreciable!!???*
  *Rick
 
 

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




Re: AutoCompleteTextField scrolls entire page

2008-06-06 Thread Ricky
Hey,
This is fixed 1.4-m1 and 1.3.4 (to be released at some point, I am not sure
when).

Rick

On Fri, Jun 6, 2008 at 5:02 PM, Michael Mehrle [EMAIL PROTECTED]
wrote:

 I am seeing the following problem with several AutoCompleteTextFields on
 different pages:



 When I type a letter and the menu items are showing I am unable to
 scroll down the list with my mouse and make a selection. What happens
 instead is that the page scrolls up towards the mouse and the
 Autocomplete plus the menu scrolls out of view.



 Again, two developers here have the same problem with two separate
 implementations/pages. So, I am fairly sure this has nothing to do with
 the way we integrated it. My first guess would be the style sheet, but
 we have not made any pertinent changes.



 Any help would be appreciated - this behavior is being encountered on
 Firefox on Windows/Mac. On IE it doesn't work at all and I just get some
 'type mismatch' error message. Safari on Windows doesn't do anything - I
 don't see a menu at all.



 Thanks,



 Michael




Re: AutoCompleteTextField scrolls entire page

2008-06-06 Thread Ricky
Use SNAPSHOT

On Fri, Jun 6, 2008 at 8:17 PM, Michael Mehrle [EMAIL PROTECTED]
wrote:

 Where can I get a build of 1.3.4, so I can test this?

 Michael

 -Original Message-
 From: Ricky [mailto:[EMAIL PROTECTED]
 Sent: Friday, June 06, 2008 2:47 PM
 To: users@wicket.apache.org
 Subject: Re: AutoCompleteTextField scrolls entire page

 Hey,
 This is fixed 1.4-m1 and 1.3.4 (to be released at some point, I am not sure
 when).

 Rick

 On Fri, Jun 6, 2008 at 5:02 PM, Michael Mehrle [EMAIL PROTECTED]
 wrote:

  I am seeing the following problem with several AutoCompleteTextFields on
  different pages:
 
 
 
  When I type a letter and the menu items are showing I am unable to
  scroll down the list with my mouse and make a selection. What happens
  instead is that the page scrolls up towards the mouse and the
  Autocomplete plus the menu scrolls out of view.
 
 
 
  Again, two developers here have the same problem with two separate
  implementations/pages. So, I am fairly sure this has nothing to do with
  the way we integrated it. My first guess would be the style sheet, but
  we have not made any pertinent changes.
 
 
 
  Any help would be appreciated - this behavior is being encountered on
  Firefox on Windows/Mac. On IE it doesn't work at all and I just get some
  'type mismatch' error message. Safari on Windows doesn't do anything - I
  don't see a menu at all.
 
 
 
  Thanks,
 
 
 
  Michael
 
 




-- 

Regards
Vyas, Anirudh
|| ॐ ||


Re: AutoCompleteTextField scrolls entire page

2008-06-06 Thread Ricky
err 1.3-SNAPSHOT for now, or 1.4-m1.

On Fri, Jun 6, 2008 at 11:20 PM, Ricky [EMAIL PROTECTED] wrote:

 Use SNAPSHOT


 On Fri, Jun 6, 2008 at 8:17 PM, Michael Mehrle [EMAIL PROTECTED]
 wrote:

 Where can I get a build of 1.3.4, so I can test this?

 Michael

 -Original Message-
 From: Ricky [mailto:[EMAIL PROTECTED]
 Sent: Friday, June 06, 2008 2:47 PM
 To: users@wicket.apache.org
 Subject: Re: AutoCompleteTextField scrolls entire page

 Hey,
 This is fixed 1.4-m1 and 1.3.4 (to be released at some point, I am not
 sure
 when).

 Rick

 On Fri, Jun 6, 2008 at 5:02 PM, Michael Mehrle [EMAIL PROTECTED]
 wrote:

  I am seeing the following problem with several AutoCompleteTextFields on
  different pages:
 
 
 
  When I type a letter and the menu items are showing I am unable to
  scroll down the list with my mouse and make a selection. What happens
  instead is that the page scrolls up towards the mouse and the
  Autocomplete plus the menu scrolls out of view.
 
 
 
  Again, two developers here have the same problem with two separate
  implementations/pages. So, I am fairly sure this has nothing to do with
  the way we integrated it. My first guess would be the style sheet, but
  we have not made any pertinent changes.
 
 
 
  Any help would be appreciated - this behavior is being encountered on
  Firefox on Windows/Mac. On IE it doesn't work at all and I just get some
  'type mismatch' error message. Safari on Windows doesn't do anything - I
  don't see a menu at all.
 
 
 
  Thanks,
 
 
 
  Michael
 
 







Refreshing a List view

2008-06-05 Thread Ricky
Hi,

I have a RefreshingView which has a delete button in it (this deletes the
model present in the backing list for the view.) The problem is that when a
delete is performed on DB, (see onSubmit( ) for
*deletePlanObjectiveDetailButton
below)  *the size of the list changes, Is there a way to refresh the view
after I remove the model from the backing list (list.remove( xxx )) ??
Here's a snippet of what i am doing:

*new RefreshingView(refreshing-view-list) {

// populate item.
protected final void populateItem(final Item item) {
final MODEL backingListModel = (backingListModel)
item.getModelObject();

 item.add(new Label(label-objective-name,
backingListModel.getName()));

final Button deletePlanObjectiveDetailButton = new
Button(button-delete-plan-objective-details) {
private static final long serialVersionUID = 1L;

// onSubmit.
public final void onSubmit() {
new
ObjectiveMeasureDataProvider().deleteObjectiveMeasure(backingListModel);
backingListModels.remove(  );  ///  Searches
for backing Model deleted in current list based on id and removes it.
// TODO Figure out a way to do list view refresh
here.
  }
};
  item.add(deletePlanObjectiveDetailButton);
}
};

*Any Help would be appreciable!!???*
*Rick


Wicket 1.3 - SNAPSHOT release dates

2008-06-04 Thread Ricky
Hi,

Is there an estimated release date for Wicket 1.3.4 or for 1.3-SNAPSHOT ?

Regards,
Vyas, Anirudh


Re: Wicket 1.3 - SNAPSHOT release dates

2008-06-04 Thread Ricky
Thanks. I meant 1.3 - SNAPSHOT being finalized to a release version.
appreciate your response.

-- 

Regards
Vyas, Anirudh
|| ॐ ||

On Wed, Jun 4, 2008 at 2:51 PM, Frank Bille [EMAIL PROTECTED] wrote:

 1.3.4 is sometime this week.
 Frank

 On Wed, Jun 4, 2008 at 6:58 PM, Ricky [EMAIL PROTECTED] wrote:

  Hi,
 
  Is there an estimated release date for Wicket 1.3.4 or for 1.3-SNAPSHOT ?
 
  Regards,
  Vyas, Anirudh
 



Re: users, please give us your opinion: what is your take on generics with Wicket

2008-06-01 Thread Ricky
[X ] Can best be done like currently in the 1.4 branch, where models
and components are both generified. I care most about the improved
static type checking generified models and components give Wicket.

I think generifying Components give more clarity (Don't blame Wicket for
Messed up Generic Notation, lots of things can and i suppose will be
improved as we move on) to thinking; IMHO generifying components like pages
and panels makes for cleaner code (in that you see clearly that this panel
/ page or whatever is tied to this model etc.)

I don't know ... I am kinda in between 1  2 (adding generics to components
or just in limited fashion). But I'll think most people would want to go for
number 2. (adding generics in limited fashion). I would still upgrade to 1.4

Regards
Vyas, Anirudh


Re: users, please give us your opinion: what is your take on generics with Wicket

2008-06-01 Thread Ricky
wow this has a pattern for sure doesn't it ? ;)

Rick

On Sun, Jun 1, 2008 at 7:25 PM, Matthew Young [EMAIL PROTECTED] wrote:

  [X] Can best be done in a limited fashion, where we only generify
 IModel but not components. I care more about what generifying can do
 for API clarity (declaring a component to only accept certain models
 for instance) than static type checking.

 [X] I might rethink upgrading if my choice doesn't win.

 On Sun, Jun 1, 2008 at 1:44 PM, Eelco Hillenius [EMAIL PROTECTED]
 
 wrote:

  Hi all,
 
  We have had several threads in this and the dev list, and some
  discussions in the public on how to incorporate generics in Wicket.
 
  I'd like to use this thread to gather the opinions of as many regular
  Wicket users as we can. Please help us get an impression of what our
  users think about the issue by completing this simple survey. Note
  that it is not a vote; we only want to get an idea of what you think.
 
  1) Generifying* Wicket
[ ] Can best be done like currently in the 1.4 branch, where models
  and components are both generified. I care most about the improved
  static type checking generified models and components give Wicket.
[ ] Can best be done in a limited fashion, where we only generify
  IModel but not components. I care more about what generifying can do
  for API clarity (declaring a component to only accept certain models
  for instance) than static type checking.
[ ] Should be avoided, I prefer the way 1.3 works. Because... (fill
  in your opinion here).
[ ]  (anything other than these choices?)
 
  2) How strongly do you feel about your choice above?
[ ] Whatever choice ultimately made, I'll happily convert/ start
  using 1.4 and up.
[ ] I might rethink upgrading if my choice doesn't win.
[ ] I definitively won't be using 1.4. if Wicket doesn't go for my
  preference.
 
  Thanks in advance for everyone participating, and pls feel free to
  explain yourself further beyond just answering these questions!
 
  Eelco
 
  p.s. I suggest that the core devs and most active participants and
  previous discussions wait a few days before giving their opinions so
  that we don't flood the thread right from the start.
 
  * Parameterizing would probably be the better word to use, but
  generifying seems to be the word that many people use.
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



AutoComplete enter key behavior

2008-05-14 Thread Ricky
Hi,

I am trying to add a behavior to my autoComplete text field, where if i
press enter, it should be able to run a default search (with some text
input) and display a list of possible choices);

is it possible with autoComplete.add(new AjaxBehavior() {
   @Override
public void onEvent() { }
} );

 or some other additional component ?

Any help would be appreciable.
Rick


Re: AutoComplete enter key behavior

2008-05-14 Thread Ricky
Hi,
Thanks for reply. I meant right now, there is an onChange event behavior
attached to the autocomplete, which allows me to type in the text box and
the list of possible matched choices appear; but what i also want is that
when i press enter on the text box, it should give me list of choices
(taking in some input search string).

Is that possible without adding any additional java script ?

Rick

On Wed, May 14, 2008 at 12:40 PM, richardwilko 
[EMAIL PROTECTED] wrote:


 Hi,

 We have changed our auto complete so that when you press enter on one of
 the
 choices in the drop down we submit the form (default is to just populate
 the
 box), is this what you mean?  unfortunatly to do this you need to hack the
 wicket-autocomplete.js at the point where the enter key is pressed and ad
 some manual javascript to do what you want.

 Richard




 Ricky-22 wrote:
 
  Hi,
 
  I am trying to add a behavior to my autoComplete text field, where if i
  press enter, it should be able to run a default search (with some text
  input) and display a list of possible choices);
 
  is it possible with autoComplete.add(new AjaxBehavior() {
 @Override
  public void onEvent() { }
  } );
 
   or some other additional component ?
 
  Any help would be appreciable.
  Rick
 
 

 --
 View this message in context:
 http://www.nabble.com/AutoComplete-%22enter%22-key-behavior-tp17234468p17235509.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




-- 

Regards
Vyas, Anirudh
||  ॐ  ||


AutoComplete functionality for Wicket 1.4-m1 in IE

2008-05-05 Thread Ricky
Hi,

The AutoCompleteTextField doesn't seemed to be fixed for corrupt IE behavior
in wicket 1.4-m1 release; Can someone confirm this ? If so, any ideas as to
when this issue will be addressed or fixed ?

Thanks and appreciate your time.
Rick


AutoComplete Choices Selection Issue

2008-05-01 Thread Ricky
Hi,

In Firefox 2.x, when i type on AutoCompleteTextField; I am presented with
list of possible choices, But when i select one of possible candidates on
the list using a mouse, the Page scrolls down to the bottom (and so i can
only see the last choice from the list of possible choices) , and so every
time i try to select something from the select I cannot do so, since page is
scrolling down. HOWEVER, i can use a *keyboard* without much hassles and
select a choice and use that to update other things on the page.

Is this a known issue? If so is there any known *fix* for the same? Any help
would be appreciable.


Thanks,
Rick


Wicket Auto complete text Issue

2008-04-25 Thread Ricky
Hi,
I am trying to  get a model object when an autocomplete selection is made;
but model object comes back as a string rather than the model that was
selected. Is there a way to get the selected Model (Actor) in the example
below ?

  final AutoCompleteTextField actorAutoComplete = new
AutoCompleteTextField(input-auto-complete-actor-search, new Model((Actor)
  getModelObject()), new AbstractAutoCompleteRenderer() {
protected final String getTextValue(final Object object) {
return object.toString();
}
protected final void renderChoice(final Object object, final
Response response, final String criteria) {
response.write(object.toString());
}
}) {
protected final IteratorActor getChoices(final String
searchTextInput) {
return getCollection().iterator();
}
};
actorAutoComplete.add(new AjaxFormSubmitBehavior(onchange) {
protected final void onSubmit(final AjaxRequestTarget
target) {
// MODEL OBJECT RETURNS STRING RATHER THAN AN ACTOR!!
this.getComponent().getModelObject();
}
});
}
add(actorAutoComplete);

Rick


Re: Wicket Auto complete text Issue

2008-04-25 Thread Ricky
Hi,

I took a look at the solution below, unfortunately the above solution
doesn't work because if the model in getTextValue( ) method is set (for the
containing panel or any component for that matter) the *last* choice is
selected and set as a model instead of the right one. It works only when
there is only one selection in the drop down list. Any ideas would be
appreciable.

Rick

On Fri, Apr 25, 2008 at 12:40 PM, Ryan Gravener [EMAIL PROTECTED]
wrote:

 Take a look at

 http://www.nabble.com/1.3%2C-resource-locator-and-properties-to16707905.html#a16708440

 control+f to help wanted for autocomplete

 On Fri, Apr 25, 2008 at 12:29 PM, Ricky [EMAIL PROTECTED] wrote:

  Hi,
  I am trying to  get a model object when an autocomplete selection is
 made;
  but model object comes back as a string rather than the model that was
  selected. Is there a way to get the selected Model (Actor) in the example
  below ?
 
   final AutoCompleteTextField actorAutoComplete = new
  AutoCompleteTextField(input-auto-complete-actor-search, new
 Model((Actor)
   getModelObject()), new AbstractAutoCompleteRenderer() {
 protected final String getTextValue(final Object object) {
 return object.toString();
 }
 protected final void renderChoice(final Object object, final
  Response response, final String criteria) {
 response.write(object.toString());
 }
 }) {
 protected final IteratorActor getChoices(final String
  searchTextInput) {
 return getCollection().iterator();
 }
 };
 actorAutoComplete.add(new AjaxFormSubmitBehavior(onchange) {
 protected final void onSubmit(final AjaxRequestTarget
  target) {
 // MODEL OBJECT RETURNS STRING RATHER THAN AN ACTOR!!
 this.getComponent().getModelObject();
 }
 });
 }
 add(actorAutoComplete);
 
  Rick
 



 --
 Ryan Gravener
 http://wmwm.us/wmwm-date




-- 

Regards
Vyas, Anirudh
|| ॐ ||


Re: Auto-Complete TextField Problem

2008-04-21 Thread Ricky
Hi,

I am trying to look for 1.3.2 example? (I am using 1.3.3. for auto complete
feature, its working fine with Firefox 2 but with IE it goes Wiggy). Can
someone point me where is 1.3.2 example ?

Regards
Vyas, Anirudh

On Thu, Apr 17, 2008 at 5:41 PM, Vatroslav [EMAIL PROTECTED] wrote:



 Gerolf,
 thanks for the info..

 Vatroslav


 Gerolf Seitz wrote:
 
  it's fixed in trunk for 1.3.4 and 1.4M1
 
Gerolf
 
  On Tue, Apr 15, 2008 at 12:25 PM, Vatroslav [EMAIL PROTECTED] wrote:
 
 
  Hi,
  I've problem with AutoCompleteTextField with IE6 and Wicket
  1.3.3.installed
  on Tomcat6 and/or Jetty6.
 
 

 --
 View this message in context:
 http://www.nabble.com/Auto-Complete-TextField-Problem-tp16698982p16756375.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




--


1.3.4 Release

2008-04-21 Thread Ricky
Is 1.3.4 release out yet?

Rick


Re: 1.3.4 Release

2008-04-21 Thread Ricky
How soon ? I am looking for fixes they have done to Autocomplete Text Field
which is not working in IE, just a rough estimate ... a month ?

On Mon, Apr 21, 2008 at 9:22 AM, Maurice Marrink [EMAIL PROTECTED] wrote:

 nope :)

 1.4-m1 will be soon though.

 Maurice

 On Mon, Apr 21, 2008 at 3:15 PM, Ricky [EMAIL PROTECTED] wrote:
  Is 1.3.4 release out yet?
 
   Rick
 

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




Implementing AutoComplete Issue

2008-04-21 Thread Ricky
Hi,

I have implemented autocomplete using  1.3.3. examples in wicket stuff. It
is working fine in firefox, however doesnt work in IE. Is there a fix for
this ? Is scriptaculous thing the answer ? if so can someone point me to the
example source or give me a rough idea ?


thanks
Rick


Re: Implementing AutoComplete Issue

2008-04-21 Thread Ricky
But there isn't a 1.3.4 in very near future is it ?

Btw, Scriptaculous is down ... (the detail documentation i mean, that simple
source doesn't tell you that much)

On Mon, Apr 21, 2008 at 10:27 AM, Gerolf Seitz [EMAIL PROTECTED]
wrote:

 this is fixed for 1.3.4

  Gerolf

 On Mon, Apr 21, 2008 at 3:50 PM, Ricky [EMAIL PROTECTED] wrote:

  Hi,
 
  I have implemented autocomplete using  1.3.3. examples in wicket stuff.
 It
  is working fine in firefox, however doesnt work in IE. Is there a fix
 for
  this ? Is scriptaculous thing the answer ? if so can someone point me to
  the
  example source or give me a rough idea ?
 
 
  thanks
  Rick
 



Re: Implementing AutoComplete Issue

2008-04-21 Thread Ricky
Great thanks!!! saved me some work :)

On Mon, Apr 21, 2008 at 2:11 PM, Gerolf Seitz [EMAIL PROTECTED]
wrote:

 to quote johan, maybe in about 1-2 weeks.
   Gerolf

 On Mon, Apr 21, 2008 at 7:34 PM, Ricky [EMAIL PROTECTED] wrote:

  But there isn't a 1.3.4 in very near future is it ?
 
  Btw, Scriptaculous is down ... (the detail documentation i mean, that
  simple
  source doesn't tell you that much)
 
  On Mon, Apr 21, 2008 at 10:27 AM, Gerolf Seitz [EMAIL PROTECTED]
  wrote:
 
   this is fixed for 1.3.4
  
Gerolf
  
   On Mon, Apr 21, 2008 at 3:50 PM, Ricky [EMAIL PROTECTED] wrote:
  
Hi,
   
I have implemented autocomplete using  1.3.3. examples in wicket
  stuff.
   It
is working fine in firefox, however doesnt work in IE. Is there a
 fix
   for
this ? Is scriptaculous thing the answer ? if so can someone point
 me
  to
the
example source or give me a rough idea ?
   
   
thanks
Rick
   
  
 




-- 

Regards
Vyas, Anirudh
|| ॐ ||


Re: Wicket + iText ?

2008-04-16 Thread Ricky
Can someone post some code on this ? (only rough sketch ... nothing
elaborate really.

Thanks in advance.
Rick

On Wed, Apr 16, 2008 at 8:54 PM, John Krasnay [EMAIL PROTECTED] wrote:

 Hi RG,

 You probably want to look at how DataTable in wicket-extensions works.
 The idea is you set up an array of column objects, each of which knows
 how to display the data in a particular column, and a data provider,
 which provides an iterator over the objects represent your rows. The
 DataTable puts these two together and renders an HTML table.

 You can tackle your PDF problem in a similar way. Create a different
 column abstraction that writes to the iText API, then create a component
 analagous to DataTable but that writes the PDF out to a stream.
 Internally, this DataTable-equivalent would create the iText document,
 iterate over the rows returned by the data provider, and for each row
 iterate over the columns, asking each column to render its particular
 cell.

 We use this approach for generating spreadsheets (using POI instead of
 iText, of course) and it works like a charm.

 jk


 On Wed, Apr 16, 2008 at 01:56:43PM -0700, nanotech wrote:
 
  Hi,
 
  I have a table displayed in ListView element of wicket and would like to
  generate a PDF using iText API.
  Can someone suggest how to get started with this?
 
  Thanks,
  RG
  --
  View this message in context:
 http://www.nabble.com/Wicket-%2B-iText---tp16733269p16733269.html
  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: good WicketTester info page?

2008-04-16 Thread Ricky
Hey Mike,

http://cwiki.apache.org/WICKET/newuserguide.html#Newuserguide-UnitTest

^^ try that. I tried adding whatever i know (bear in mind, i am new to
wicket so my knowledge is  limited to whatever i have experienced so far, i
hope this helps ).

Thanks,
Rick

On Wed, Apr 16, 2008 at 10:51 AM, Michael Perkonigg 
[EMAIL PROTECTED] wrote:

 lars vonk wrote:

  I would advice you to just try it out... that's how I did it. You could
  use
  the mvn quickstart archetype tocreate a skeleton project and start
  testing:
 
  mvn archetype:create -DarchetypeGroupId=org.apache.wicket
  -DarchetypeArtifactId=wicket-archetype-quickstart
  -DarchetypeVersion=1.3.3
  -DgroupId=com.mycompany -DartifactId=myproject
 
  Hopes this helps,
 
 

 Unfortunately not. I have a project and I am ordered to write some tests.
 I can influence some of the contructs used in this project but most are here
 and I have to live with them. So I try to find out how to test them or if I
 can test them with the WicketTester.
 It seems to me that there are a lot of possible contructs which cannot be
 tested.
 The info about the WicketTester API is also quite sparse, there seems to
 be no documentation except the examples in the javadoc and one page in the
 wiki. Even the one who created the one wiki page mentioned that he had to
 try it out himself.

 Thanks,
 Mike

  Lars
 
  On Wed, Apr 16, 2008 at 2:40 PM, Michael Perkonigg 
  [EMAIL PROTECTED] wrote:
 
 
 
   Hello,
  
   is there a page explaining what one can do with the WicketTester and
   how?
   And yes, I already read
   http://cwiki.apache.org/WICKET/testing-pages.htmlit'shttp://cwiki.apache.org/WICKET/testing-pages.htmlit%27sjust
not very clear what can be done and, more important, cannot be
   done.
  
   Thanks,
   Mike
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
  
 
 
 


 --
 Liland ...does IT better

 Liland IT GmbH
 Software Entwickler
 email: [EMAIL PROTECTED]

 office: +43 (0)463 220-111  | fax: +43 (0)463 220-288 http://www.Liland.at



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




Re: Wicket div component?

2008-04-16 Thread Ricky
Hi,
question : you said : (I'm inside a form, so I don't want to use a panel).
(it may sound stupid, but had to ask)

Why is that ?

Rick

On Wed, Apr 16, 2008 at 6:09 PM, Michael Mehrle [EMAIL PROTECTED]
wrote:

 Good idea and it worked! :-)

 Thanks, I feel silly for not thinking of this myself... note to myself -
 get more sleep.

 Michael

 -Original Message-
 From: Vit Rozkovec [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, April 16, 2008 2:36 PM
 To: users@wicket.apache.org
 Subject: Re: Wicket div component?

 You can attach WebMarkupContainer to it.

 Vitek

 Michael Mehrle wrote:
  I need to create a div in my template that is being set to a
 different
  css class before it gets drawn. So, a regular non-wicket div HTML
 tag
  is out. How can I create a simple div tag without using a wicket
  panel? (I'm inside a form, so I don't want to use a panel).
 
 
 
  Thanks,
 
 
 
  Michael
 
 
 
 
 
 
 


 -
 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]




-- 

Regards
Vyas, Anirudh
||  ॐ  ||


Re: Wicket + iText ?

2008-04-16 Thread Ricky
that is sweet, thanks, i'll try it out. Appreciate it. :)

Rick

On Wed, Apr 16, 2008 at 9:50 PM, John Krasnay [EMAIL PROTECTED] wrote:

 It goes something like this. I've left out a bunch of stuff to do with
 setting column headings, widths, and styles.

 public interface ReportColumn extends Serializable {
public Object getCellValue(IModel rowModel);
 }

 public class ExcelReportGenerator implements ReportGenerator {
public void generate(
OutputStream outputStream,
ReportColumn[] columns,
IDataProvider dataProvider) throws IOException {

HSSFWorkbook workbook = new HSSFWorkbook();
HSSFSheet sheet = workbook.createSheet();

Iterator iter = dataProvider.iterator(0, dataProvider.size());
while (iter.hasNext()) {
Object o = iter.next();
IModel rowModel = dataProvider.model(o);
row = sheet.createRow(rownum++);
for (short i = 0; i  columns.length; i++) {
HSSFCell cell = row.createCell(columnNumber,
HSSFCell.CELL_TYPE_STRING);
Object value = column.getCellValue(rowModel);
cell.setCellValue(new
 HSSFRichTextString(value.toString()));
}
}

workbook.write(outputStream);
}
 }


 We then use a Link with code like this in its onClick method:

public void onClick() {
final ReportGenerator generator = getReportGenerator();

IResourceStream resourceStream =
  new AbstractResourceStreamWriter() {
public void write(OutputStream output) {
try {
generator.generate(output, columns, dataProvider);
} catch (IOException e) {
throw new RuntimeException(e);
}
}
public String getContentType() {
return generator.getContentType();
}

};

getRequestCycle().setRequestTarget(
new ResourceStreamRequestTarget(resourceStream)
.setFileName(getFileName()));
}


 jk

 On Wed, Apr 16, 2008 at 09:25:41PM -0400, Ricky wrote:
  Can someone post some code on this ? (only rough sketch ... nothing
  elaborate really.
 
  Thanks in advance.
  Rick
 
  On Wed, Apr 16, 2008 at 8:54 PM, John Krasnay [EMAIL PROTECTED] wrote:
 
   Hi RG,
  
   You probably want to look at how DataTable in wicket-extensions works.
   The idea is you set up an array of column objects, each of which knows
   how to display the data in a particular column, and a data provider,
   which provides an iterator over the objects represent your rows. The
   DataTable puts these two together and renders an HTML table.
  
   You can tackle your PDF problem in a similar way. Create a different
   column abstraction that writes to the iText API, then create a
 component
   analagous to DataTable but that writes the PDF out to a stream.
   Internally, this DataTable-equivalent would create the iText document,
   iterate over the rows returned by the data provider, and for each row
   iterate over the columns, asking each column to render its particular
   cell.
  
   We use this approach for generating spreadsheets (using POI instead of
   iText, of course) and it works like a charm.
  
   jk

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




-- 

Regards
Vyas, Anirudh
||  ॐ  ||


Re: Planning Wicket Next Generation

2008-03-16 Thread Ricky
Those people who do are still in struts 1.x mode. And thats what ... ? 85%
of the commercial java world ? ... i hear lots of those are moving to JSF
... **sigh** =(



On Sun, Mar 16, 2008 at 6:16 PM, Jeremy Thomerson 
[EMAIL PROTECTED] wrote:

 I have been surprised that we have not had a single person say that they
 still require 1.4.  Although I was originally against dropping 1.3 if we
 did a quick 1.4 (because I assumed there'd be many who still needed Java
 1.4), perhaps we should open this up on the users list and get a more
 accurate feel for it.

 Judging only by the response on this list, we could release a 1.4 that was
 1.3 + generics and drop support for 1.3.  But I imagine that there will
 still be some that need Java 1.4.

 Jeremy Thomerson
 -- sent from a wireless device

 -Original Message-
 From: Scott Swank [EMAIL PROTECTED]
 To: users@wicket.apache.org
 Sent: 3/16/08 4:45 PM
 Subject: Re: Planning Wicket Next Generation

 +1 for Java 5  Generics

 On Sun, Mar 16, 2008 at 11:03 AM, Igor Vaynberg [EMAIL PROTECTED]
 wrote:
  its binding now...
 
   -igor
 
 
 
 
   On Sun, Mar 16, 2008 at 8:12 AM, Maurice Marrink [EMAIL PROTECTED]
 wrote:
+1 (non binding) for a quick x-m1 with only generics release
   
 Maurice
   
   
   
 On Sun, Mar 16, 2008 at 3:32 PM, Thijs [EMAIL PROTECTED] wrote:
 
   +1 to java 5
 
 
 
   atul singh wrote:
   java 5 now definitely
 
  On Sun, Mar 16, 2008 at 7:48 PM, James Carman 
 [EMAIL PROTECTED]
  wrote:
 
 
 
   On 3/16/08, Maarten Bosteels [EMAIL PROTECTED] wrote:
 
 
   +1 for moving to java 5
 
 
   +1 for moving to Java 5 *quickly* :)
 
 
 -
  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]
   
   
 
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
 
 



 --
 Scott Swank
 reformed mathematician

 -
 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]




-- 

Regards
Vyas, Anirudh
|| ॐ ||


Re: Wicket Testing

2008-03-14 Thread Ricky
Hey Igor,
Works for now, but i had to print to figure out the path of component ...
just wondering if there is a cleaner way to get the component Path ... may
be something that i am not aware of ?

Thanks on the DDChoice though. appreciate it.



On Fri, Mar 14, 2008 at 6:26 AM, lars vonk [EMAIL PROTECTED] wrote:

 Perhaps there is a smarter way, but something like this should work:

 DropDownChoice ddc = (DropDownChoice)
 wicketTester.getComponentFromLastRenderedPage(path:to:dropDownChoice);
 List choices = ddc.getChoices().

 do assertions on choices.

 Lars

 On Fri, Mar 14, 2008 at 5:09 AM, Ricky [EMAIL PROTECTED] wrote:

  I need to test drop down values in a list using WicketTester ... like is
  there wicketTester.assertXXX or something that i could use ? I tried
  getTagByWicketId(some_thing_).getValue() but it only gives me the HTML
  for
  it ...
 
  my drop down is something like
 
  add(dChoice = new DropDownChoice(someModelClassChoice,new
  CompoundPropertyModel(SomeModelClass.class),
  Arrays.StringasList(MODEL0,MODEL1,MODEL2)){
 
 @Override
 protected boolean wantOnSelectionChangedNotifications() {
 return true;
 
 }
 
 @Override
 protected void onSelectionChanged(Object newSelection) {
 System.out.println( Something happened);
 params.put(Selected, newSelection);
 setResponsePage(new WelcomePage(params));
 
 }
 });
 
  My apologies if the question is a little dumb ...
 
  Regards
  Vyas, Anirudh
  || ॐ ||
 




-- 

Regards
Vyas, Anirudh
|| ॐ ||