I posted same question here https://stackoverflow.com/questions/17260701/passing-values-to-nested-apex-page-for-editing/17289978?noredirect=1#17289978
I followed the solution but getting error while accessing object is Page 2.
This is what I have done:
Page 1:
I have this command button in pageblocktable column
<apex:commandLink reRender="catTable" title="Modify" action="editBuilding" > <apex:param name="bIdModifyParam" value="{!item.id}" assignTo="{!selectedrowId}"/> </apex:commandLink>
On click of button showing this dialog with javascript:
<div class="popupMain clearfix">
<apex:include pageName="Page2"/>
</div>
Page 1 Controller extension:
public PageReference editBuilding() {
for(Object__c obj : Rows)
{
if(obj.Id==selectedrowId){
objbuilding= obj; }
}
return null;
}
Page 2:
<apex:inputField value="{!objbuilding.Id}"/>
//This line throws error saying objbulding not found