Re: [Wicket-user] use images in pagingNavigator

2007-04-21 Thread Lec

Thanks Ryan


Ryan Holmes wrote:
> 
> If you want to keep it simple and you don't mind using images served  
> from your context root, do something like:
> 
> 
> 
>
> img/navigation/first.png   
>img/navigation/prev.png  
>  
>  # 5 span> 
>  
>img/navigation/next.png   
>img/navigation/last.png  
>
> 
> 
> 
> If you want to package the images alongside your java and html files,  
> you could do what John Krasnay suggested (I haven't tried this myself  
> so I'm not sure if it's a 1.3 thing or if it also works in 1.2):
> 
> ...
> first.png   
> ...
> 
> The main point here is that you don't need to re-implement  
> PagingNavigator/AjaxPagingNavigator. Your subclass already inherits  
> all of the logic to create the navigation, links, etc. Just keep the  
> wicket id's and markup hierarchy intact in your html file.
> 
> The only reason you would need to re-implement is if you actually  
> want to add new components to the links. But hopefully I just  
> demonstrated two ways to avoid that.
> 
> -Ryan
> 
> 
> 
> On Apr 21, 2007, at 12:40 AM, Lec wrote:
> 
>>
>> If this is the case of implementation in the markup, then how do we  
>> go about
>> doing its implementation in Subclass of ajax paging navigator. Do  
>> we need to
>> combine its implementation with the AjaxPagingNavigation,
>> AjaxPagingNavigationLink and AjaxPagingNavigationBehaviour all  
>> together? how
>> do these 3 objects combination of usage look like in the skeleton  
>> code?
>> Would like somebodyto give a pointer here. :) Thanks
>>
>>
>> igor.vaynberg wrote:
>>>
>>> you can create a subclass of the paging navigator and override the  
>>> markup
>>> so
>>> it looks something like this:
>>>
>>> 
>>> 
>>>   
>>>   first.gif     prev.gif
>>>
>>># 5
>>>
>>>   next.gif     last.gif
>>>   
>>> 
>>> 
>>>
>>> -Igor
>>>
>>>
>>>
>>> On 5/5/06, Potje rode kool <[EMAIL PROTECTED]> wrote:

 Hi,

 I have a page with a AjaxPagingNavigator which I use with a
 PageableListView to display some thumbnales of images,
 all working ok but I want to display an image (as a link) instead  
 of the
 arrows (like < or <<), but how to do this? I am a bit lost on that.

 Thanks,
 Evert

>>>
>>>
>>
>> -- 
>> View this message in context: http://www.nabble.com/use-images-in- 
>> pagingNavigator-tf1562785.html#a10114659
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -- 
>> ---
>> This SF.net email is sponsored by DB2 Express
>> Download DB2 Express C - the FREE version of DB2 express and take
>> control of your XML. No limits. Just data. Click to get it now.
>> http://sourceforge.net/powerbar/db2/
>> ___
>> Wicket-user mailing list
>> Wicket-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wicket-user
> 
> 
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> 
> 

-- 
View this message in context: 
http://www.nabble.com/use-images-in-pagingNavigator-tf1562785.html#a10123282
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] <-- change lang?

2007-04-21 Thread Jean-Baptiste Quenot
* Eelco Hillenius:
> > is it possible to change the attributes of the  
> You should be able to attach a Wicket component to the  tag.

Or create an IMarkupFilter and register it using
Application.getMarkupSettings().setMarkupParserFactory()?
-- 
 Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] FormComponent - HTML equivalent?

2007-04-21 Thread Jean-Baptiste Quenot
* Jan Kriesten:
> 
> i just stumbled over another problem generating a form dynamically:
> 
> i can't add an input field to a span. - textfields are only allowed to be
> applied to -markup.



