You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Christopher DeBracy <cm...@debracy.net> on 2004/09/24 05:27:37 UTC

Tapestry 3.1

Is portlet support still slated for the 3.1 release? This is something I'm
definitely looking forward to.

RE: Tapestry 3.1

Posted by Christopher DeBracy <cm...@debracy.net>.
If there's something I could help with, let me know and I'll do what I can.

> -----Original Message-----
> From: Howard Lewis Ship [mailto:hlship@gmail.com] 
> Sent: Friday, September 24, 2004 4:40 PM
> To: Tapestry users; cmd@debracy.net
> Subject: Re: Tapestry 3.1
> 
> 
> I'm hoping so; we'll see how it works once I get humpty 
> dumpty back together.
> 
> In theory it should not be too complicated.  We'll see!
> 
> 
> On Thu, 23 Sep 2004 22:27:37 -0500, Christopher DeBracy 
> <cm...@debracy.net> wrote:
> > Is portlet support still slated for the 3.1 release? This 
> is something 
> > I'm definitely looking forward to.
> > 
> > 
> 
> 
> 
> -- 
> Howard M. Lewis Ship
> Independent J2EE / Open-Source Java Consultant
> Creator, Jakarta Tapestry
> Creator, Jakarta HiveMind
> http://howardlewisship.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Tapestry 3.1

Posted by Howard Lewis Ship <hl...@gmail.com>.
I'm hoping so; we'll see how it works once I get humpty dumpty back together.

In theory it should not be too complicated.  We'll see!


On Thu, 23 Sep 2004 22:27:37 -0500, Christopher DeBracy <cm...@debracy.net> wrote:
> Is portlet support still slated for the 3.1 release? This is something I'm
> definitely looking forward to.
> 
> 



-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind
http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Help needed on foreach and Vector

Posted by damar thapa <da...@yahoo.com>.
Hi,
 
Thanks, Markus and Erik.  I followed the pointers and is working now.
 
Thanks once again.
 
Damar


Markus Wiederkehr <ma...@gmail.com> wrote:
The source parameter of Foreach specifies the source of objects to be
iterated. In your case this is only a single object, the ResultSet.
You should use a collection or an array instead. The value parameter
is used to *update* the current value on each iteration. You cannot
invoke next() on the ResultSet here...

See http://jakarta.apache.org/tapestry/doc/ComponentReference/Foreach.html

You should convert the ResultSet into a collection in your getRs()
method and create a page property that holds the value on each
iteration. As Erik said, the collection should be cached in a page
property as well.

Hope that helps,

Markus


On Wed, 20 Oct 2004 23:16:40 -0700 (PDT), damar thapa
wrote:
> Hi,
> 
> Thanks, Erik. Your help is truly appreciated (it is working now.).
> 
> Now, I have one more related side question (this time, I using postgresql to pass the data!). I have the following html code:
> 
> 
> 
> 
> 
> 
> 
> And, the corresponding java code has the following method:
> 
> public ResultSet getRs(){
> 
> ---------------------------
> ResultSet rs = s.executeQuery(.........);
> -----------------------------
> return rs;
> }
> 
> In this case as well, I get no error, but no data either. No data, does it mean the method is not getting any data from the Database? Or, I have not structured html code properly?
> 
> Sorry for being a pain.
> 
> Thanks,
> 
> Damar

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


		
---------------------------------
Do you Yahoo!?
vote.yahoo.com - Register online to vote today!

Re: Help needed on foreach and Vector

Posted by Markus Wiederkehr <ma...@gmail.com>.
The source parameter of Foreach specifies the source of objects to be
iterated. In your case this is only a single object, the ResultSet.
You should use a collection or an array instead. The value parameter
is used to *update* the current value on each iteration. You cannot
invoke next() on the ResultSet here...

See http://jakarta.apache.org/tapestry/doc/ComponentReference/Foreach.html

You should convert the ResultSet into a collection in your getRs()
method and create a page property that holds the value on each
iteration. As Erik said, the collection should be cached in a page
property as well.

Hope that helps,

Markus


On Wed, 20 Oct 2004 23:16:40 -0700 (PDT), damar thapa
<da...@yahoo.com> wrote:
> Hi,
> 
> Thanks, Erik.  Your help is truly appreciated (it is working now.).
> 
> Now, I have one more related side question (this time, I using postgresql to pass the data!).  I have the following html code:
> 
>      <span jwcid="@Foreach" source="ognl:rs" value="ognl:rs.next">
>         <tr>
>              <td><span jwcid="@Insert" value="ognl:rs.getString("serial")"/></td>
>         </tr>
>    </span>
> 
> And, the corresponding java code has the following method:
> 
>     public ResultSet getRs(){
> 
>       ---------------------------
>        ResultSet rs = s.executeQuery(.........);
>       -----------------------------
>        return rs;
>     }
> 
> In this case as well, I get no error, but no data either.  No data, does it mean the method is not getting any data from the Database? Or, I have not structured html code properly?
> 
> Sorry for being a pain.
> 
> Thanks,
> 
> Damar

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Help needed on foreach and Vector

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Oct 21, 2004, at 2:16 AM, damar thapa wrote:
> Now, I have one more related side question (this time, I using 
> postgresql to pass the data!).  I have the following html code:
>
>      <span jwcid="@Foreach" source="ognl:rs" value="ognl:rs.next">

