[JBoss-user] [Nukes User] - Re: how to open new window to display a stream?

2005-04-26 Thread logicfish
I have done something similar with my module which can display images.
To display content outside of the nukes theme I override the `process' method 
instead of using the `op(Page p)' style.
The url changes to `/nukes/modules/yourmodule/yourresource'
and you parse the url inside the method and then setup the binary resource.
Heres part of my code:

  | public void process(Signature signature, NukesRequest req,
  | NukesResponse resp) {
  | if (signature instanceof ModuleResourceSignature) {
  | ModuleResourceSignature mrs = (ModuleResourceSignature) 
signature;
  | String id = mrs.getPath();
  | Resource res = null;
  | if (id.startsWith(/report)) {
  | byte[] bin = ...;
  | res = new ByteArrayResource(image/jpeg, bin); 
// yours would be pdf
  | res.setName(whatever.jpg);
  | resourceManager.add(/report/ + name, res);
  | resp.setResult(new ResourceResult(res));

  | } else {
  | res = getResource(id);
  | if (res != null) {
  | resp.setResult(new ResourceResult(res));
  | } else {
  | resp.setResult(CodeResult.CODE_404);
  | }
  | } else {
  | super.process(signature, req, resp);
  | }
  | }
  | 
To open in a new window use javascript in the href url.
Hope this helps.

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3875306#3875306

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3875306


---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Nukes User] - Tmplate support in nukes-2.x

2005-04-25 Thread logicfish
I have written the front end to my application using nukes.
What I would like to know is how musch of the templating system will be 
implemented in portal-2.x.
I would like to continue using this system if possible because it is 
precompiled unlike most template packages.
Will there be some kind of wrapper class?

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3875302#3875302

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3875302


---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user