Re: introducing wicket:for attribute

2011-07-08 Thread Steve Swinsburg
This is excellent Igor, our accessibility people will be very thankful! Please 
leave it in 1.4.x!

cheers,
Steve



On 09/07/2011, at 2:22 PM, Igor Vaynberg wrote:

> just implemented the wicket:for attribute. check out the javadoc here:
> 
> http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java?view=markup&pathrev=1144589
> 
> 1.4.x only for now, still needs to be forward-ported to trunk.
> 
> feedback?
> 
> -igor
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 


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



Re: introducing wicket:for attribute

2011-07-08 Thread robert.mcguinness
this is going to cleanup a lot of code.  much obliged.  please let us know
when in 1.5.x branch.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/introducing-wicket-for-attribute-tp3655611p3655660.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: introducing wicket:for attribute

2011-07-08 Thread Clint Checketts
Great! Thanks for doing this!

On Fri, Jul 8, 2011 at 11:22 PM, Igor Vaynberg wrote:

> just implemented the wicket:for attribute. check out the javadoc here:
>
>
> http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java?view=markup&pathrev=1144589
>
> 1.4.x only for now, still needs to be forward-ported to trunk.
>
> feedback?
>
> -igor
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


introducing wicket:for attribute

2011-07-08 Thread Igor Vaynberg
just implemented the wicket:for attribute. check out the javadoc here:

http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java?view=markup&pathrev=1144589

1.4.x only for now, still needs to be forward-ported to trunk.

feedback?

-igor

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



Re: OutputStreams and Panels

2011-07-08 Thread Julian Sinai
I should add that I used BIRT 3.7 for this.

Julian


Re: OutputStreams and Panels

2011-07-08 Thread Julian Sinai
Martin, thank you for your reply. Your suggestion helped. If it can help
others, here's what I did to integrate a BIRT report into a Wicket Panel as
html:


private class ReportPanel extends Panel implements
IMarkupResourceStreamProvider, IMarkupCacheKeyProvider
{
private static final long serialVersionUID = - 8538589085021403531L;
 private static final String BIRT_REPORTS_LOCATION = "your location here";
private static final String BIRT_LOGS_LOCATION = "your location here";
 private final String reportName;

public ReportPanel(String id, String reportName)
 {
super(id);
this.reportName = reportName;
 }

@Override
public IResourceStream getMarkupResourceStream(MarkupContainer container,
Class containerClass)
 {
StringBuilder buf = new StringBuilder();
buf.append("");
 try
{
final String reportPath = BIRT_REPORTS_LOCATION + reportName + ".rptdesign";

final EngineConfig config = new EngineConfig();
config.setLogConfig(BIRT_LOGS_LOCATION, Level.FINE);

// No need to optimize this to happen only once, because the Platform will
only initialize itself once.
Platform.startup(config);
 final IReportEngineFactory factory = (IReportEngineFactory) Platform
.createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY);
 final IReportEngine engine = factory.createReportEngine(config);
final IReportRunnable report = engine.openReportDesign(reportPath);
 final IRunAndRenderTask task = engine.createRunAndRenderTask(report);

final ByteArrayOutputStream out = new ByteArrayOutputStream();
 final HTMLRenderOption options = new HTMLRenderOption();
options.setOutputFormat(IRenderOption.OUTPUT_FORMAT_HTML);
 options.setEmbeddable(true);
options.setOutputStream(out);

 task.setRenderOption(options);
task.run();
task.close();

buf.append(new String(out.toByteArray()));
}
catch (final Exception e)
 {
buf.append(new String(e.getMessage()));
}
 buf.append("");
return new StringResourceStream(buf.toString());
 }

@Override
public String getCacheKey(MarkupContainer container, Class
containerClass)
 {
// Must return null so that the markup isn't cached.
return null;
 }
}

Julian
On Fri, Jul 8, 2011 at 1:37 AM, Martin Grigorov wrote:

> See org.apache.wicket.markup.IMarkupResourceStreamProvider
>
> public class BirtReport extends WebMarkupContainer implements
> IMarkupResourceStreamProvider  {
>
>   public IResourceStream getMarkupResourceStream(final
> MarkupContainer container, Class containerClass) {
>
>  // do your BIRT logic here
>  return new AnyIResourceStreamThatFitsYourNeeds(birtResult)
>}
> }
>
> On Fri, Jul 8, 2011 at 4:21 AM, Julian Sinai  wrote:
> > I am using the BIRT Report Engine API. It generates html that I want to
> > display in a Panel or a WebMarkupContainer. The API requires me to hand
> it a
> > java.io.OutputStream, which it then writes to. How do I obtain a stream
> from
> > Wicket in a way that the BIRT output can be inserted in my Panel?
> >
> > Any help is appreciated.
> > Julian
> >
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>


RE: getSession() in LDM

2011-07-08 Thread Miroslav F.
Thanks, was confused that getSessions() didn't work.
 

> -Original Message-
> From: Alexander Morozov [mailto:alexander.v.moro...@gmail.com] 
> Sent: Friday, 08. July 2011 19:01
> To: users@wicket.apache.org
> Subject: Re: getSession() in LDM
> 
> Yep, use Session.get() method.
> 
> -
> --
> http://www.linkedin.com/in/amorozov
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/getSession-in-LDM-t
p3654618p3654647.html
> Sent from the Users forum mailing list archive at Nabble.com.
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 


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



Re: getSession() in LDM

2011-07-08 Thread Alexander Morozov
Yep, use Session.get() method.

-
--
http://www.linkedin.com/in/amorozov
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/getSession-in-LDM-tp3654618p3654647.html
Sent from the Users forum mailing list archive at Nabble.com.

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



getSession() in LDM

2011-07-08 Thread Miroslav F.
Hi,

is it possible to getSession() in load() in LDM?

Miro


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



Re: Autocomplete - get model object

2011-07-08 Thread Michael O'Cleirigh

Hello,

Have a look at the datatable-autocomplete project in wicketstuff-core:

(maven details: org.wicketstuff:datatable-autocomplete:1.4.17.2)

It allows you to show the autocomplete matches in a datatable which lets 
you show what ever fields of the object you want and have full control 
over how they are rendered.


The datatable-autocomplete-example application indexes java methods from 
the JVM's rt.jar (it depends on the jvm but it should be in the range of 
70-90,000 methods).


Here is how the  AutoCompletingTextField is setup:

https://github.com/wicketstuff/core/blob/core-1.4.x/jdk-1.5-parent/datatable-autocomplete-parent/datatable-autocomplete-examples/src/main/java/org/wicketstuff/datatable_autocomplete/web/page/HomePage.java#L215

Run it like this:
MAVEN_OPTS=-Xmx512m -XX:MaxPermSize=128M mvn jetty:run

The example uses a PatriciaTrie as the data source (i.e. we read all of 
the objects into memory and index them for fast prefix searches) but the 
underlying datatable just takes an IDataProvider so it would be possible 
to use other data sources aswell.


Your most recent question on this thread is about how to do stuff on 
selection of a row so in the case of datatable-autocomplete that would 
be done implementing the ITableRowSelection interface.  (the example 
shows this, you update the models for the components impacted by the 
selection and then target.addComponent(field) to get them updated in the 
browser).



Regards,

Mike


here's the situation .. I have an Object with address data(street, house
number, city, etc) .. so I use Autocomplete to search for streets meanin ..
user writes in street name and dropdown shows .. street name and city in
wich street is in (meaning same streets can exists in different cities) ..
so when choice is selected only street is written to the text box .. and
when I wanted to use a converter same street names occur on many choices so
equals method is not appropriate for checking .. cause user might have
selected the 3rd choice and converter would get me an object with the first
one it finds .. and ... NO I cant pust city beside street in text field,
cause city is in it's own field ;) .. that's why I'm trying to get the
object autocomplete field and not this text autocomplete field ..

but hey .. thank you for your help ;)

regards

Armando
PS: cant believe nobody ever needed anything like this :D


--
View this message in 
context:http://apache-wicket.1842946.n4.nabble.com/Autocomplete-get-model-object-tp3649960p3650048.html
Sent from the Users forum mailing list archive at Nabble.com.

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




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



Re: Wicket Encrypted URL Redirects To A Css Image

2011-07-08 Thread Johan Compagner
yes that is the trick, all the urls that are generated before that
can't be used anymore because encrypted urls are session based.


On Fri, Jul 8, 2011 at 09:46, Horacio Natyural
 wrote:
> Hi,
>
> i've noticed that it seems to happen after login. I've used the
> Session.replaceSession command on logging in?
> Do you think that there is a relation to this?
>
> Thanks
>
> On Thu, Jul 7, 2011 at 10:04 PM, Horacio Natyural <
> horacio.natyu...@gmail.com> wrote:
>
>> here are some of the logs
>>
>> rlWebRequestCodingStrategy - Invalid URL:
>>
>> main?x=KHsKMhrrd-D04mkpqd*xsmCmGwRvNVoUPmz4BBdww8DLo4rNdEHOs25kQrwCz-EEu7JIh1GOXL7GXVhqHfJi1g,
>> exception type: org.apache.wicket.WicketRuntimeException, exception
>> message:Unable to decrypt the text '({
>> 2 �w���i)�߱�`�  o5Z >l�  p��ˣ��tAγndB� ��
>> ��H�Q�\��]Xj �'
>>
>>
>> rlWebRequestCodingStrategy - Invalid URL:
>>
>> index?x=VW*oMOXmPA45gt7EO0OOeRiN8uhyKItwgoWqwWlZ*lR8ZeIsSmwzQbUDlRP3tVdzdGh8Pip3ADKeTYmyhTpchGgpRzZ3zk9VXNgd*gsOzXSO82y0IFHnIMMwLOxki2efPPU7e1vM*Wo,
>> exception type: org.apache.wicket.WicketRuntimeException, exception
>> message:Unable to decrypt the text
>> 'Uo�0��< 9���;C�y
>> ���r(�p����iY�T|e�,Jl3A� � ��Wsth|>*w
>>
>> On Thu, Jul 7, 2011 at 9:53 PM, Horacio Natyural
>>  wrote:
>> > oh ,
>> >
>> > and to add to it,
>> > this only happens on an SSL site, it doesn't happen on non http
>> sites.
>> >
>> > what's weird is, i don't get an error but i'm redirected to an image
>> > or a css file.
>> >
>> > On Thu, Jul 7, 2011 at 9:08 PM, Horacio Natyural
>> >  wrote:
>> >> im geting unable to decrypt url text in mu server logs dont know if
>> they are relates though?
>> >>
>> >> any ideas ?
>> >>
>> >> why am i getting redirected to my resource files ?
>> >>
>> >> tnx
>> >>
>> >> On Jul 7, 2011, at 6:45 PM, Martin Grigorov 
>> wrote:
>> >>
>> >>> Attach a debugger to WicketFilter#doFilter() and see what kind of
>> >>> requests come from the client.
>> >>> If it is crypted then it's interesting what is the decrypted value for
>> it.
>> >>>
>> >>> On Thu, Jul 7, 2011 at 12:16 PM, Horacio Natyural
>> >>>  wrote:
>>  Is this related?
>> 
>>  ever since we placed this tag thats when the error occurs
>> 
>>  
>> 
>>  also another instance is when i accesesed the home page, the css file
>>  appeared instead.
>> 
>>  thanks
>> 
>>  On Thursday, July 7, 2011, Horacio Natyural <
>> horacio.natyu...@gmail.com> wrote:
>> > hi,
>> >
>> > i've found that we have several components implementing
>> Imarkupcacheprovider,
>> > however, the id return is null
>> >
>> >
>> > public String getCacheKey(MarkupContainer container, Class
>> containerClass) {
>> >                         return null;
>> >                 }
>> >
>> > we ahve several components doing this.
>> > is this a possible cause as to why the wrong component was rendered ?
>> >
>> > thanks
>> > horacio
>> > On Thu, Jul 7, 2011 at 7:30 AM, Horacio Natyural
>> >  wrote:
>> >> hi,
>> >>
>> >> thanks! i also noticed that it seems to happen on an SSL site rather
>> >> than on a non ssl site.
>> >>
>> >> Thanks!
>> >> Horacio
>> >>
>> >> On Thu, Jul 7, 2011 at 12:37 AM, Martin Grigorov <
>> mgrigo...@apache.org> wrote:
>> >>> https://issues.apache.org/jira/browse/WICKET-3514 is similar
>> >>> but there the problem was that images in .css were broken, i.e.
>> they
>> >>> are relative to the .css, but since the .css path is encoded the
>> >>> resolved path for the image was invalid
>> >>>
>> >>> On Wed, Jul 6, 2011 at 6:01 PM, Igor Vaynberg <
>> igor.vaynb...@gmail.com> wrote:
>>  doesnt ring a bell.
>> 
>>  -igor
>> 
>>  On Wed, Jul 6, 2011 at 8:32 AM, Horacio Natyural
>>   wrote:
>> > btw, i just made up the crypted url of course.
>> > index is supposed to a wicket page.
>> > i also noticed that the image that it downloads is referenced in
>> a css
>> > file in the application so it is a resource
>> >
>> > was there any bug of this nature reported before? i'm trying to
>> find
>> > one but i can't seem to.
>> >
>> > On Wed, Jul 6, 2011 at 11:31 PM, Horacio Natyural
>> >  wrote:
>> >> lol
>> >> sorry about that
>> >>
>> >> anyway here's what happened,
>> >>
>> >> The link I accessed turned into a css image instead.
>> >>
>> >> Here's what it looks like in Firefox
>> >>
>> >> Encrypted URL
>> >>
>> >> index(PNG Image,256x240 pixels)
>> >>
>> >> https://ip_addr:port
>> /contextroot/index?x=23423562302982lj;lkjsf73jf;2lkjf;2l3kjf;l2k3fj;lkjf76
>> >>
>> >> and then the image appears.
>> 

Re: OutputStreams and Panels

2011-07-08 Thread Martin Grigorov
See org.apache.wicket.markup.IMarkupResourceStreamProvider

public class BirtReport extends WebMarkupContainer implements
IMarkupResourceStreamProvider  {

   public IResourceStream getMarkupResourceStream(final
MarkupContainer container, Class containerClass) {

  // do your BIRT logic here
  return new AnyIResourceStreamThatFitsYourNeeds(birtResult)
   }
}

On Fri, Jul 8, 2011 at 4:21 AM, Julian Sinai  wrote:
> I am using the BIRT Report Engine API. It generates html that I want to
> display in a Panel or a WebMarkupContainer. The API requires me to hand it a
> java.io.OutputStream, which it then writes to. How do I obtain a stream from
> Wicket in a way that the BIRT output can be inserted in my Panel?
>
> Any help is appreciated.
> Julian
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Wicket Encrypted URL Redirects To A Css Image

2011-07-08 Thread Horacio Natyural
Hi,

i've noticed that it seems to happen after login. I've used the
Session.replaceSession command on logging in?
Do you think that there is a relation to this?

Thanks

On Thu, Jul 7, 2011 at 10:04 PM, Horacio Natyural <
horacio.natyu...@gmail.com> wrote:

> here are some of the logs
>
> rlWebRequestCodingStrategy - Invalid URL:
>
> main?x=KHsKMhrrd-D04mkpqd*xsmCmGwRvNVoUPmz4BBdww8DLo4rNdEHOs25kQrwCz-EEu7JIh1GOXL7GXVhqHfJi1g,
> exception type: org.apache.wicket.WicketRuntimeException, exception
> message:Unable to decrypt the text '({
> 2 �w���i)�߱�`�  o5Z >l�  p��ˣ��tAγndB� ��
> ��H�Q�\��]Xj �'
>
>
> rlWebRequestCodingStrategy - Invalid URL:
>
> index?x=VW*oMOXmPA45gt7EO0OOeRiN8uhyKItwgoWqwWlZ*lR8ZeIsSmwzQbUDlRP3tVdzdGh8Pip3ADKeTYmyhTpchGgpRzZ3zk9VXNgd*gsOzXSO82y0IFHnIMMwLOxki2efPPU7e1vM*Wo,
> exception type: org.apache.wicket.WicketRuntimeException, exception
> message:Unable to decrypt the text
> 'Uo�0��< 9���;C�y
> ���r(�p����iY�T|e�,Jl3A� � ��Wsth|>*w
>
> On Thu, Jul 7, 2011 at 9:53 PM, Horacio Natyural
>  wrote:
> > oh ,
> >
> > and to add to it,
> > this only happens on an SSL site, it doesn't happen on non http
> sites.
> >
> > what's weird is, i don't get an error but i'm redirected to an image
> > or a css file.
> >
> > On Thu, Jul 7, 2011 at 9:08 PM, Horacio Natyural
> >  wrote:
> >> im geting unable to decrypt url text in mu server logs dont know if
> they are relates though?
> >>
> >> any ideas ?
> >>
> >> why am i getting redirected to my resource files ?
> >>
> >> tnx
> >>
> >> On Jul 7, 2011, at 6:45 PM, Martin Grigorov 
> wrote:
> >>
> >>> Attach a debugger to WicketFilter#doFilter() and see what kind of
> >>> requests come from the client.
> >>> If it is crypted then it's interesting what is the decrypted value for
> it.
> >>>
> >>> On Thu, Jul 7, 2011 at 12:16 PM, Horacio Natyural
> >>>  wrote:
>  Is this related?
> 
>  ever since we placed this tag thats when the error occurs
> 
>  
> 
>  also another instance is when i accesesed the home page, the css file
>  appeared instead.
> 
>  thanks
> 
>  On Thursday, July 7, 2011, Horacio Natyural <
> horacio.natyu...@gmail.com> wrote:
> > hi,
> >
> > i've found that we have several components implementing
> Imarkupcacheprovider,
> > however, the id return is null
> >
> >
> > public String getCacheKey(MarkupContainer container, Class
> containerClass) {
> > return null;
> > }
> >
> > we ahve several components doing this.
> > is this a possible cause as to why the wrong component was rendered ?
> >
> > thanks
> > horacio
> > On Thu, Jul 7, 2011 at 7:30 AM, Horacio Natyural
> >  wrote:
> >> hi,
> >>
> >> thanks! i also noticed that it seems to happen on an SSL site rather
> >> than on a non ssl site.
> >>
> >> Thanks!
> >> Horacio
> >>
> >> On Thu, Jul 7, 2011 at 12:37 AM, Martin Grigorov <
> mgrigo...@apache.org> wrote:
> >>> https://issues.apache.org/jira/browse/WICKET-3514 is similar
> >>> but there the problem was that images in .css were broken, i.e.
> they
> >>> are relative to the .css, but since the .css path is encoded the
> >>> resolved path for the image was invalid
> >>>
> >>> On Wed, Jul 6, 2011 at 6:01 PM, Igor Vaynberg <
> igor.vaynb...@gmail.com> wrote:
>  doesnt ring a bell.
> 
>  -igor
> 
>  On Wed, Jul 6, 2011 at 8:32 AM, Horacio Natyural
>   wrote:
> > btw, i just made up the crypted url of course.
> > index is supposed to a wicket page.
> > i also noticed that the image that it downloads is referenced in
> a css
> > file in the application so it is a resource
> >
> > was there any bug of this nature reported before? i'm trying to
> find
> > one but i can't seem to.
> >
> > On Wed, Jul 6, 2011 at 11:31 PM, Horacio Natyural
> >  wrote:
> >> lol
> >> sorry about that
> >>
> >> anyway here's what happened,
> >>
> >> The link I accessed turned into a css image instead.
> >>
> >> Here's what it looks like in Firefox
> >>
> >> Encrypted URL
> >>
> >> index(PNG Image,256x240 pixels)
> >>
> >> https://ip_addr:port
> /contextroot/index?x=23423562302982lj;lkjsf73jf;2lkjf;2l3kjf;l2k3fj;lkjf76
> >>
> >> and then the image appears.
> >>
> >> although the link is supposed to be a link for a page.
> >>
> >> On Wed, Jul 6, 2011 at 11:22 PM, Igor Vaynberg <
> igor.vaynb...@gmail.com> wrote:
> >>> it is almost impossible to help you when you are so many
> versions behind...
> >>>
> >>> -igor
> >>>
> >>> O

OutputStreams and Panels

2011-07-08 Thread Julian Sinai
I am using the BIRT Report Engine API. It generates html that I want to
display in a Panel or a WebMarkupContainer. The API requires me to hand it a
java.io.OutputStream, which it then writes to. How do I obtain a stream from
Wicket in a way that the BIRT output can be inserted in my Panel?

Any help is appreciated.
Julian


ObjectAutoCompleteField set model/text

2011-07-08 Thread armandoxxx
Hi guys .. 


I have a form with some ObjectAutoCompleteField, so when I select value in 1
I would like to set some text into another ... how can I do that ? 

Regards

Armando

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/ObjectAutoCompleteField-set-model-text-tp3653375p3653375.html
Sent from the Users forum mailing list archive at Nabble.com.

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