> ---8<---
> public class ItemListView
> extends ListView
> {



>   @Override
>   protected void populateItem( ListItem item )
>   {
> Component component = itemresolver.resolve( item );
> 
> if( component != null )
>   item.add( component );

Here you need to add a Panel, not any Component.
-- 
 Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Text Correction

2007-04-21 Thread Jean-Baptiste Quenot
* Renan Camponez:

> "Are   you  sure   you   want  to   navigate   away  from   this
> page? Relaoding   this  page   will  cause   the  modal   window
> disappear. Press  OK  to continue,  or  Cancel  to stay  on  the
> current page."
>
> Where/How  can  I fix  it,  to  add  "to" between  "window"  and
> "disappear"?

If you ask me, I would download the sources and do:

$ cd wicket/trunk
$ grep -rs "will cause the modal window" .
./jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js:
   return "Reloading this page will cause the modal window to disappear.";

Does it help?
-- 
 Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] use images in pagingNavigator

2007-04-21 Thread Ryan Holmes
If you want to keep it simple and you don't mind using images served  
from your context root, do something like:



   
 
 
 
  5
 
  
 
   



If you want to package the images alongside your java and html files,  
you could do what John Krasnay suggested (I haven't tried this myself  
so I'm not sure if it's a 1.3 thing or if it also works in 1.2):

...
 
...

The main point here is that you don't need to re-implement  
PagingNavigator/AjaxPagingNavigator. Your subclass already inherits  
all of the logic to create the navigation, links, etc. Just keep the  
wicket id's and markup hierarchy intact in your html file.

The only reason you would need to re-implement is if you actually  
want to add new components to the links. But hopefully I just  
demonstrated two ways to avoid that.

-Ryan



On Apr 21, 2007, at 12:40 AM, Lec wrote:

>
> If this is the case of implementation in the markup, then how do we  
> go about
> doing its implementation in Subclass of ajax paging navigator. Do  
> we need to
> combine its implementation with the AjaxPagingNavigation,
> AjaxPagingNavigationLink and AjaxPagingNavigationBehaviour all  
> together? how
> do these 3 objects combination of usage look like in the skeleton  
> code?
> Would like somebodyto give a pointer here. :) Thanks
>
>
> igor.vaynberg wrote:
>>
>> you can create a subclass of the paging navigator and override the  
>> markup
>> so
>> it looks something like this:
>>
>> 
>> 
>>   
>>   first.gif     prev.gif
>>
>># 5
>>
>>   next.gif     last.gif
>>   
>> 
>> 
>>
>> -Igor
>>
>>
>>
>> On 5/5/06, Potje rode kool <[EMAIL PROTECTED]> wrote:
>>>
>>> Hi,
>>>
>>> I have a page with a AjaxPagingNavigator which I use with a
>>> PageableListView to display some thumbnales of images,
>>> all working ok but I want to display an image (as a link) instead  
>>> of the
>>> arrows (like < or <<), but how to do this? I am a bit lost on that.
>>>
>>> Thanks,
>>> Evert
>>>
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/use-images-in- 
> pagingNavigator-tf1562785.html#a10114659
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -- 
> ---
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] How to get desired DataTable layout

2007-04-21 Thread Ryan Holmes
If I understand the question, you just need to subclass  
AjaxPagingNavigator and then copy and modify PagingNavigator.html.  
So, if your subclass is called MyAjaxPagingNavigator, create a  
MyAjaxPagingNavigator.html file in the same package and copy the  
contents of PagingNavigator.html into it. Now modify the html as  
needed, keeping the wicket id's and markup  hierarchy intact.

Also check out IPagingLabelProvider. You can implement your own label  
provider (to customize how the page link text is rendered) and either  
pass it into your "MyAjaxPagingNavigator"  constructor or, probably  
better, set it as the default label provider in your  
MyAjaxPagingNavigator(String id, IPageable pageable) constructor.

You may also want to override newNavigation() so you can set the  
navigation view size, set a custom page link separator, etc.

This is based on Wicket 1.2.5, btw.

hth,
-Ryan


On Apr 21, 2007, at 12:18 AM, Lec wrote:

>
> Hie Igor, Ptrthomas,
>   Thanks for providing me the links of the
> sample reference code, Im afraid that s not what Im looking for.
>
> Take a look at
> http://www.nabble.com/use-images-in-pagingNavigator- 
> tf1562785.html#a4249863
> It has the implementation markup of the HTML. Now how do I go about  
> doing
> that in the subclass of PagingNavigation or AjaxPagingNavigation. I  
> believe
> we have to associate the three object paging - AjaxPagingNavigation,
> AjaxPagingNavigationIncrementLink and AjaxPagingNavigationBehaviour  
> together
> right? What's skeleton code of its implementation?
>
> Any help?
>
>
> ptrthomas wrote:
>>
>> Hi,
>>
>> I tried to create a tabular listing with pagination completely from
>> scratch
>> using only ListView-s and you can look at the code here:
>>
>> http://fisheye3.cenqua.com/browse/j-trac/trunk/jtrac/src/main/java/ 
>> info/jtrac/wicket/ItemListPanel.java?r=946
>>
>> It's not Ajax, but may help as a reference.  The pagination code  
>> is lines
>> 75
>> - 167
>>
>> HTML code is here:
>>
>> http://fisheye3.cenqua.com/browse/j-trac/trunk/jtrac/src/main/java/ 
>> info/jtrac/wicket/ItemListPanel.html?r=962
>>
>> Regards,
>>
>> Peter.
>>
>> On 4/20/07, Lec <[EMAIL PROTECTED]> wrote:
>>>
>>>
>>> Thanks for the answer. Hmmm but my last question wasn't clearly  
>>> quite
>>> answered :)
>>> Actually I was asking for a sample code of AjaxPagingNavigationLink/
>>> AjaxPagingNavigationIncrementLink with  
>>> AjaxPagingNavigationBehaviour as I
>>> had a difficult time in finding and understanding the correlations
>>> between
>>> them. My goal is to move away the default << 1 2 ..n >> paging  
>>> display in
>>> AjaxPagingNavigator to a more customized paging display. This  
>>> explains
>>> the
>>> reason behind my attempt on the usage of AjaxPagingNavigationLink/
>>> AjaxPagingNavigationIncrementLink with  
>>> AjaxPagingNavigationBehaviour. But
>>> I
>>> don't know where to begin and what I'm missing now. A sample  
>>> skeleton
>>> code
>>> will greatly help me to understand the correlation here. :) Any  
>>> helps for
>>> me
>>> on this?
>>>
>>>
>>> igor.vaynberg wrote:

 On 4/20/07, Lec <[EMAIL PROTECTED]> wrote:
>
>
> I didn't repaint it. It's just the WebMarkupContainer component  
> that I
> missed
> putting in my Panel that caused the whole odd behaviour displaying
> problemAnyway it's now working for me after putting the
> WebMarkupContainer in the Panel. Thanks :) What Im confused  
> about is,
>>> I
> don't understand why do we need to put in another  
> WebMarkupContainer
> since
> Panel is already considered one?  I never knew I have to use  
> another
> WebMarkupContainer in the Panel to achieve the ajaxification of
>>> gridview
> in
> the pagination. It's a slight difference way of implementation  
> if you
> compare it to the ajaxification of Pageable ListView in Panel,  
> even
> though
> we can still use the WebMarkupContainer to achieve the same  
> behaviour
>>> in
> Pageable ListView.


 you dont need _another_ webmarkupcontainer, you just cant  
 repaint the
 listview itself directly, eg do ajaxtarget.addcomponent 
 (listview). in
>>> fact
 as of yesterday that will throw an exception. so you need to  
 repaint
>>> its
 closest ancestor that is not a listview.


 Having said that, it reminds of another question. The question  
 is, how
>>> do
 I
> use AjaxPagingNavigationLink and  
> AjaxPagingNavigationIncrementLink in
>>> the
> Panel? The reason I want to use these two paging components is to
> customize
> the paging << >> thingy we find in AjaxPagingNavigator. And  I  
> believe
> AjaxPagingNavigator comes only with the default << 1 2 3 ... n >>
>>> paging
> display right? If im not mistaken, to customize the paging  
> display, I
> have
> to use AjaxPagingNavigation and AjaxPagingNavig

Re: [Wicket-user] Where to place images

2007-04-21 Thread nlif


Ah. Nice. I think I get it now.. it's a different approach, but then again,
maybe that's the "wicket-way" :)
I'll give it a shot and see how it works for me.

Thanks,
Naaman


John Krasnay wrote:
> 
> You might consider referencing the image from a Panel, then just using
> the panel everywhere. In that case the image only needs to be kept in
> the package that defines the Panel.
> 
> If it's something like a logo that appears at the top of every page, you
> could also define a base page that renders the logo, then have every
> other page extend your base page. In that case the image only needs to
> be in same package as the base page.
> 
> In both cases, however, you do lose the ability to preview beyond the
> panel or base page. As with any web framework, there's only so far you
> can push previews. For me, though, the ability to package
> Java+html+images+css+javascript into one re-usable component far
> outweighs this limitation.
> 
> jk
> 
> On Thu, Apr 19, 2007 at 12:22:53AM -0700, nlif wrote:
>> 
>> Let me make sure I understand: you suggest that I place the img files
>> along
>> with the html and java files?
>> But what if I have images that are used in many places in the
>> application?
>> Do I keep multiple copies of that gif files?
>> This seems hard to maintain...
>> 
>> Naaman
> 
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Where-to-place-images-tf3601705.html#a10118536
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] CATV data

2007-04-21 Thread Windows
Needs available in three editions, you. Ringer query manager net inspector. Ee 
mgsoft mib browser edition, which do need. Offering includes generic trace 
window not any other?
You asked yourself your particular this page!
Can be seamlessly contacted managed managing.
Need, fb, home news products amp, services sales.
Messages exchanged between agents displayed raw dump format decoded. Docsis 
based interested low level, by option current additional. Evaluate see customer 
from subscribe, mailing lists latest evaluation. Jubilee release compiler 
version for windows as. Today, protocol being introduced into. Full ietf more 
supporting, definitely operator does docsis.
Suitable my needs available in three. Dump format decoded therefore useful 
debugging.
Yourself your particular this page should provide definitive answer. Design kit 
network management toolbox, the th of our! Operator does docsis, based. Cannot 
properly, license if involved kind tutor, or! Problems cannot properly license 
if, involved.
Definitive answer question addition.
Wish work ultimate snmpv.


