[Wicket-user] specifying html template

2007-04-01 Thread Francisco Treacy
Hi,
We all know that in Wicket for a given ExampleView.java we have an 
ExampleView.html associated markup.

How can I dynamically specify the HTML template from my Java page?
I'm exceptionally needing this:

if (product.getReference().equals(C25-L)) {
// trigger some code to use C25-L.html *instead* of ExampleView.html
}

I tried playing with setMarkupStream and newMarkupResourceStream but still no 
success.

Didn't seem that complex, but I'm lost here. Any hints?

Thanks!
Francisco








___ 
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
Profitez des connaissances, des opinions et des expériences des internautes sur 
Yahoo! Questions/Réponses 
http://fr.answers.yahoo.com-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] specifying html template

2007-04-01 Thread Francisco Treacy
I answer myself: VARIATIONS!

Thanks anyway,

Keep on with good work,
Francisco

- Message d'origine 
De : Francisco Treacy [EMAIL PROTECTED]
À : wicket-user@lists.sourceforge.net
Envoyé le : Dimanche, 1 Avril 2007, 22h35mn 33s
Objet : specifying html template

Hi,
We all know that in Wicket for a given ExampleView.java we have an 
ExampleView.html associated markup.

How can I dynamically specify the HTML template from my Java page?
I'm exceptionally needing this:

if (product.getReference().equals(C25-L)) {
// trigger some code to use C25-L.html *instead* of ExampleView.html
}

I tried playing with setMarkupStream and newMarkupResourceStream but still no 
success.

Didn't seem that complex, but I'm lost here. Any hints?

Thanks!
Francisco




 
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
Profitez des connaissances, des opinions et des expériences des internautes sur 
Yahoo! Questions/Réponses.









___ 
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
Profitez des connaissances, des opinions et des expériences des internautes sur 
Yahoo! Questions/Réponses 
http://fr.answers.yahoo.com-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] render to file?

2007-02-14 Thread Francisco Treacy
 does wget keep the cookie for session tracking?

Yes, it does. I'm doing a

wget -erobots=off --post-data=username=(user)password=(pass) 
--keep-session-cookies --save-cookies=cookies.txt 
http://test.com/catalog/app/SignIn

I get SignIn + the cookie
(Cookie file:
test.com  FALSE   /catalogFALSE   0   JSESSIONID  
C187A08FF6EAEF94920BE8A20B171AC9)

and then,

wget -erobots=off --post-data=username=(user)password=(pass) 
--load-cookies=cookies.txt http://test.com/catalog/app/ProductView/id/22

...and it still downloads SignIn... (thus it isn't effectively signing in)

Extract of SignIn.html:

input name=username value= type=text size=30/
input name=password value= type=password size=30/

Don't really get what's going on...

Thanks for your help,
Francisco

ps: if there's a more wicket-oriented solution to generate offline html pages, 
I would like to know it as well!


Date: Sun, 11 Feb 2007 14:08:16 -0800
From: Igor Vaynberg 
Subject: Re: [Wicket-user] render to file?
To: wicket-user@lists.sourceforge.net
Message-ID:
 [EMAIL PROTECTED]
Content-Type: text/plain; charset=iso-8859-1

does wget keep the cookie for session tracking?

-igor


On 2/11/07, Francisco Treacy  wrote:

 Hi all,
 Is there a possibility to render a Wicket page to a file instead to the
 browser?

 In fact, i need to make an 'HTML offline export' of all products stored in
 database...  how would you do to accomplish this, including stylesheets and
 images?
 (i already tried wget but I'm having problems with image resources as
 catalog?x=JGqvQsW-QbuV1CaPUrSID*jhjA3cbcCp6VIF-CKlTgc when I check it out in
 the browser).

 Any ideas very welcome. Thank you in advance,

 Francisco





-
 Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
Profitez des connaissances, des opinions et des expériences des internautes sur 
Yahoo! Questions/Réponses.-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] render to file?

