Hi, In HTML buttons don't support the target attribute, but form does:
http://www.w3schools.com/TAGS/att_form_target.asp So use target = "_blank" on the form. Alternatively you can use JavaScript to open a new window. regards Bob On Mon, Jun 6, 2011 at 8:39 AM, Reinhard Hnat <[email protected]> wrote: > This is not really what I need. I give you a snippet of my code to show. > > public void onInit() { > ... > form.add(new Submit("Graphik",this,"onGraphikClick")); > ... > > The method "on GraphikClick" prepares a parameterset from the input to the > active form and afterwards > redirects tu another page which should be opened in a new browser window. > > public boolean onGraphikClick() { > TreeNode tn=null; > System.out.println("Tree selected > "+tree.getSelectedNodes(true).size()); > Iterator<TreeNode> it=tree.getSelectedNodes(true).iterator(); > Parameters parameterset=new Parameters(); > while (it.hasNext()) { > tn=it.next(); > parameterset.addKanal((Kanal) tn.getValue()); > } > parameterset.params.put("anfang", anfang.getValue()); > System.out.println("select Anfang="+anfang.getValue()); > parameterset.params.put("ende", ende.getValue()); > if (parameterset.validateMap() && > tree.getSelectedNodes(true).size()!=0) { > setRedirect("graphik.htm",parameterset.params); } > return false; > } > > I have tried to setAttributes to the SubmitButton as in the Javadoc you > linked but this does not work. > > Regards > Reinhard > > Logotronic GmbH > Phorusgasse 8 > A-1040 Wien/Vienna > Österreich/Austria > > UID: ATU15107104 > > [email protected] > Tel.:+43(1)587 29 71-22 > Fax.:+43(1)587 29 71-41 > www.logotronic.at > > Am 2011-05-27 14:18, schrieb Gilberto: > > Sorry, I've posted the wrong link, here is the right one[1]. > > Hth, > > Gilberto > [1] > http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#setAttribute%28java.lang.String,%20java.lang.String%29 > > On Fri, May 27, 2011 at 3:10 AM, Reinhard Hnat <[email protected]> > wrote: >> >> The Graphic page I want to open on a new Browser window is not an external >> page. It is an apache click generated page too. >> >> Regards Reinhard >> >> >> Am 2011-05-26 13:44, schrieb Gilberto: >> >> This[1] will help a lot and read the docs as well[2]. >> Regards, >> >> Gilberto >> >> [1]http://click.avoka.com/click-examples/control/link-demo.htm >> >> [2]http://click.apache.org/docs/extras-api/org/apache/click/extras/control/ExternalLink.html >> >> >> >> On Thu, May 26, 2011 at 5:35 AM, Reinhard Hnat <[email protected]> >> wrote: >>> >>> I want to display a graphic for which i have defined the parameters on an >>> apache click page. Then I redirect to another page to display the graphic. >>> This works fine, but I want to open a new browser window for this graphic. >>> How can I do that? >>> >>> Regards >>> Reinhard >>> >> > >