Current.gif
Description: GIF image
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket 1.3 roadmap

2007-04-21 Thread Martijn Dashorst
On 4/21/07, Xavier Hanin <[EMAIL PROTECTED]> wrote:
> BTW, I like the style of the roadmap picture, it's much nicer than a simple
> text based version. Very good job, as usual!

Thx, but most of the credit goes to omnigraffle. It is the most useful
graphics tool for making diagrams that look good.

Martijn

-- 
Learn Wicket at ApacheCon Europe: http://apachecon.com
Join the wicket community at irc.freenode.net: ##wicket
Wicket 1.2.5 will keep your server alive. Download Wicket now!
http://wicketframework.org

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket 1.3 roadmap

2007-04-21 Thread Xavier Hanin

On 4/21/07, Martijn Dashorst <[EMAIL PROTECTED]> wrote:


I promised earlier that I would devise a roadmap with some dates on when
to expect releases. So here it is:

http://www.flickr.com/photos/dashorst/466161899/



Thanks for sharing this roadmap, this is very good news to see that
1.3.0version can be expected in a reasonable timeframe.
BTW, I like the style of the roadmap picture, it's much nicer than a simple
text based version. Very good job, as usual!

Xavier

--
Learn Ivy at ApacheCon: http://www.eu.apachecon.com/
Manage your dependencies with Ivy!
http://incubator.apache.org/ivy/
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] FormComponent - HTML equivalent?

2007-04-21 Thread Jan Kriesten

hi martijn,

> I fail to see how you repeat yourself when you create a RadioPanel,
> CheckboxPanel, PasswordPanel.

actually, i have all those panel classes! i just added the EditTextPanel to my 
post!

what my question was all about, is the listview to which these panels are added.
i want to reuse the listview and add to it EditTextPanel, RadioPanel etc. to it.
 The EditTextPanel implements an Interface to resolve those ListItems.

i hope i made myself clearer.

the listview-markup contains a span - and i asked for a markup-correspondence
for 'FormComponent'...

having a callback-interface for an item is not that obscure to object-oriented
progamming, is it?

> I just think you're lazy for not wanting to write those 5 panels ;-)

not at all, just this ListPanel calling the given resolve( listitem )-interface
saves quite a few more classes then those 5.

best regards, --- jan.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] FormComponent - HTML equivalent?

2007-04-21 Thread Martijn Dashorst
On 4/21/07, Jan Kriesten <[EMAIL PROTECTED]> wrote:
> > Use panels or fragments for that. There have been hundreds of threads
> > for this on the list showing how to do so: dynamic forms, bean forms,
> > bean panels, bean editors
>
> you might have noticed that i am using a panel for this?!

You only have one panel class. You need to create a panel for each
different component package you want to replace it with. What you are
doing is not what we advised those people.

> i'm just trying to avoid repeating myself, i.e. having to write dozens of
> list-markup / java files where the only difference is the kind of form element
> (input/select/checkbox/radio) to be added to a panel...

I fail to see how you repeat yourself when you create a RadioPanel,
CheckboxPanel, PasswordPanel.

Creating a panel for each type of component is what we have advocated.
That is the price you have to pay for this setup: you have to write a
panel or fragment for each component you want to change.

So you have to write 5 or so panels of about 10-12 lines of code and
then you have your generic bean editor. It gives you the power to hook
it into your own pipeline, and customize it to your needs. This is not
something that belongs to Wicket as we would be flooded with requests
where the thing does not do some specific usecase of a user.

> please be kind and don't just repeat the panel/fragment-phrase - as i'm well
> aware of this concept. thanx!

Where was I not kind? Brief, yes: my time is limited and precious to
me. Answering questions that have been asked numerous times on the
list is not something I have high on my list of things to do. Read the
list archives: this advice has been given numerous times and if you
don't like that answer then what can I do?

I just think you're lazy for not wanting to write those 5 panels ;-)

Martijn

-- 
Learn Wicket at ApacheCon Europe: http://apachecon.com
Join the wicket community at irc.freenode.net: ##wicket
Wicket 1.2.5 will keep your server alive. Download Wicket now!
http://wicketframework.org

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] FormComponent - HTML equivalent?

2007-04-21 Thread Jan Kriesten