2007-02-11 Thread Francisco Treacy
Hi all,
Is there a possibility to render a Wicket page to a file instead to the browser?

In fact, i need to make an 'HTML offline export' of all products stored in 
database...  how would you do to accomplish this, including stylesheets and 
images?
(i already tried wget but I'm having problems with image resources as 
catalog?x=JGqvQsW-QbuV1CaPUrSID*jhjA3cbcCp6VIF-CKlTgc when I check it out in 
the browser).

Any ideas very welcome. Thank you in advance,

Francisco


-
 Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
Profitez des connaissances, des opinions et des expériences des internautes sur 
Yahoo! Questions/Réponses.-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] alternative to fragments?

2007-02-11 Thread Francisco Treacy
Hi all,
Fragments allow to do selections in page's content, but I find this way too 
complicated to accomplish a simple if statement:

I have a form. Inside it, an upload field, for images. Besides it, a little 
image preview and a delete link. I would like to easily switch between preview 
+ delete link and browse button. 

Moreover, working with fragments inside a form forced me to put a disabled Link 
when the fragment was not active (in order to fulfill Wicket's component 
requirement). It was impossible to do new 
Label(image-panel).setEnabled(false) because when I tried to display the 
page it complained for not finding  the property image-panel in my bean, 
which this form is backing.

Hope I've been clear... Is there a simple way to get this done? Best practice? 
Without so much component checking, maybe?

Thanks again!
Francisco


-
 Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
Profitez des connaissances, des opinions et des expériences des internautes sur 
Yahoo! Questions/Réponses.-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] delete row and update view?

2007-02-09 Thread Francisco Treacy
Igor,
Well, actually nothing happens :)


 final DataView dataView = new DataView(listing, myDataProvider)
  {
   protected void populateItem(final Item item)
   {
Product product
 = (Product
)item.getModelObject();

item.add(new Link(delete-product)
{
 public void onClick()
 {
  // Service call to delete the product
  service.delete();
  // Nothing else to call here for view update?
 }
});
item.add(new Label(product-id, product.getId().toString()));

...


I took the example from the repeaters example, OIRPage.java... what am I doing 
wrong?
Seems like a Hibernate-cache thingy otherwise... how do I make to be sure the 
table refreshing has the same effect as clicking its link (when I click 
ProductList link in my page header, it shows the updated view) ?

Francisco

Date: Thu, 8 Feb 2007 16:11:49 -0800
From: Igor Vaynberg 
Subject: Re: [Wicket-user] delete row and update view?
To: wicket-user@lists.sourceforge.net
Message-ID:
 [EMAIL PROTECTED]
Content-Type: text/plain; charset=iso-8859-1

actually you need to do nothing :)

after onclick for your delete link is done executing the page will refresh
and so will the dataview. when it refreshes it will call methods on the
dataprovider again and refresh accordingly

-igor


On 2/8/07, Francisco Treacy  wrote:

 I have a DataView fed by a SortableDataProvider  to display a pageable and
 sortable table. In each row, I have a link to delete the current item.

 My problem is that I cannot find the way to remove from the view the item
 I just deleted in the database by clicking on the link. I need to refresh
 immediately the view in order to reflect the actual state... but don't know
 how.
 I tried with lots of possibilites like rendering the item, disabling it,
 hiding it... but nothing...

 Wicket Library example (
 http://www.wicket-library.com/wicket-examples/library) does what I want,
 but uses a PageableListView. And I think I need DataView because it has
 better capabilities.

 What should I do to be sure that each time I fire an action (add, delete,
 edit), my view is going to reflect my actual model?

 Thanks!
 Francisco

 --
 D?couvrez une nouvelle fa?on d'obtenir des r?ponses ? toutes vos questions
 ! Profitez des connaissances, des opinions et des exp?riences des
 internautes sur Yahoo! Questions/R?ponses
 .



-
 Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
Profitez des connaissances, des opinions et des expériences des internautes sur 
Yahoo! Questions/Réponses.-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] wicket-contrib-tinymce textareas

2007-02-08 Thread Francisco Treacy
Iulian: great.
 Please let me know when this is commited (i just looked up in svn and there 
were no new commits to wicket 1.2 branch in contrib tinymce).

Igor: I saw the attachment, but when I clicked over the link, it took me to a 
sourceforge error page  I'll wait for Iulian's correction, thanks anyway.

Francisco

 hi francisco,


 sorry for this late response, the fix will be ready within few days.
 
 /iulian



-
 Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
Profitez des connaissances, des opinions et des expériences des internautes sur 
Yahoo! Questions/Réponses.-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] delete row and update view?

