problem with ChoiceRenderer

2012-05-11 Thread Michael Jaruska
Hi folks, after hours of elaborating, searching docu and trying I'm totaly lost. My ChoiceRenderer is not working. Here is my code (not relevant code has been removed): markup: select id=1 wicket:id=zoznam/select page implementation: public class PageEshop extends PageBase{ public

Re: problem with ChoiceRenderer

2012-05-11 Thread Michael Jaruska
PropertyModelVyrobok(defaultChoice, kluc) This is probably not what you've intended as Kluc is a String. Something like the following would make more sense: this.selectedChoice = vyrobky.get(0); new PropertyModelVyrobok(this, selectedChoice) Sven On 05/11/2012 09:16 AM, Michael Jaruska wrote: Hi folks

Re: problem with ChoiceRenderer

2012-05-13 Thread Michael Jaruska
more sense: this.selectedChoice = vyrobky.get(0); new PropertyModelVyrobok(this, selectedChoice) Sven On 05/11/2012 09:16 AM, Michael Jaruska wrote: Hi folks, after hours of elaborating, searching docu and trying I'm totaly lost. My ChoiceRenderer is not working. Here is my code

dropdown and values added with jquery

2012-05-13 Thread Michael Jaruska
Hi, in my Page (not relevant code removed for simplicity) is dropdown: public class MyPage extends WebBase{ //perie private ModelPerie modelPerie; //two values in dropdown: private ListPerie perie = Arrays.asList(new Perie(start, -Vyberte druh peří-), new Perie(vsypek, nové

DownloadLink

2012-10-14 Thread Michael Jaruska
Hi, what to add into onClick() in DownloadLink if I need return to client generated .pdf stream as a .pdf file? My code: IModel pdfStreamModel = new AbstractReadOnlyModel() { public Object getObject() { return getPdfStreamBytes(); } }; DownloadLink

Re: DownloadLink

2012-10-14 Thread Michael Jaruska
see 1. Your IModel must return a File, but yours returns bytes. 2. The download is initiated in DownloadLink#onClick, which you have blocked with your subclass. Hope that helps, Dan On Sun, Oct 14, 2012 at 5:09 PM, Michael Jaruska michael.jaru...@gmail.comwrote: Hi, what to add into onClick

Re: DownloadLink

2012-10-14 Thread Michael Jaruska
() {...}); On Sun, Oct 14, 2012 at 7:45 PM, Michael Jaruska michael.jaru...@gmail.comwrote: Dan, thank you for links and points. The true is that I have data in database so I would like streaming them. Is the right way put them in temp file first and then send it into browser with DownloadLink? After

Re: DownloadLink

2012-10-15 Thread Michael Jaruska
{ attributes.getResponse().write(pdfBytes); } }); return r; } } On Sun, Oct 14, 2012 at 8:14 PM, Michael Jaruska michael.jaru...@gmail.comwrote: Is there more complex example? Do you build link with DownloadLink or ResourceLink? -I suppouse you use ResourceLink. And yes, I would like to build

Re: DownloadLink