hi martijn,

> Use panels or fragments for that. There have been hundreds of threads
> for this on the list showing how to do so: dynamic forms, bean forms,
> bean panels, bean editors

you might have noticed that i am using a panel for this?!

i'm just trying to avoid repeating myself, i.e. having to write dozens of
list-markup / java files where the only difference is the kind of form element
(input/select/checkbox/radio) to be added to a panel...

please be kind and don't just repeat the panel/fragment-phrase - as i'm well
aware of this concept. thanx!

regards, --- jan.


> 
> Martijn
> 
> On 4/21/07, Jan Kriesten <[EMAIL PROTECTED]> wrote:
>> hi,
>>
>> i just stumbled over another problem generating a form dynamically:
>>
>> i can't add an input field to a span. - textfields are only allowed to be
>> applied to -markup. that raises the question, can i have a type
>> 'formcomponent' in the markup so i can decide during runtime what kind of
>> form-fields are added to a list?
>>
>> i'm trying things as follows:
>>
>> i have an itemlist-panel:
>>
>> ---8<---
>> Class:
>>
>> public class ItemListPanel
>> extends Panel
>> {
>>   private static final Logger logger = LoggerFactory.makeLogger();
>>
>>   public ItemListPanel( String id, List list, IItemResolver itemresolver )
>>   {
>> super( id );
>> add( new ItemListView( list, itemresolver ) );
>>   }
>> }
>>
>> Markup:
>>   
>> 
>>   
>> 
>>   
>> ---8<--
>>
>> The ItemListView just looks like this:
>>
>> ---8<---
>> public class ItemListView
>> extends ListView
>> {
>>   private static final Logger logger = LoggerFactory.makeLogger();
>>
>>   private IItemResolver itemresolver;
>>
>>   public ItemListView( List list, IItemResolver itemresolver )
>>   {
>> super( "elementlist" );
>> this.itemresolver = itemresolver;
>> this.setList( list );
>> this.setReuseItems( true );
>>   }
>>
>>   @Override
>>   protected void populateItem( ListItem item )
>>   {
>> Component component = itemresolver.resolve( item );
>>
>> if( component != null )
>>   item.add( component );
>>   }
>> }
>> ---8<---
>>
>> That way I'm able to just define my itemresolver in the corresponding
>> FormField-class like this (depending on maxentries, only one textfield or a
>> textfield list is required):
>>
>> ---8<---
>>   public EditTextPanel( String id, BoundCompoundPropertyModel model, Node 
>> node,
>> String level )
>>   {
>> super( id, model, node, level );
>>
>> if( maxentries != 1 )
>> {
>>   Label input_label = new Label( "input_label", name );
>>   this.add( input_label );
>>   this.add( new ItemListPanel( "input_text", (List)getPropertyObject(), 
>> this
>> ) );
>> }
>> else
>> {
>>   TextField input_text = new TextField( "input_text" );
>>   input_text.setOutputMarkupId( true );
>>   input_text.setLabel( new Model( name ) );
>>
>>   SimpleFormComponentLabel input_label = new SimpleFormComponentLabel(
>> "input_label", input_text );
>>
>>   this.add( input_label );
>>   this.add( input_text );
>>
>>   model.bind( input_text, binding );
>> }
>>   }
>>
>>   public Component resolve( ListItem item )
>>   {
>> String binding = this.binding + "[" + item.getIndex() + "]";
>>
>> TextField input_text = new TextField( "element" );
>> input_text.setOutputMarkupId( true );
>> input_text.setLabel( new Model( name ) );
>> model.bind( input_text, binding );
>>
>> return(input_text);
>>   }
>> ---8<---
>>
>>
>> i hope you can follow what i'm trying to do... :-)
>>
>> best regards, --- jan.
>>
>> -
>> This SF.net email is sponsored by DB2 Express
>> Download DB2 Express C - the FREE version of DB2 express and take
>> control of your XML. No limits. Just data. Click to get it now.
>> http://sourceforge.net/powerbar/db2/
>> ___
>> Wicket-user mailing list
>> Wicket-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>>
> 
> 

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] FormComponent - HTML equivalent?

2007-04-21 Thread Martijn Dashorst
Use panels or fragments for that. There have been hundreds of threads
for this on the list showing how to do so: dynamic forms, bean forms,
bean panels, bean editors

Martijn