This is calling getRs().getNext() for every iteration, I suspect.  
So....

> And, the corresponding java code has the following method:
>
>     public ResultSet getRs(){
>
>       ---------------------------
>        ResultSet rs = s.executeQuery(.........);
>       -----------------------------
>        return rs;
>     }

You should avoid executing the query every time getRs() is called - 
keep it cached and lazy initialize it on the first call.

I recommend against such direct DB->HTML ties though.  At the very 
least, collect all the data into a Collection that is exposed to the 
view rather than navigating a recordset directly.

	Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Help needed on foreach and Vector

Posted by damar thapa <da...@yahoo.com>.
Hi,
 
Thanks, Erik.  Your help is truly appreciated (it is working now.).
 
Now, I have one more related side question (this time, I using postgresql to pass the data!).  I have the following html code:
 
     <span jwcid="@Foreach" source="ognl:rs" value="ognl:rs.next">
        <tr>
             <td><span jwcid="@Insert" value="ognl:rs.getString("serial")"/></td>
        </tr>
   </span>
 
And, the corresponding java code has the following method:
 
    public ResultSet getRs(){
    
      ---------------------------       
       ResultSet rs = s.executeQuery(.........);       
      ----------------------------- 
       return rs;
    }
      
 
In this case as well, I get no error, but no data either.  No data, does it mean the method is not getting any data from the Database? Or, I have not structured html code properly?
 
Sorry for being a pain.
 
Thanks,
 
Damar
 


Erik Hatcher <er...@ehatchersolutions.com> wrote:

On Oct 9, 2004, at 11:49 AM, damar thapa wrote:
> In the above java code, I have Email and ReadTextFile classes. Email 
> class has getAddress() and getOwner() methods, and ReadTextFile has 
> getContents(fileToRead) which returns a Vector with list of Email 
> objects.

It'd be helpful to us (and probably you) if you eliminate some of the 
complexity at first. For example, just hardcode the Vector of Email 
objects without the ReadTextFile. Are you sure you're really getting 
valid Email objects that are fully populated? Starting simpler helps 
development in this respect.

> When I try the application, it does not give any address and names. 
> Can some one tell me what I have missed here?

You didn't say what it did give you. I'm guessing no error, but no 
list either.

> And in the address section, I eventually would like to have > mailto:emailaddress@domian.com" .. How can I do this?

... is 
probably what you want. I love @Any!

Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


		
---------------------------------
Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.

Re: Help needed on foreach and Vector

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Oct 9, 2004, at 11:49 AM, damar thapa wrote:
> In the above java code, I have Email and ReadTextFile classes. Email 
> class has getAddress() and getOwner() methods, and ReadTextFile has 
> getContents(fileToRead) which returns a Vector with list of Email 
> objects.

It'd be helpful to us (and probably you) if you eliminate some of the 
complexity at first.  For example, just hardcode the Vector of Email 
objects without the ReadTextFile.  Are you sure you're really getting 
valid Email objects that are fully populated?  Starting simpler helps 
development in this respect.

> When I try the application, it does not give any address and names.  
> Can some one tell me what I have missed here?

You didn't say what it did give you.  I'm guessing no error, but no 
list either.

> And in the address section, I eventually would like to have <a 
> mailto:emailaddress@domian.com" ..   How can I do this?

<a href="ognl:'mailto:' + email.address" jwcid="@Any">...</a> is 
probably what you want.  I love @Any!

	Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Help needed on foreach and Vector

Posted by damar thapa <da...@yahoo.com>.
Hi, 

 I have a html file in border application with the following code:
<span jwcid=@Border> 

          <table>

                   <tr>

                           <td>Email Address</td>

                                   <td>Email Owner </td>

                              </tr>

                              <tr jwcid="@Foreach" source="ognl:emails" value="ognl:email">

                                           <td><span jwcid="@Insert"  

                                             value="ognl:email.address"/></td>

                                           <td><span jwcid="@Insert" 

                                            value="ognl:email.owner"/></td>

                                            </tr>

                             </table>

    </span> 

And the following java code to provide necessary data:


public class GroupEmail extends BasePage {

         private Email email;

         private Vector emails;

         public void setEmail(Email em){

                    email=em;

          }



         public Email getEmail(){

                      return email; 

          }

          public void setEmails(Vector emails){

                           emails= emails;

           }

           public Vector getEmails(){

                       Vector emailList = new Vector(); 

                       File fileToRead = new File("emailFile");

                       emailList = ReadTextFile.getContents(fileToRead); 

                       return emailList;

                   }

          }

In the above java code, I have Email and ReadTextFile classes. Email class has getAddress() and getOwner() methods, and ReadTextFile has getContents(fileToRead) which returns a Vector with list of Email objects.

When I try the application, it does not give any address and names.  Can some one tell me what I have missed here?  

And in the address section, I eventually would like to have <a mailto:emailaddress@domian.com" ..   How can I do this?

 

thanks,

 

Damar

		
---------------------------------
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.