2007-02-08 Thread Francisco Treacy
I have a DataView fed by a SortableDataProvider  to display a pageable and 
sortable table. In each row, I have a link to delete the current item. 

My problem is that I cannot find the way to remove from the view the item I 
just deleted in the database by clicking on the link. I need to refresh 
immediately the view in order to reflect the actual state... but don't know how.
I tried with lots of possibilites like rendering the item, disabling it, hiding 
it... but nothing...

Wicket Library example (http://www.wicket-library.com/wicket-examples/library) 
does what I want, but uses a PageableListView. And I think I need DataView 
because it has better capabilities.

What should I do to be sure that each time I fire an action (add, delete, 
edit), my view is going to reflect my actual model?

Thanks!
Francisco


-
 Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
Profitez des connaissances, des opinions et des expériences des internautes sur 
Yahoo! Questions/Réponses.-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] wicket-contrib-tinymce textareas

2007-02-06 Thread Francisco Treacy
Thanks Igor, 
But I couldn't find TinyMceEnable anywhere  (also note that i'm limited to 
Wicket 1.2.4 and the corresponding wicket-contrib-tinymce branch). So I did the 
following:

// Add normal textareas
add(new TextArea(description).setOutputMarkupId(true));
add(new TextArea(application).setOutputMarkupId(true));   
 

// Add TinyMCE textarea
TinyMCEPanel tinyMCE = new TinyMCEPanel(tinyMCE, settings);
TextArea technicalInfo = new TextArea(technicalInfo);
technicalInfo.setOutputMarkupId(true);
technicalInfo.add(tinyMCE);
add(technicalInfo);

Without success, even playing with TinyMCE's html attributes (ie  
textarea_trigger)...

If you have any ideas, much appreciated... Anyway I think the simplest is to 
find this in wicket stuff code, change it to specify textareas manually, and 
recompile with Maven.

Francisco
i dont know about the integration in wicket-stuff project, but i wrote my
own very simple one. the idea is to use a behavior to enable tinymce for a
textfield. see attached behavior, might help you get a head start.

the usage is pretty basic

TextArea textarea=new TextArea(...);
textarea.add(new TinyMceEnable());

-igor


On 2/4/07, Francisco Treacy  wrote:

 Hi wicketers,

 I'm having a problem/ doubt with a particular TinyMCE setting and its
 implementation in the wicket-contrib-tinymce project.

 How can I change

 tinyMCE.init({
  mode : textareas,
  ...
 });


 for

 tinyMCE.init({
  ...
  mode : exact,
  elements : elm1,elm2
 });

 or mode : specific_textareas ?

 Cause I don't want *all* of the textareas in my page to be tinymce'd. I
 can't find this setting anywhere, particularly in the TinyMCESettings class
 where it should be settable.

 Thanks in advance for your help!

 Regards,
 Francisco

 -


-
 Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
Profitez des connaissances, des opinions et des expériences des internautes sur 
Yahoo! Questions/Réponses.-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] wicket-contrib-tinymce textareas

2007-02-04 Thread Francisco Treacy
Hi wicketers,

I'm having a problem/ doubt with a particular TinyMCE setting and its 
implementation in the wicket-contrib-tinymce project.

How can I change 

tinyMCE.init({
 mode : textareas,
 ...
});

for

tinyMCE.init({
 ...
 mode : exact,
 elements : elm1,elm2
});
or mode : specific_textareas ?