On 4/21/07, Jan Kriesten <[EMAIL PROTECTED]> wrote:
>
> hi,
>
> i just stumbled over another problem generating a form dynamically:
>
> i can't add an input field to a span. - textfields are only allowed to be
> applied to -markup. that raises the question, can i have a type
> 'formcomponent' in the markup so i can decide during runtime what kind of
> form-fields are added to a list?
>
> i'm trying things as follows:
>
> i have an itemlist-panel:
>
> ---8<---
> Class:
>
> public class ItemListPanel
> extends Panel
> {
>   private static final Logger logger = LoggerFactory.makeLogger();
>
>   public ItemListPanel( String id, List list, IItemResolver itemresolver )
>   {
> super( id );
> add( new ItemListView( list, itemresolver ) );
>   }
> }
>
> Markup:
>   
> 
>   
> 
>   
> ---8<--
>
> The ItemListView just looks like this:
>
> ---8<---
> public class ItemListView
> extends ListView
> {
>   private static final Logger logger = LoggerFactory.makeLogger();
>
>   private IItemResolver itemresolver;
>
>   public ItemListView( List list, IItemResolver itemresolver )
>   {
> super( "elementlist" );
> this.itemresolver = itemresolver;
> this.setList( list );
> this.setReuseItems( true );
>   }
>
>   @Override
>   protected void populateItem( ListItem item )
>   {
> Component component = itemresolver.resolve( item );
>
> if( component != null )
>   item.add( component );
>   }
> }
> ---8<---
>
> That way I'm able to just define my itemresolver in the corresponding
> FormField-class like this (depending on maxentries, only one textfield or a
> textfield list is required):
>
> ---8<---
>   public EditTextPanel( String id, BoundCompoundPropertyModel model, Node 
> node,
> String level )
>   {
> super( id, model, node, level );
>
> if( maxentries != 1 )
> {
>   Label input_label = new Label( "input_label", name );
>   this.add( input_label );
>   this.add( new ItemListPanel( "input_text", (List)getPropertyObject(), 
> this
> ) );
> }
> else
> {
>   TextField input_text = new TextField( "input_text" );
>   input_text.setOutputMarkupId( true );
>   input_text.setLabel( new Model( name ) );
>
>   SimpleFormComponentLabel input_label = new SimpleFormComponentLabel(
> "input_label", input_text );
>
>   this.add( input_label );
>   this.add( input_text );
>
>   model.bind( input_text, binding );
> }
>   }
>
>   public Component resolve( ListItem item )
>   {
> String binding = this.binding + "[" + item.getIndex() + "]";
>
> TextField input_text = new TextField( "element" );
> input_text.setOutputMarkupId( true );
> input_text.setLabel( new Model( name ) );
> model.bind( input_text, binding );
>
> return(input_text);
>   }
> ---8<---
>
>
> i hope you can follow what i'm trying to do... :-)
>
> best regards, --- jan.
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


-- 
Learn Wicket at ApacheCon Europe: http://apachecon.com
Join the wicket community at irc.freenode.net: ##wicket
Wicket 1.2.5 will keep your server alive. Download Wicket now!
http://wicketframework.org

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] FormComponent - HTML equivalent?

2007-04-21 Thread Jan Kriesten

hi,

i just stumbled over another problem generating a form dynamically:

i can't add an input field to a span. - textfields are only allowed to be
applied to -markup. that raises the question, can i have a type
'formcomponent' in the markup so i can decide during runtime what kind of
form-fields are added to a list?

i'm trying things as follows:

i have an itemlist-panel:

---8<---
Class:

public class ItemListPanel
extends Panel
{
  private static final Logger logger = LoggerFactory.makeLogger();

  public ItemListPanel( String id, List list, IItemResolver itemresolver )
  {
super( id );
add( new ItemListView( list, itemresolver ) );
  }
}

Markup:
  

  

  
---8<--

The ItemListView just looks like this:

---8<---
public class ItemListView
extends ListView
{
  private static final Logger logger = LoggerFactory.makeLogger();

  private IItemResolver itemresolver;

  public ItemListView( List list, IItemResolver itemresolver )
  {
super( "elementlist" );
this.itemresolver = itemresolver;
this.setList( list );
this.setReuseItems( true );
  }

  @Override
  protected void populateItem( ListItem item )
  {
Component component = itemresolver.resolve( item );

if( component != null )
  item.add( component );
  }
}
---8<---

That way I'm able to just define my itemresolver in the corresponding
FormField-class like this (depending on maxentries, only one textfield or a
textfield list is required):