2012-10-15 Thread Michael Jaruska
, Michael Jaruska wrote: Yes, thank you, this example helps. On 15.10.2012 3:42, Dan Retzlaff wrote: This should get you going: new ResourceLinkVoid(pdf, new AbstractResource() { @Override protected ResourceResponse newResourceResponse(Attributes attributes) { final byte[] pdfBytes = getPdfBytes

find html tag

2013-01-23 Thread Michael Jaruska
Hi, is there a way I can find specific html tag in markup? I have this html structure: ul class=mymenu li a href=./mypage.html?cid=menumenu/a ul li a href=./mypage.html?cid=menu/submenusubmenu/a ul li a

Re: find html tag

2013-01-23 Thread Michael Jaruska
(ComponentTag tag) { super(tag); tag.put(my-html-attribute, value); } } Met vriendelijke groet, Kind regards, Bas Gooren Op 23-1-2013 20:45, schreef Michael Jaruska: Hi, is there a way I can find specific html tag in markup? I have this html structure: ul class=mymenu

Re: find html tag

2013-01-23 Thread Michael Jaruska
: WebMarkupContainer li = new WMC() { onComponentTag(ComponentTag tag) { super(tag); tag.put(my-html-attribute, value); } } Met vriendelijke groet, Kind regards, Bas Gooren Op 23-1-2013 20:45, schreef Michael Jaruska: Hi, is there a way I can find specific html tag

Re: find html tag

2013-01-23 Thread Michael Jaruska
: Sorry, I read too quickly. What are you trying to accomplish? Let's say you are able to find the appropriate html tag, what do you want to do with it? Met vriendelijke groet, Kind regards, Bas Gooren Op 23-1-2013 21:01, schreef Michael Jaruska: And question is not how can I change html

Re: find html tag

2013-01-23 Thread Michael Jaruska
, schreef Michael Jaruska: Problem is that uls and lis (let's call whole structure menu) is static html code. On 23.1.2013 20:50, Bas Gooren wrote: Hi! What you want to accomplish (e.g. changing some html attributes) can be done by adding an attributemodifier to each li component. In pseudocode

Re: find html tag

2013-01-23 Thread Michael Jaruska
, and create a custom model. The model can then load the html and perform string replacement. You can then add a label component which uses the model and has setEscapeModelStrings(false) set. Met vriendelijke groet, Kind regards, Bas Gooren Op 23-1-2013 21:11, schreef Michael Jaruska: I need

Re: find html tag

2013-01-23 Thread Michael Jaruska
with such filter. On Wed, Jan 23, 2013 at 11:11 PM, Michael Jaruska michael.jaru...@gmail.com wrote: Look at my original post. User clicks on a href=./mypage.html?cid=menu/* *submenu/subsubmenu2**subsubmenu2/a, then I have in String category (java code) value menu/submenu/subsubmenu2. I need just to make

Re: find html tag

2013-02-10 Thread Michael Jaruska
, Michael Jaruska michael.jaru...@gmail.com wrote: Look at my original post. User clicks on a href=./mypage.html?cid=menu/* *submenu/subsubmenu2**subsubmenu2/a, then I have in String category (java code) value menu/submenu/subsubmenu2. I need just to make 2 more steps: 1. in html code find anchor

Re: find html tag

2013-02-10 Thread Michael Jaruska
can get hold of the component's markup. With a MarkupStream you can iterate over it. Sven On 02/10/2013 10:23 PM, Michael Jaruska wrote: again with my question: is it possible to get markup in onRender() of the component? have found this article: https://cwiki.apache.org/WICKET/component

Re: find html tag

2013-02-11 Thread Michael Jaruska
, but nothing is displayed. any ideas please? On 10.2.2013 23:21, Sven Meier wrote: See BorderBehavior#beforeRender(Component) on how to iterate over the markup. Sven On 02/10/2013 11:09 PM, Michael Jaruska wrote: my quick test: @Override protected void onRender() { super.onRender

Re: find html tag

2013-02-11 Thread Michael Jaruska
, What do you want to do with the markup ? Maybe you don't need to bother with internals like MarkupStream for something that may be solved much easier. On Mon, Feb 11, 2013 at 10:01 AM, Michael Jaruska michael.jaru...@gmail.com wrote: thanks, studied. but in my case not working. i don't know why

Re: find html tag

2013-02-11 Thread Michael Jaruska
state to be in sync with the client side state (modified by your JS). On Mon, Feb 11, 2013 at 11:22 AM, Michael Jaruska michael.jaru...@gmail.com wrote: in fact, my panel is menu which is modified by javascript. i need to keep track of the previous selected entry (to get know javascript

Re: find html tag

2013-02-11 Thread Michael Jaruska
based on this article: https://cwiki.apache.org/WICKET/component-rendering.html in section onRender() it should be possible to modify markup which is going from wicket (e.g. from .html file) and modyfied it send to client. On 11.2.2013 11:34, Michael Jaruska wrote: yes, i need that raw html

Re: find html tag

2013-02-12 Thread Michael Jaruska
no way how to modify raw html stream in actual rendering? On 11.2.2013 11:50, Michael Jaruska wrote: based on this article: https://cwiki.apache.org/WICKET/component-rendering.html in section onRender() it should be possible to modify markup which is going from wicket (e.g. from .html file

Re: find html tag

2013-02-12 Thread Michael Jaruska
do you mean in beforeRender(final Component component)? On 12.2.2013 9:11, Martin Grigorov wrote: Hi, As Sven suggested - BorderBehavior does exactly this. On Tue, Feb 12, 2013 at 9:08 AM, Michael Jaruska michael.jaru...@gmail.comwrote: no way how to modify raw html stream in actual

Re: find html tag

2013-02-12 Thread Michael Jaruska
org.apache.wicket.Component#onComponentTag(ComponentTag) */ @Override protected void onComponentTag(final ComponentTag tag) { super.onComponentTag(tag); if(!isRootForm()) { tag.setName(span); } } ~ Thank you, Paul Bors On Tue, Feb 12, 2013 at 7:55 AM, Michael Jaruska