Cause I don't want *all* of the textareas in my page to be tinymce'd. I can't 
find this setting anywhere, particularly in the TinyMCESettings class where it 
should be settable.

Thanks in advance for your help!

Regards,
Francisco


-
 Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
Profitez des connaissances, des opinions et des expériences des internautes sur 
Yahoo! Questions/Réponses.-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] question about showing components or not

2006-11-24 Thread Francisco Treacy
Hi wicketers,

I would like to ask you what's the best way to perform the following:
Say I have Products. There are Products that have a Photo and there are 
Products that don't.

// Set data to the page
add(new Label(product-description, product.getDescription()));

if (product.getPhoto() != null) {
add(new Label(product-photo-date, 
CommonUtil.getFormattedDate(product.getPhoto().getDateTime(;
add(new Label(product-photo-time, 
CommonUtil.getFormattedTime(product.getPhoto().getDateTime(;
}

In my html i have 

span wicket:id=product-description[product-description]/span
(eventually add something here)
span wicket:id=product-photo-date[product-photo-date]/span
span wicket:id=product-photo-time[product-photo-time]/span
(eventually add something here)

And Wicket will complain if product.getPhoto() is null, of course, cause 
product-photo-date and product-photo-time were never added to the page 
component.

I really don't see how to avoid this check, or how to solve this elegantly. 
Perhaps missing something obvious, hope not :)

And afaik the useComponentUseCheck setting at application level checks the 
other way round (if elements declared in java Page are marked-up in html code). 
Anyway, I have it set to false.

Thanks in advance, and thanks as well for such a nice web framework,

Francisco








___ 
Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son 
interface révolutionnaire.
http://fr.mail.yahoo.com-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] [solved] question about showing components or not

2006-11-24 Thread Francisco Treacy
Thanks for your answers, I finally found the best practice solution to my 
problem, well, I think so. Remember I was looking for a way to switch on/off  
a part of my page (that of course includes declared components in page class 
and in html markup).
I'll try to explain why some approaches aren't the best, imho.

Wanting to disable certain components, I think it's quite a repetitive task 
to set empty strings to each and every component I want to hide. Here we only 
have one, but imagine having ten or twelve...

 if (product.getPhoto() != null) {
add(new Label(product-photo-date, someDateModel));
} else {
add(new Label(product-photo-date, ));
 }


The same for this, I have to manually override each and every component:
 newLabel(product-photo-date, 
 CommonUtil.getFormattedDate(product.getPhoto().getDateTime())) {
   public boolean isVisible() {
 return product.getPhoto() != null;
   }
 }


I couldn't get ideas in  
http://cwiki.apache.org/WICKET/create-dynamic-markup-hierarchies-using-panels.html
 to work.
Wicket complained anyway.

Well... I just came by Fragments... the magical word... that solved my issue:

Fragment photoFragment = new Fragment(photo-panel, photo-fragment);

if (product.getPhoto() != null) {
photoFragment.add(new Label(product-photo-date, someDateModel));
add(photoFragment);
} else {
add(new Label(photo-panel)).setEnabled(false);
}

So like this we're choosing in Java whether to include a fragment (and its 
childs) or not.

span wicket:id=photo-panel[photo-panel]/span  
  

wicket:fragment wicket:id=photo-fragment
span 
wicket:id=product-photo-date[product-photo-date]/span
/wicket:fragment

And that's all to it.

Regards,
Francisco

PS: 
 add(new Label(product-photo-time, new PropertyModel(product, 

 photo.dateTime)));



Yeah, but I needed to handle the Date outputting it formatted with a
SimpleDateFormat. That's why I have
CommonUtil.getFormattedDate(product.getPhoto().getDateTime()).



 But doesn't the product description of dates change after creation of that

 label?

 and also should product be kept into memory?

No, it's just the original photo date coming from exif data, and it
needn't be altered. Thanks for the info cause I'm planning to use it
elsewhere.








___ 
Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son 
interface révolutionnaire.
http://fr.mail.yahoo.com-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user