---8<---
  public EditTextPanel( String id, BoundCompoundPropertyModel model, Node node,
String level )
  {
super( id, model, node, level );

if( maxentries != 1 )
{
  Label input_label = new Label( "input_label", name );
  this.add( input_label );
  this.add( new ItemListPanel( "input_text", (List)getPropertyObject(), this
) );
}
else
{
  TextField input_text = new TextField( "input_text" );
  input_text.setOutputMarkupId( true );
  input_text.setLabel( new Model( name ) );

  SimpleFormComponentLabel input_label = new SimpleFormComponentLabel(
"input_label", input_text );

  this.add( input_label );
  this.add( input_text );

  model.bind( input_text, binding );
}
  }

  public Component resolve( ListItem item )
  {
String binding = this.binding + "[" + item.getIndex() + "]";

TextField input_text = new TextField( "element" );
input_text.setOutputMarkupId( true );
input_text.setLabel( new Model( name ) );
model.bind( input_text, binding );

return(input_text);
  }
---8<---


i hope you can follow what i'm trying to do... :-)

best regards, --- jan.

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] extra SNAPSHOT-tests.jar file in lib when using Maven

2007-04-21 Thread Peter Thomas

Hi,

Just trying the latest 1.3.0-incubating-SNAPSHOT and I am using
wicket-extensions also.

I see an additional file called
wicket-1.3.0-incubating-SNAPSHOT-tests.jarwhich wasn't there before.

What is this?  Is this required and / or is there a Maven setting to remove
this?

When running mvn with the -X option this is the trace which says that this
file has scope "runtime"

[INFO] snapshot org.apache.wicket:wicket:1.3.0-incubating-SNAPSHOT: checking
for updates from wicketstuff.org
[DEBUG] repository metadata for: 'snapshot
org.apache.wicket:wicket:1.3.0-incubating-SNAPSHOT' could not be found on
repository: wicketstuff.org
[DEBUG] Skipping disabled repository central
[DEBUG] wicket: using locally installed snapshot
[DEBUG] Retrieving parent-POM:
org.apache.wicket:wicket-jdk14::1.3.0-incubating-SNAPSHOT for project:
null:wicket:jar:null from the repository.
[DEBUG] wicket-jdk14: using locally installed snapshot
[DEBUG] Retrieving parent-POM:
org.apache.wicket:wicket-parent::1.3.0-incubating-SNAPSHOT for project:
org.apache.wicket:wicket-jdk14:pom:null from the repository.
[DEBUG] wicket-parent: using locally installed snapshot
[DEBUG]
org.apache.wicket:wicket:jar:tests:1.3.0-incubating-SNAPSHOT:runtime(selected
for runtime)
[DEBUG]   commons-logging:commons-logging:jar:1.0.4:runtime (removed -
nearer found: 1.1)
[DEBUG]   log4j:log4j:jar:1.2.13:runtime (removed - nearer found: 1.2.12
)
[DEBUG] commons-collections:commons-collections:jar:3.2:compile(selected
for compile)

Thanks,

Peter.
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] use images in pagingNavigator

2007-04-21 Thread Lec

If this is the case of implementation in the markup, then how do we go about
doing its implementation in Subclass of ajax paging navigator. Do we need to
combine its implementation with the AjaxPagingNavigation,
AjaxPagingNavigationLink and AjaxPagingNavigationBehaviour all together? how
do these 3 objects combination of usage look like in the skeleton code?
Would like somebodyto give a pointer here. :) Thanks


igor.vaynberg wrote:
> 
> you can create a subclass of the paging navigator and override the markup
> so
> it looks something like this:
> 
> 
> 
>   
>   first.gif     prev.gif  
> 
># 5 
> 
>   next.gif     last.gif  
>   
> 
> 
> 
> -Igor
> 
> 
> 
> On 5/5/06, Potje rode kool <[EMAIL PROTECTED]> wrote:
>>
>> Hi,
>>
>> I have a page with a AjaxPagingNavigator which I use with a
>> PageableListView to display some thumbnales of images,
>> all working ok but I want to display an image (as a link) instead of the
>> arrows (like < or <<), but how to do this? I am a bit lost on that.
>>
>> Thanks,
>> Evert
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/use-images-in-pagingNavigator-tf1562785.html#a10114659
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] How to get desired DataTable layout

2007-04-21 Thread Lec

Hie Igor, Ptrthomas,
  Thanks for providing me the links of the
sample reference code, Im afraid that s not what Im looking for.

Take a look at
http://www.nabble.com/use-images-in-pagingNavigator-tf1562785.html#a4249863
It has the implementation markup of the HTML. Now how do I go about doing
that in the subclass of PagingNavigation or AjaxPagingNavigation. I believe
we have to associate the three object paging - AjaxPagingNavigation,
AjaxPagingNavigationIncrementLink and AjaxPagingNavigationBehaviour together
right? What's skeleton code of its implementation? 

Any help?


ptrthomas wrote:
> 
> Hi,
> 
> I tried to create a tabular listing with pagination completely from
> scratch
> using only ListView-s and you can look at the code here:
> 
> http://fisheye3.cenqua.com/browse/j-trac/trunk/jtrac/src/main/java/info/jtrac/wicket/ItemListPanel.java?r=946
> 
> It's not Ajax, but may help as a reference.  The pagination code is lines
> 75
> - 167
> 
> HTML code is here:
> 
> http://fisheye3.cenqua.com/browse/j-trac/trunk/jtrac/src/main/java/info/jtrac/wicket/ItemListPanel.html?r=962
> 
> Regards,
> 
> Peter.
> 
> On 4/20/07, Lec <[EMAIL PROTECTED]> wrote:
>>
>>
>> Thanks for the answer. Hmmm but my last question wasn't clearly quite
>> answered :)
>> Actually I was asking for a sample code of AjaxPagingNavigationLink/
>> AjaxPagingNavigationIncrementLink with AjaxPagingNavigationBehaviour as I
>> had a difficult time in finding and understanding the correlations
>> between
>> them. My goal is to move away the default << 1 2 ..n >> paging display in
>> AjaxPagingNavigator to a more customized paging display. This explains
>> the
>> reason behind my attempt on the usage of AjaxPagingNavigationLink/
>> AjaxPagingNavigationIncrementLink with AjaxPagingNavigationBehaviour. But
>> I
>> don't know where to begin and what I'm missing now. A sample skeleton
>> code
>> will greatly help me to understand the correlation here. :) Any helps for
>> me
>> on this?
>>
>>
>> igor.vaynberg wrote:
>> >
>> > On 4/20/07, Lec <[EMAIL PROTECTED]> wrote:
>> >>
>> >>
>> >> I didn't repaint it. It's just the WebMarkupContainer component that I
>> >> missed
>> >> putting in my Panel that caused the whole odd behaviour displaying
>> >> problemAnyway it's now working for me after putting the
>> >> WebMarkupContainer in the Panel. Thanks :) What Im confused about is,
>> I
>> >> don't understand why do we need to put in another WebMarkupContainer
>> >> since
>> >> Panel is already considered one?  I never knew I have to use another
>> >> WebMarkupContainer in the Panel to achieve the ajaxification of
>> gridview
>> >> in
>> >> the pagination. It's a slight difference way of implementation if you
>> >> compare it to the ajaxification of Pageable ListView in Panel, even
>> >> though
>> >> we can still use the WebMarkupContainer to achieve the same behaviour
>> in
>> >> Pageable ListView.
>> >
>> >
>> > you dont need _another_ webmarkupcontainer, you just cant repaint the
>> > listview itself directly, eg do ajaxtarget.addcomponent(listview). in
>> fact
>> > as of yesterday that will throw an exception. so you need to repaint
>> its
>> > closest ancestor that is not a listview.
>> >
>> >
>> > Having said that, it reminds of another question. The question is, how
>> do
>> > I
>> >> use AjaxPagingNavigationLink and AjaxPagingNavigationIncrementLink in
>> the
>> >> Panel? The reason I want to use these two paging components is to
>> >> customize
>> >> the paging << >> thingy we find in AjaxPagingNavigator. And  I believe
>> >> AjaxPagingNavigator comes only with the default << 1 2 3 ... n >>
>> paging
>> >> display right? If im not mistaken, to customize the paging display, I
>> >> have
>> >> to use AjaxPagingNavigation and AjaxPagingNavigationBehavior as well
>> >> right??? I have been trying to use AjaxPagingNavigation +
>> NavigationLink
>> >> +
>> >> NavigationIncrementLink + NavigationBehavior to get this customization
>> >> working, but it seems like everything I have been doing so far is not
>> >> [...]
>> >
>> >
>> > our pagingnavigator and its ajax counterpart are not very well coded to
>> > make
>> > it easy to extend. the only thing i can tell you right now is that if
>> you
>> > want to customize it you have to roll your own for anything but the
>> > simplest
>> > customizations. it was on our todolist to refactor, but we just havent
>> > found
>> > the time.
>> >
>> > -igor
>> >
>> >
>> >
>> > igor.vaynberg wrote:
>> >> >
>> >> > have you tried
>> >> >
>> >> > final WebMarkupContainer gridviewcontainer=new WebMarkupContainer();
>> >> > gridviewcontainer.setOutputMarkupId(true);
>> >> > gridviewcontainer.add(new gridview(...));
>> >> > gridviewcontainer.add(new ajaxpagingnavigator(...) {
>> >> >   onAjaxEvent(target) { target.add(gridviewcontainer); }
>> >> > }
>> >> >
>> >> > this is a common practice with repeaters, you cannot repaint them
>> >> > directly,
>> >> > but rather have to repaint some con